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

Constructor & Destructor Documentation

◆ Mat_Elastic_TransIso()

MoFEM::Mat_Elastic_TransIso::Mat_Elastic_TransIso ( )

Definition at line 401 of file MaterialBlocks.hpp.

402  bzero(&data, sizeof(data));
403  }
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)
block name is "MAT_ELASTIC"
Definition: definitions.h:222

Member Function Documentation

◆ __attribute__()

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

transverse isotropic

Definition at line 389 of file MaterialBlocks.hpp.

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

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

405  {
407  // Fill data
408  if (attributes.size() < minNumberOfAtributes) {
409  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
410  "All material data not defined");
411  }
412  if (8 * attributes.size() != sizeof(data)) {
413  SETERRQ(PETSC_COMM_SELF, 1,
414  "data inconsistency, please review the number of material "
415  "properties defined");
416  }
417  memcpy(&data, &attributes[0], sizeof(data));
418  bzero(&data, sizeof(data));
419  memcpy(&data, &attributes[0], 8 * attributes.size());
420 
422  }
#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
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 399 of file MaterialBlocks.hpp.

399 { 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 398 of file MaterialBlocks.hpp.

398 { 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 423 of file MaterialBlocks.hpp.

423  {
425  if (size > sizeof(data)) {
426  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
427  "data inconsistency, please review the number of material "
428  "properties defined");
429  }
430  memcpy(tag_ptr, &data, size);
432  }
#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_Elastic_TransIso e 
)
friend

Print Mat_Elastic_TransIso data.

Definition at line 674 of file BCMultiIndices.cpp.

674  {
675  os << std::endl << "Material Properties" << std::endl;
676  os << "-------------------" << std::endl;
677  os << "Young's modulus in xy plane (Ep) = " << e.data.Youngp << std::endl;
678  os << "Young's modulus in z-direction (Ez) = " << e.data.Youngz << std::endl;
679  os << "Poisson's ratio in xy plane (vp) = " << e.data.Poissonp
680  << std::endl;
681  os << "Poisson's ratio in z-direction (vpz) = " << e.data.Poissonpz
682  << std::endl;
683  os << "Shear modulus in z-direction (Gzp) = " << e.data.Shearzp << std::endl
684  << std::endl;
685  return os;
686 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Elastic_TransIso::data

Definition at line 395 of file MaterialBlocks.hpp.


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