v0.13.1
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 422 of file BCData.hpp.

Constructor & Destructor Documentation

◆ HeatFluxCubitBcData()

MoFEM::HeatFluxCubitBcData::HeatFluxCubitBcData ( )
inline

Definition at line 443 of file BCData.hpp.

444 bzero(&data, sizeof(data));
445 }
@ 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 414 of file BCData.hpp.

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

◆ 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 447 of file BCData.hpp.

447 {
449 // Fill data
450 if (bc_data.size() != sizeof(data))
451 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
452 memcpy(&data, &bc_data[0], sizeof(data));
454 }
#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 441 of file BCData.hpp.

441{ 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 440 of file BCData.hpp.

440{ 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 456 of file BCData.hpp.

456 {
458 if (size != sizeof(data)) {
459 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
460 }
461 memcpy(tag_ptr, &data, size);
463 }
@ 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 438 of file BCData.hpp.


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