v0.9.0
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 276 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Moisture()

MoFEM::Mat_Moisture::Mat_Moisture ( )

Definition at line 298 of file MaterialBlocks.hpp.

299  bzero(&data, sizeof(data));
300  }
block name is "MAT_MOISTURE"
Definition: definitions.h:226
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 281 of file MaterialBlocks.hpp.

281  {
282  double Diffusivity; ///< moisture diffusivity
283  double Viscosity; ///< Viscosity of water
284  double Permeability; ///< Permeability of material
285  double User3; // User attribute 3
286  double User4; // User attribute 4
287  double User5; // User attribute 5
288  double User6; // User attribute 6
289  double User7; // User attribute 7
290  double User8; // User attribute 8
291  double User9; // User attribute 9
292  };

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

302  {
304  if (attributes.size() < minNumberOfAtributes) {
305  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
306  "moisture diffusivity is not defined. (top tip: check number of "
307  "MOISTURE block atributes)");
308  }
309  if (8 * attributes.size() > sizeof(data)) {
310  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
311  "data inconsistency, please review the number of material "
312  "properties defined");
313  }
314  bzero(&data, sizeof(data));
315  memcpy(&data, &attributes[0], 8 * attributes.size());
317  }
#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_Moisture::getDataPtr ( ) const
virtual

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 296 of file MaterialBlocks.hpp.

296 { 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 295 of file MaterialBlocks.hpp.

295 { 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 644 of file BCMultiIndices.cpp.

644  {
645  os << std::endl << "Material Properties" << std::endl;
646  os << "-------------------" << std::endl;
647  os << "Diffusivity = " << e.data.Diffusivity << std::endl;
648  os << "Viscosity = " << e.data.Viscosity << std::endl;
649  os << "Permeability = " << e.data.Permeability << std::endl;
650  os << "User attribute 3 = " << e.data.User3 << std::endl;
651  os << "User attribute 4 = " << e.data.User4 << std::endl;
652  os << "User attribute 5 = " << e.data.User5 << std::endl;
653  os << "User attribute 6 = " << e.data.User6 << std::endl;
654  os << "User attribute 7 = " << e.data.User7 << std::endl;
655  os << "User attribute 8 = " << e.data.User8 << std::endl << std::endl;
656  return os;
657 }

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Moisture::data

Definition at line 292 of file MaterialBlocks.hpp.


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