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

moisture transport material data structure More...

#include <src/multi_indices/MaterialBlocks.hpp>

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

Public Member Functions

struct __attribute__ ((packed)) _data_
 moisture block attributes More...
 
std::size_t getSizeOfData () const
 get data structure size More...
 
const void * getDataPtr () const
 get pointer to data structure More...
 
 Mat_Moisture ()
 
MoFEMErrorCode fill_data (const std::vector< double > &attributes)
 get data from structure More...
 
- Public Member Functions inherited from MoFEM::GenericAttributeData
virtual MoFEMErrorCode set_data (void *tag_ptr, unsigned int size) const
 set data on structure More...
 
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_Moisture &e)
 Print Mat_Elastic data. More...
 

Detailed Description

moisture transport material data structure

Definition at line 283 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Moisture()

MoFEM::Mat_Moisture::Mat_Moisture ( )

Definition at line 305 of file MaterialBlocks.hpp.

305  :
307  bzero(&data,sizeof(data));
308  }
block name is "MAT_MOISTURE"
Definition: definitions.h:240
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)

Member Function Documentation

◆ __attribute__()

struct MoFEM::Mat_Moisture::__attribute__ ( (packed)  )

moisture block attributes

Definition at line 288 of file MaterialBlocks.hpp.

288  {
289  double Diffusivity; ///< moisture diffusivity
290  double Viscosity; ///< Viscosity of water
291  double Permeability; ///< Permeability of material
292  double User3; // User attribute 3
293  double User4; // User attribute 4
294  double User5; // User attribute 5
295  double User6; // User attribute 6
296  double User7; // User attribute 7
297  double User8; // User attribute 8
298  double User9; // User attribute 9
299  };

◆ fill_data()

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

310  {
312  if(attributes.size()<minNumberOfAtributes) {
313  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"moisture diffusivity is not defined. (top tip: check number of MOISTURE block atributes)");
314  }
315  if(8*attributes.size()>sizeof(data)) {
316  SETERRQ(PETSC_COMM_SELF,MOFEM_DATA_INCONSISTENCY,"data inconsistency, please review the number of material properties defined");
317  }
318  bzero(&data,sizeof(data));
319  memcpy(&data, &attributes[0],8*attributes.size());
321  }
#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
unsigned int minNumberOfAtributes
minimal number of attributes

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 303 of file MaterialBlocks.hpp.

303 { return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericAttributeData.

Definition at line 302 of file MaterialBlocks.hpp.

302 { return sizeof(data); }

Friends And Related Function Documentation

◆ operator<<

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

Print Mat_Elastic data.

Definition at line 622 of file BCMultiIndices.cpp.

622  {
623  os << std::endl << "Material Properties" << std::endl;
624  os << "-------------------" << std::endl;
625  os << "Diffusivity = " << e.data.Diffusivity << std::endl;
626  os << "Viscosity = " << e.data.Viscosity << std::endl;
627  os << "Permeability = " << e.data.Permeability << std::endl;
628  os << "User attribute 3 = " << e.data.User3 << std::endl;
629  os << "User attribute 4 = " << e.data.User4 << std::endl;
630  os << "User attribute 5 = " << e.data.User5 << std::endl;
631  os << "User attribute 6 = " << e.data.User6 << std::endl;
632  os << "User attribute 7 = " << e.data.User7 << std::endl;
633  os << "User attribute 8 = " << e.data.User8 << std::endl << std::endl;
634  return os;
635 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Moisture::data

Definition at line 299 of file MaterialBlocks.hpp.


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