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

Constructor & Destructor Documentation

◆ CfgCubitBcData()

MoFEM::CfgCubitBcData::CfgCubitBcData ( )

Definition at line 502 of file BCData.hpp.

503 bzero(&data, sizeof(data));
504 }
@ INTERFACESET
Definition: definitions.h:170
GenericCubitBcData(const CubitBCType type)
Definition: BCData.hpp:78

Member Function Documentation

◆ __attribute__()

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

Definition at line 482 of file BCData.hpp.

491 {
492 char name[6]; //< 6 characters for "cfd_bc"
493 char zero; //< This is always zero
494 char type; //< This is the type of cfd_bc
495 };

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

506 {
508 // Fill data
509 if (bc_data.size() != sizeof(data))
510 SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
511 memcpy(&data, &bc_data[0], sizeof(data));
513 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericCubitBcData.

Definition at line 500 of file BCData.hpp.

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

499{ 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 515 of file BCData.hpp.

515 {
517 if (size != sizeof(data)) {
518 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
519 }
520 memcpy(tag_ptr, &data, size);
522 }
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:44

Friends And Related Function Documentation

◆ operator<<

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

Print cfd_bc data.

Definition at line 212 of file BCData.cpp.

212 {
213 os << "\n";
214 os << "CFD BC \n \n";
215 return os;
216}

Member Data Documentation

◆ data

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

Definition at line 497 of file BCData.hpp.


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