v0.8.4
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 447 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Interf()

MoFEM::Mat_Interf::Mat_Interf ( )

Definition at line 463 of file MaterialBlocks.hpp.

463  :
465  bzero(&data,sizeof(data));
466  }
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 452 of file MaterialBlocks.hpp.

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

◆ 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 468 of file MaterialBlocks.hpp.

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

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 461 of file MaterialBlocks.hpp.

461 { 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 460 of file MaterialBlocks.hpp.

460 { 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 480 of file MaterialBlocks.hpp.

480  {
482  if(size>sizeof(data)) {
483  SETERRQ(
484  PETSC_COMM_SELF,
486  "data inconsistency, please review the number of material properties defined"
487  );
488  }
489  memcpy(tag_ptr,&data,size);
491  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:522
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:528

Friends And Related Function Documentation

◆ operator<<

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

Print Mat_Interf data.

Definition at line 666 of file BCMultiIndices.cpp.

666  {
667  os << std::endl << "Material Properties" << std::endl;
668  os << "-------------------" << std::endl;
669  os << "Elastic module = " << e.data.alpha << std::endl << std::endl;
670  os << "Damage coupling = " << e.data.beta << std::endl << std::endl;
671  os << "Strengh = " << e.data.ft << std::endl << std::endl;
672  os << "Fracture energy = " << e.data.Gf << std::endl << std::endl;
673 
674  return os;
675 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Interf::data

Definition at line 457 of file MaterialBlocks.hpp.


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