v0.8.15
Public Member Functions | Public Attributes | Friends | List of all members
MoFEM::CfgCubitBcData Struct Reference

Definition of the cfd_bc data structure. More...

#include <src/multi_indices/BCData.hpp>

Inheritance diagram for MoFEM::CfgCubitBcData:
[legend]
Collaboration diagram for MoFEM::CfgCubitBcData:
[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...
 
 CfgCubitBcData ()
 
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 CfgCubitBcData &e)
 Print cfd_bc data. More...
 

Detailed Description

Definition of the cfd_bc data structure.

Examples:
cubit_bc_test.cpp.

Definition at line 466 of file BCData.hpp.

Constructor & Destructor Documentation

◆ CfgCubitBcData()

MoFEM::CfgCubitBcData::CfgCubitBcData ( )

Definition at line 478 of file BCData.hpp.

478  :
480  bzero(&data,sizeof(data));
481  }
GenericCubitBcData(const CubitBCType type)
Definition: BCData.hpp:76

Member Function Documentation

◆ __attribute__()

struct MoFEM::CfgCubitBcData::__attribute__ ( (packed)  )

Definition at line 467 of file BCData.hpp.

467  {
468  char name[6]; //< 6 characters for "cfd_bc"
469  char zero; //< This is always zero
470  char type; //< This is the type of cfd_bc
471  };

◆ fill_data()

MoFEMErrorCode MoFEM::CfgCubitBcData::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 483 of file BCData.hpp.

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

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericCubitBcData.

Definition at line 476 of file BCData.hpp.

476 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericCubitBcData.

Definition at line 475 of file BCData.hpp.

475 { return sizeof(_data_); }

◆ set_data()

MoFEMErrorCode MoFEM::CfgCubitBcData::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 491 of file BCData.hpp.

491  {
493  if(size!=sizeof(data)) {
494  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"data inconsistency");
495  }
496  memcpy(tag_ptr, &data, size);
498  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

Friends And Related Function Documentation

◆ operator<<

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

Print cfd_bc data.

Definition at line 546 of file BCMultiIndices.cpp.

546  {
547  os << "\n";
548  os << "CFD BC \n \n";
549  return os;
550 }

Member Data Documentation

◆ data

_data_ MoFEM::CfgCubitBcData::data
Examples:
cubit_bc_test.cpp.

Definition at line 471 of file BCData.hpp.


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