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

Constructor & Destructor Documentation

◆ CfgCubitBcData()

MoFEM::CfgCubitBcData::CfgCubitBcData ( )
inline

Definition at line 487 of file BCData.hpp.

488 bzero(&data, sizeof(data));
489 }
@ 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 467 of file BCData.hpp.

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

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

491 {
493 // Fill data
494 if (bc_data.size() != sizeof(data))
495 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
496 memcpy(&data, &bc_data[0], sizeof(data));
498 }
#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 485 of file BCData.hpp.

485{ 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 484 of file BCData.hpp.

484{ 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 500 of file BCData.hpp.

500 {
502 if (size != sizeof(data)) {
503 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
504 }
505 memcpy(tag_ptr, &data, size);
507 }
@ 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 482 of file BCData.hpp.


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