v0.14.0
Public Member Functions | Public Attributes | List of all members
MoFEM::GenericAttributeData Struct Referenceabstract

Generic attribute data structure. More...

#include <src/multi_indices/MaterialBlocks.hpp>

Inheritance diagram for MoFEM::GenericAttributeData:
[legend]
Collaboration diagram for MoFEM::GenericAttributeData:
[legend]

Public Member Functions

virtual MoFEMErrorCode fill_data (const std::vector< double > &attributes)
 get data from structure More...
 
virtual MoFEMErrorCode set_data (void *tag_ptr, unsigned int size) const
 set data on structure More...
 
virtual const CubitBCTypegetType () const
 get data type More...
 
virtual unsigned int getMinMumberOfAtributes () const
 get minimal number of attributes which blockset has to have 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...
 
 GenericAttributeData (const CubitBCType type, const unsigned int min_number_of_atributes)
 

Public Attributes

const CubitBCType tYpe
 Type of data (f.e. MAT_ELATIC) More...
 
unsigned int minNumberOfAtributes
 minimal number of attributes More...
 

Detailed Description

Generic attribute data structure.

Definition at line 17 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ GenericAttributeData()

MoFEM::GenericAttributeData::GenericAttributeData ( const CubitBCType  type,
const unsigned int  min_number_of_atributes 
)
inline

Definition at line 74 of file MaterialBlocks.hpp.

76  : tYpe(type), minNumberOfAtributes(min_number_of_atributes) {}

Member Function Documentation

◆ fill_data()

virtual MoFEMErrorCode MoFEM::GenericAttributeData::fill_data ( const std::vector< double > &  attributes)
inlinevirtual

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented in MoFEM::Mat_Elastic_EberleinHolzapfel1, MoFEM::Mat_Interf, MoFEM::Mat_Elastic_TransIso, MoFEM::Block_BodyForces, MoFEM::Mat_Moisture, MoFEM::Mat_Thermal, MoFEM::Mat_Elastic, and MoFEM::BlockSetAttributes.

Definition at line 24 of file MaterialBlocks.hpp.

24  {
26  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
27  "It makes no sense for the generic attribute type");
29  }

◆ getDataPtr()

virtual const void* MoFEM::GenericAttributeData::getDataPtr ( ) const
pure virtual

◆ getMinMumberOfAtributes()

virtual unsigned int MoFEM::GenericAttributeData::getMinMumberOfAtributes ( ) const
inlinevirtual

get minimal number of attributes which blockset has to have

Returns
number of minimal data attributes

Definition at line 58 of file MaterialBlocks.hpp.

58  {
59  return minNumberOfAtributes;
60  }

◆ getSizeOfData()

virtual std::size_t MoFEM::GenericAttributeData::getSizeOfData ( ) const
pure virtual

◆ getType()

virtual const CubitBCType& MoFEM::GenericAttributeData::getType ( ) const
inlinevirtual

get data type

Returns
data type, see CubitBC

Definition at line 50 of file MaterialBlocks.hpp.

50 { return tYpe; }

◆ set_data()

virtual MoFEMErrorCode MoFEM::GenericAttributeData::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 in MoFEM::Mat_Interf, MoFEM::Mat_Elastic_TransIso, MoFEM::Block_BodyForces, MoFEM::Mat_Thermal, MoFEM::Mat_Elastic, and MoFEM::BlockSetAttributes.

Definition at line 37 of file MaterialBlocks.hpp.

37  {
39  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
40  "It makes no sense for the generic attribute type");
42  }

Member Data Documentation

◆ minNumberOfAtributes

unsigned int MoFEM::GenericAttributeData::minNumberOfAtributes

minimal number of attributes

Definition at line 52 of file MaterialBlocks.hpp.

◆ tYpe

const CubitBCType MoFEM::GenericAttributeData::tYpe

Type of data (f.e. MAT_ELATIC)

Definition at line 44 of file MaterialBlocks.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::GenericAttributeData::tYpe
const CubitBCType tYpe
Type of data (f.e. MAT_ELATIC)
Definition: MaterialBlocks.hpp:44
MoFEM::GenericAttributeData::minNumberOfAtributes
unsigned int minNumberOfAtributes
minimal number of attributes
Definition: MaterialBlocks.hpp:52
convert.type
type
Definition: convert.py:64
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453