v0.14.0
Loading...
Searching...
No Matches
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 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 CfgCubitBcData &e)
 Print cfd_bc data. More...
 

Detailed Description

Definition of the cfd_bc data structure.

Examples
cubit_bc_test.cpp.

Definition at line 476 of file BCData.hpp.

Constructor & Destructor Documentation

◆ CfgCubitBcData()

MoFEM::CfgCubitBcData::CfgCubitBcData ( )
inline

Definition at line 488 of file BCData.hpp.

489 bzero(&data, sizeof(data));
490 }
@ INTERFACESET
Definition: definitions.h:157
GenericCubitBcData(const CubitBCType type)
Definition: BCData.hpp:63

Member Function Documentation

◆ __attribute__()

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

Definition at line 468 of file BCData.hpp.

477 {
478 char name[6]; //< 6 characters for "cfd_bc"
479 char zero; //< This is always zero
480 char type; //< This is the type of cfd_bc
481 };

◆ fill_data()

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

492 {
494 // Fill data
495 if (bc_data.size() != sizeof(data))
496 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
497 memcpy(&data, &bc_data[0], sizeof(data));
499 }
#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::CfgCubitBcData::getDataPtr ( ) const
inlinevirtual

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericCubitBcData.

Definition at line 486 of file BCData.hpp.

486{ return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericCubitBcData.

Definition at line 485 of file BCData.hpp.

485{ return sizeof(_data_); }

◆ set_data()

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

501 {
503 if (size != sizeof(data)) {
504 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
505 }
506 memcpy(tag_ptr, &data, size);
508 }
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31

Friends And Related Function Documentation

◆ operator<<

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

Print cfd_bc data.

Definition at line 199 of file BCData.cpp.

199 {
200 os << "\n";
201 os << "CFD BC \n \n";
202 return os;
203}

Member Data Documentation

◆ data

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

Definition at line 483 of file BCData.hpp.


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