v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
MoFEM::HeatFluxCubitBcData Struct Reference

Definition of the heat flux bc data structure. More...

#include <src/multi_indices/BCData.hpp>

Inheritance diagram for MoFEM::HeatFluxCubitBcData:
[legend]
Collaboration diagram for MoFEM::HeatFluxCubitBcData:
[legend]

Public Member Functions

struct __attribute__ ((packed)) _data_
 
std::size_t getSizeOfData () const
 get data structure size More...
 
const void * getDataPtr () const
 get pointer to data structure More...
 
 HeatFluxCubitBcData ()
 
MoFEMErrorCode fill_data (const std::vector< char > &bc_data)
 get data from structure More...
 
MoFEMErrorCode set_data (void *tag_ptr, unsigned int size) const
 set data on structure More...
 
- Public Member Functions inherited from MoFEM::GenericCubitBcData
virtual MoFEMErrorCode fill_data (const std::vector< char > &bc_data)
 get data from structure More...
 
virtual MoFEMErrorCode set_data (void *tag_ptr, unsigned int size) const
 set data on structure More...
 
virtual std::size_t getSizeOfData () const =0
 get data structure size More...
 
virtual const void * getDataPtr () const =0
 get pointer to data structure More...
 
virtual const CubitBCTypegetType () const
 get data type More...
 
 GenericCubitBcData (const CubitBCType type)
 
virtual ~GenericCubitBcData ()
 

Public Attributes

_data_ data
 
- Public Attributes inherited from MoFEM::GenericCubitBcData
const CubitBCType tYpe
 Type of boundary condition. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const HeatFluxCubitBcData &e)
 Print heat flux bc data. More...
 

Detailed Description

Definition of the heat flux bc data structure.

Examples
add_cubit_meshsets.cpp, cubit_bc_test.cpp, and thermo_elastic.cpp.

Definition at line 423 of file BCData.hpp.

Constructor & Destructor Documentation

◆ HeatFluxCubitBcData()

MoFEM::HeatFluxCubitBcData::HeatFluxCubitBcData ( )
inline

Definition at line 444 of file BCData.hpp.

445 bzero(&data, sizeof(data));
446 }
@ HEATFLUXSET
Definition: definitions.h:156
GenericCubitBcData(const CubitBCType type)
Definition: BCData.hpp:63

Member Function Documentation

◆ __attribute__()

struct MoFEM::HeatFluxCubitBcData::__attribute__ ( (packed)  )
inline

Definition at line 415 of file BCData.hpp.

425 {
426 char name[8]; //< 8 characters for "HeatFlux" (no space)
427 char pre1; //< This is always zero
428 char pre2; //< 0: heat flux is not applied on thin shells (default); 1: heat
429 //flux is applied on thin shells
430 char flag1; //< 0: N/A, 1: normal heat flux case (i.e. single value, case
431 //without thin shells)
432 char flag2; //< 0: N/A, 1: Thin shell top heat flux specified
433 char flag3; //< 0: N/A, 1: Thin shell bottom heat flux specified
434 double value1; //< Heat flux value for default case (no thin shells)
435 double value2; //< Heat flux (thin shell top)
436 double value3; //< Heat flux (thin shell bottom)
437 };

◆ fill_data()

MoFEMErrorCode MoFEM::HeatFluxCubitBcData::fill_data ( const std::vector< char > &  bc_data)
inlinevirtual

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented from MoFEM::GenericCubitBcData.

Definition at line 448 of file BCData.hpp.

448 {
450 // Fill data
451 if (bc_data.size() != sizeof(data))
452 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
453 memcpy(&data, &bc_data[0], sizeof(data));
455 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440

◆ getDataPtr()

const void * MoFEM::HeatFluxCubitBcData::getDataPtr ( ) const
inlinevirtual

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericCubitBcData.

Definition at line 442 of file BCData.hpp.

442{ return &data; }

◆ getSizeOfData()

std::size_t MoFEM::HeatFluxCubitBcData::getSizeOfData ( ) const
inlinevirtual

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericCubitBcData.

Definition at line 441 of file BCData.hpp.

441{ return sizeof(_data_); }

◆ set_data()

MoFEMErrorCode MoFEM::HeatFluxCubitBcData::set_data ( void *  tag_ptr,
unsigned int  size 
) const
inlinevirtual

set data on structure

Parameters
tag_ptrpointer to tag on meshset
sizesize of data in bytes
Returns
error code

Reimplemented from MoFEM::GenericCubitBcData.

Definition at line 457 of file BCData.hpp.

457 {
459 if (size != sizeof(data)) {
460 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
461 }
462 memcpy(tag_ptr, &data, size);
464 }
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const HeatFluxCubitBcData e 
)
friend

Print heat flux bc data.

Definition at line 178 of file BCData.cpp.

178 {
179 os << "\n";
180 os << "H e a t F l u x \n \n";
181 if (e.data.flag1 == 1)
182 os << "Heat flux value: " << e.data.value1 << "\n";
183 else
184 os << "Heat flux is applied on thin shells"
185 << "\n";
186 if (e.data.flag2 == 1)
187 os << "Heat flux value (thin shell top): " << e.data.value2 << "\n";
188 else
189 os << "Heat flux value (thin shell top): N/A"
190 << "\n";
191 if (e.data.flag3 == 1)
192 os << "Heat flux value (thin shell bottom): " << e.data.value3 << "\n \n";
193 else
194 os << "Heat flux value (thin shell bottom): N/A"
195 << "\n \n";
196 return os;
197}

Member Data Documentation

◆ data

_data_ MoFEM::HeatFluxCubitBcData::data

Definition at line 439 of file BCData.hpp.


The documentation for this struct was generated from the following file: