22 #ifndef __MATERIALBLOCKS_HPP__
23 #define __MATERIALBLOCKS_HPP__
40 "It makes no sense for the generic attribute type");
53 "It makes no sense for the generic attribute type");
88 const unsigned int min_number_of_atributes)
123 if (8 * attributes.size() >
sizeof(
data)) {
125 "data inconsistency, please review the number of material "
126 "properties defined");
129 memcpy(&
data, &attributes[0], 8 * attributes.size());
134 if (size >
sizeof(
data)) {
136 "data inconsistency, please review the number of material "
137 "properties defined");
139 memcpy(tag_ptr, &
data, size);
160 double ThermalExpansion;
182 "Young modulus and/or Poisson ratio is not defined. (top tip: "
183 "check number of ELASTIC block attributes) %d !< %d",
186 if (8 * attributes.size() >
sizeof(
data)) {
188 "data inconsistency, please review the number of material "
189 "properties defined");
192 memcpy(&
data, &attributes[0], 8 * attributes.size());
197 if (size >
sizeof(
data)) {
199 "data inconsistency, please review the number of material "
200 "properties defined");
202 memcpy(tag_ptr, &
data, size);
244 "Thermal conductivity is not defined. (top tip: check number of "
245 "THERMAL block atributes)");
247 if (8 * attributes.size() >
sizeof(
data)) {
249 "data inconsistency, please review the number of material "
250 "properties defined");
253 memcpy(&
data, &attributes[0], 8 * attributes.size());
258 if (size >
sizeof(
data)) {
260 "data inconsistency, please review the number of material "
261 "properties defined");
263 memcpy(tag_ptr, &
data, size);
306 "moisture diffusivity is not defined. (top tip: check number of "
307 "MOISTURE block atributes)");
309 if (8 * attributes.size() >
sizeof(
data)) {
311 "data inconsistency, please review the number of material "
312 "properties defined");
315 memcpy(&
data, &attributes[0], 8 * attributes.size());
333 double acceleration_x;
334 double acceleration_y;
335 double acceleration_z;
353 "Material density and/or acceleration is not defined. (top tip: "
354 "check number of THERMAL block atributes)");
356 if (8 * attributes.size() >
sizeof(
data)) {
358 "data inconsistency, please review the number of material "
359 "properties defined");
362 memcpy(&
data, &attributes[0], 8 * attributes.size());
367 if (size >
sizeof(
data)) {
368 SETERRQ(PETSC_COMM_SELF, 1,
369 "data inconsistency, please review the number of material "
370 "properties defined");
372 memcpy(tag_ptr, &
data, size);
410 "All material data not defined");
412 if (8 * attributes.size() !=
sizeof(
data)) {
414 "data inconsistency, please review the number of material "
415 "properties defined");
417 memcpy(&
data, &attributes[0],
sizeof(
data));
419 memcpy(&
data, &attributes[0], 8 * attributes.size());
425 if (size >
sizeof(
data)) {
427 "data inconsistency, please review the number of material "
428 "properties defined");
430 memcpy(tag_ptr, &
data, size);
467 if (8 * attributes.size() !=
sizeof(
data)) {
469 "data inconsistency, please review the number of material "
470 "properties defined");
472 memcpy(&
data, &attributes[0],
sizeof(
data));
477 if (size >
sizeof(
data)) {
479 "data inconsistency, please review the number of material "
480 "properties defined");
482 memcpy(tag_ptr, &
data, size);
524 "All material data not defined");
526 if (8 * attributes.size() >
sizeof(
data)) {
528 "data inconsistency, please review the number of material "
529 "properties defined");
532 memcpy(&
data, &attributes[0], 8 * attributes.size());
538 friend std::ostream &
operator<<(std::ostream &os,
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ BODYFORCESSET
block name is "BODY_FORCES"
@ MAT_ELASTICSET
block name is "MAT_ELASTIC"
@ MAT_THERMALSET
block name is "MAT_THERMAL"
@ MAT_MOISTURESET
block name is "MAT_MOISTURE"
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< 32 > CubitBCType
implementation of Data Operators for Forces and Sources
Body force data structure.
friend std::ostream & operator<<(std::ostream &os, const Block_BodyForces &e)
Print Mat_Elastic data.
MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
struct __attribute__((packed)) _data_
body forces
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
const void * getDataPtr() const
get pointer to data structure
std::size_t getSizeOfData() const
get data structure size
Arbitrary block attributes data structure.
const void * getDataPtr() const
get pointer to data structure
MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
friend std::ostream & operator<<(std::ostream &os, const BlockSetAttributes &e)
Print data.
std::size_t getSizeOfData() const
get data structure size
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
struct __attribute__((packed)) _data_
generic block attributes
Generic attribute data structure.
const CubitBCType tYpe
Type of data (f.e. MAT_ELATIC)
virtual MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)
virtual MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
unsigned int minNumberOfAtributes
minimal number of attributes
virtual const void * getDataPtr() const =0
get pointer to data structure
virtual std::size_t getSizeOfData() const =0
get data structure size
virtual const CubitBCType & getType() const
get data type
virtual unsigned int getMinMumberOfAtributes() const
get minimal number of attributes which blockset has to have
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
struct __attribute__((packed)) _data_
Hotzapler soft tissue.
const void * getDataPtr() const
get pointer to data structure
std::size_t getSizeOfData() const
get data structure size
friend std::ostream & operator<<(std::ostream &os, const Mat_Elastic_EberleinHolzapfel1 &e)
Print Mat_Elastic data.
Mat_Elastic_EberleinHolzapfel1()
Transverse Isotropic material data structure.
const void * getDataPtr() const
get pointer to data structure
std::size_t getSizeOfData() const
get data structure size
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
friend std::ostream & operator<<(std::ostream &os, const Mat_Elastic_TransIso &e)
Print Mat_Elastic_TransIso data.
struct __attribute__((packed)) _data_
transverse isotropic
Elastic material data structure.
MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
friend std::ostream & operator<<(std::ostream &os, const Mat_Elastic &e)
Print Mat_Elastic data.
std::size_t getSizeOfData() const
get data structure size
struct __attribute__((packed)) _data_
block tag data structute
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
const void * getDataPtr() const
get pointer to data structure
Linear interface data structure.
std::size_t getSizeOfData() const
get data structure size
virtual MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
friend std::ostream & operator<<(std::ostream &os, const Mat_Interf &e)
Print Mat_Interf data.
const void * getDataPtr() const
get pointer to data structure
virtual MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
struct __attribute__((packed)) _data_
inteface
moisture transport material data structure
friend std::ostream & operator<<(std::ostream &os, const Mat_Moisture &e)
Print Mat_Elastic data.
const void * getDataPtr() const
get pointer to data structure
struct __attribute__((packed)) _data_
moisture block attributes
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
std::size_t getSizeOfData() const
get data structure size
Thermal material data structure.
const void * getDataPtr() const
get pointer to data structure
MoFEMErrorCode set_data(void *tag_ptr, unsigned int size) const
set data on structure
MoFEMErrorCode fill_data(const std::vector< double > &attributes)
get data from structure
struct __attribute__((packed)) _data_
thermal block attributes
friend std::ostream & operator<<(std::ostream &os, const Mat_Thermal &e)
Print Mat_Elastic data.
std::size_t getSizeOfData() const
get data structure size