v0.14.0
Public Member Functions | Public Attributes | Friends | List of all members
MoFEM::Mat_Interf Struct Reference

Linear interface data structure. More...

#include <src/multi_indices/MaterialBlocks.hpp>

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

Public Member Functions

struct __attribute__ ((packed)) _data_
 inteface More...
 
std::size_t getSizeOfData () const
 get data structure size More...
 
const void * getDataPtr () const
 get pointer to data structure More...
 
 Mat_Interf ()
 
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...
 
- Public Member Functions inherited from MoFEM::GenericAttributeData
virtual const CubitBCTypegetType () const
 get data type More...
 
virtual unsigned int getMinMumberOfAtributes () const
 get minimal number of attributes which blockset has to have More...
 
 GenericAttributeData (const CubitBCType type, const unsigned int min_number_of_atributes)
 

Public Attributes

_data_ data
 
- Public Attributes inherited from MoFEM::GenericAttributeData
const CubitBCType tYpe
 Type of data (f.e. MAT_ELATIC) More...
 
unsigned int minNumberOfAtributes
 minimal number of attributes More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Mat_Interf &e)
 Print Mat_Interf data. More...
 

Detailed Description

Linear interface data structure.

Examples
cubit_bc_test.cpp.

Definition at line 430 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Interf()

MoFEM::Mat_Interf::Mat_Interf ( )
inline

Definition at line 447 of file MaterialBlocks.hpp.

448  bzero(&data, sizeof(data));
449  }

Member Function Documentation

◆ __attribute__()

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

inteface

< Elastic modulus multiplier

< Damage Coupling multiplier between normal and shear (g=sqrt(gn^2 + beta(gt1^2 + gt2^2)))

< Maximum stress of crack

< Fracture Energy

Definition at line 435 of file MaterialBlocks.hpp.

435  {
436  double alpha; ///< Elastic modulus multiplier
437  double beta; ///< Damage Coupling multiplier between normal and shear
438  ///< (g=sqrt(gn^2 + beta(gt1^2 + gt2^2)))
439  double ft; ///< Maximum stress of crack
440  double Gf; ///< Fracture Energy
441  };

◆ fill_data()

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

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented from MoFEM::GenericAttributeData.

Definition at line 451 of file MaterialBlocks.hpp.

451  {
453  // Fill data
454  if (8 * attributes.size() != sizeof(data)) {
455  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
456  "data inconsistency, please review the number of material "
457  "properties defined");
458  }
459  memcpy(&data, &attributes[0], sizeof(data));
461  }

◆ getDataPtr()

const void* MoFEM::Mat_Interf::getDataPtr ( ) const
inlinevirtual

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 445 of file MaterialBlocks.hpp.

445 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericAttributeData.

Definition at line 444 of file MaterialBlocks.hpp.

444 { return sizeof(data); }

◆ set_data()

virtual MoFEMErrorCode MoFEM::Mat_Interf::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::GenericAttributeData.

Definition at line 462 of file MaterialBlocks.hpp.

462  {
464  if (size > sizeof(data)) {
465  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
466  "data inconsistency, please review the number of material "
467  "properties defined");
468  }
469  memcpy(tag_ptr, &data, size);
471  }

Friends And Related Function Documentation

◆ operator<<

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

Print Mat_Interf data.

Definition at line 116 of file MaterialBlocks.cpp.

116  {
117  os << std::endl << "Material Properties" << std::endl;
118  os << "-------------------" << std::endl;
119  os << "Elastic module = " << e.data.alpha << std::endl << std::endl;
120  os << "Damage coupling = " << e.data.beta << std::endl << std::endl;
121  os << "Strengh = " << e.data.ft << std::endl << std::endl;
122  os << "Fracture energy = " << e.data.Gf << std::endl << std::endl;
123 
124  return os;
125 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Interf::data

Definition at line 441 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:447
MoFEM::Mat_Interf::data
_data_ data
Definition: MaterialBlocks.hpp:441
MoFEM::GenericAttributeData::GenericAttributeData
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)
Definition: MaterialBlocks.hpp:74
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MAT_INTERFSET
@ MAT_INTERFSET
Definition: definitions.h:160
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440