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

Transverse Isotropic material data structure. More...

#include <src/multi_indices/MaterialBlocks.hpp>

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

Public Member Functions

struct __attribute__ ((packed)) _data_
 transverse isotropic More...
 
std::size_t getSizeOfData () const
 get data structure size More...
 
const void * getDataPtr () const
 get pointer to data structure More...
 
 Mat_Elastic_TransIso ()
 
MoFEMErrorCode fill_data (const std::vector< double > &attributes)
 get data from structure More...
 
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_Elastic_TransIso &e)
 Print Mat_Elastic_TransIso data. More...
 

Detailed Description

Transverse Isotropic material data structure.

Examples:
cubit_bc_test.cpp.

Definition at line 388 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Elastic_TransIso()

MoFEM::Mat_Elastic_TransIso::Mat_Elastic_TransIso ( )

Definition at line 405 of file MaterialBlocks.hpp.

405  :
407  bzero(&data,sizeof(data));
408  }
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)
block name is "MAT_ELASTIC"
Definition: definitions.h:219

Member Function Documentation

◆ __attribute__()

struct MoFEM::Mat_Elastic_TransIso::__attribute__ ( (packed)  )

transverse isotropic

Definition at line 393 of file MaterialBlocks.hpp.

393  {
394  double Youngp; ///< Young's modulus in xy plane (Ep)
395  double Youngz; ///< Young's modulus in z-direction (Ez)
396  double Poissonp; ///< Poisson's ratio in xy plane (vp)
397  double Poissonpz; ///< Poisson's ratio in z-direction (vpz)
398  double Shearzp; ///< Shear modulus in z-direction (Gzp)
399  };

◆ fill_data()

MoFEMErrorCode MoFEM::Mat_Elastic_TransIso::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 410 of file MaterialBlocks.hpp.

410  {
412  //Fill data
413  if(attributes.size()<minNumberOfAtributes) {
414  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"All material data not defined");
415  }
416  if(8*attributes.size()!=sizeof(data)) {
417  SETERRQ(PETSC_COMM_SELF,1,"data inconsistency, please review the number of material properties defined");
418  }
419  memcpy(&data, &attributes[0], sizeof(data));
420  bzero(&data,sizeof(data));
421  memcpy(&data, &attributes[0],8*attributes.size());
422 
424  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
unsigned int minNumberOfAtributes
minimal number of attributes

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 403 of file MaterialBlocks.hpp.

403 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericAttributeData.

Definition at line 402 of file MaterialBlocks.hpp.

402 { return sizeof(data); }

◆ set_data()

MoFEMErrorCode MoFEM::Mat_Elastic_TransIso::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 425 of file MaterialBlocks.hpp.

425  {
427  if(size>sizeof(data)) {
428  SETERRQ(
429  PETSC_COMM_SELF,
431  "data inconsistency, please review the number of material properties defined"
432  );
433  }
434  memcpy(tag_ptr,&data,size);
436  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

Friends And Related Function Documentation

◆ operator<<

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

Print Mat_Elastic_TransIso data.

Definition at line 655 of file BCMultiIndices.cpp.

655  {
656  os << std::endl << "Material Properties" << std::endl;
657  os << "-------------------" << std::endl;
658  os << "Young's modulus in xy plane (Ep) = " << e.data.Youngp << std::endl;
659  os << "Young's modulus in z-direction (Ez) = " << e.data.Youngz << std::endl;
660  os << "Poisson's ratio in xy plane (vp) = " << e.data.Poissonp << std::endl;
661  os << "Poisson's ratio in z-direction (vpz) = " << e.data.Poissonpz << std::endl;
662  os << "Shear modulus in z-direction (Gzp) = " << e.data.Shearzp << std::endl << std::endl;
663  return os;
664 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Elastic_TransIso::data

Definition at line 399 of file MaterialBlocks.hpp.


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