v0.8.4
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 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:
cubit_bc_test.cpp.

Definition at line 415 of file BCData.hpp.

Constructor & Destructor Documentation

◆ HeatFluxCubitBcData()

MoFEM::HeatFluxCubitBcData::HeatFluxCubitBcData ( )

Definition at line 434 of file BCData.hpp.

434  :
436  bzero(&data,sizeof(data));
437  }
GenericCubitBcData(const CubitBCType type)
Definition: BCData.hpp:76

Member Function Documentation

◆ __attribute__()

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

Definition at line 417 of file BCData.hpp.

417  {
418  char name[8]; //< 8 characters for "HeatFlux" (no space)
419  char pre1; //< This is always zero
420  char pre2; //< 0: heat flux is not applied on thin shells (default); 1: heat flux is applied on thin shells
421  char flag1; //< 0: N/A, 1: normal heat flux case (i.e. single value, case without thin shells)
422  char flag2; //< 0: N/A, 1: Thin shell top heat flux specified
423  char flag3; //< 0: N/A, 1: Thin shell bottom heat flux specidied
424  double value1; //< Heat flux value for default case (no thin shells)
425  double value2; //< Heat flux (thin shell top)
426  double value3; //< Heat flux (thin shell bottom)
427  };

◆ fill_data()

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

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented from MoFEM::GenericCubitBcData.

Definition at line 439 of file BCData.hpp.

439  {
441  //Fill data
442  if(bc_data.size()!=sizeof(data)) SETERRQ(PETSC_COMM_SELF,1,"data inconsistency");
443  memcpy(&data, &bc_data[0], sizeof(data));
445  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericCubitBcData.

Definition at line 432 of file BCData.hpp.

432 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericCubitBcData.

Definition at line 431 of file BCData.hpp.

431 { return sizeof(_data_); }

◆ set_data()

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

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

447  {
449  if(size!=sizeof(data)) {
450  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"data inconsistency");
451  }
452  memcpy(tag_ptr, &data, size);
454  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528

Friends And Related Function Documentation

◆ operator<<

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

Print heat flux bc data.

Definition at line 531 of file BCMultiIndices.cpp.

531  {
532  os << "\n";
533  os << "H e a t F l u x \n \n";
534  if (e.data.flag1 == 1)
535  os << "Heat flux value: " << e.data.value1 << "\n";
536  else os << "Heat flux is applied on thin shells" << "\n";
537  if (e.data.flag2 == 1)
538  os << "Heat flux value (thin shell top): " << e.data.value2 << "\n";
539  else os << "Heat flux value (thin shell top): N/A" << "\n";
540  if (e.data.flag3 == 1)
541  os << "Heat flux value (thin shell bottom): " << e.data.value3 << "\n \n";
542  else os << "Heat flux value (thin shell bottom): N/A" << "\n \n";
543  return os;
544 }

Member Data Documentation

◆ data

_data_ MoFEM::HeatFluxCubitBcData::data

Definition at line 427 of file BCData.hpp.


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