v0.8.23
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 443 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Interf()

MoFEM::Mat_Interf::Mat_Interf ( )

Definition at line 460 of file MaterialBlocks.hpp.

461  bzero(&data, sizeof(data));
462  }
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)

Member Function Documentation

◆ __attribute__()

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

inteface

Definition at line 448 of file MaterialBlocks.hpp.

448  {
449  double alpha; ///< Elastic modulus multiplier
450  double beta; ///< Damage Coupling multiplier between normal and shear
451  ///< (g=sqrt(gn^2 + beta(gt1^2 + gt2^2)))
452  double ft; ///< Maximum stress of crack
453  double Gf; ///< Fracture Energy
454  };

◆ fill_data()

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

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented from MoFEM::GenericAttributeData.

Definition at line 464 of file MaterialBlocks.hpp.

464  {
466  // Fill data
467  if (8 * attributes.size() != sizeof(data)) {
468  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
469  "data inconsistency, please review the number of material "
470  "properties defined");
471  }
472  memcpy(&data, &attributes[0], sizeof(data));
474  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 458 of file MaterialBlocks.hpp.

458 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericAttributeData.

Definition at line 457 of file MaterialBlocks.hpp.

457 { return sizeof(data); }

◆ set_data()

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

Definition at line 475 of file MaterialBlocks.hpp.

475  {
477  if (size > sizeof(data)) {
478  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
479  "data inconsistency, please review the number of material "
480  "properties defined");
481  }
482  memcpy(tag_ptr, &data, size);
484  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

Friends And Related Function Documentation

◆ operator<<

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

Print Mat_Interf data.

Definition at line 688 of file BCMultiIndices.cpp.

688  {
689  os << std::endl << "Material Properties" << std::endl;
690  os << "-------------------" << std::endl;
691  os << "Elastic module = " << e.data.alpha << std::endl << std::endl;
692  os << "Damage coupling = " << e.data.beta << std::endl << std::endl;
693  os << "Strengh = " << e.data.ft << std::endl << std::endl;
694  os << "Fracture energy = " << e.data.Gf << std::endl << std::endl;
695 
696  return os;
697 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Interf::data

Definition at line 454 of file MaterialBlocks.hpp.


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