v0.16.3
Loading...
Searching...
No Matches
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
 
std::size_t getSizeOfData () const
 get data structure size
 
const void * getDataPtr () const
 get pointer to data structure
 
 Mat_Moisture ()
 
MoFEMErrorCode fill_data (const std::vector< double > &attributes)
 get data from structure
 
- Public Member Functions inherited from MoFEM::GenericAttributeData
virtual MoFEMErrorCode set_data (void *tag_ptr, unsigned int size) const
 set data on structure
 
virtual const CubitBCType & getType () const
 get data type
 
virtual unsigned int getMinMumberOfAtributes () const
 get minimal number of attributes which blockset has to have
 
 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)
 
unsigned int minNumberOfAtributes
 minimal number of attributes
 

Friends

std::ostream & operator<< (std::ostream &os, const Mat_Moisture &e)
 Print Mat_Elastic data.
 

Detailed Description

moisture transport material data structure

Definition at line 263 of file MaterialBlocks.hpp.

Constructor & Destructor Documentation

◆ Mat_Moisture()

MoFEM::Mat_Moisture::Mat_Moisture ( )
inline

Definition at line 285 of file MaterialBlocks.hpp.

286 bzero(&data, sizeof(data));
287 }
@ MAT_MOISTURESET
block name is "MAT_MOISTURE"
GenericAttributeData(const CubitBCType type, const unsigned int min_number_of_atributes)

Member Function Documentation

◆ __attribute__()

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

moisture block attributes

< moisture diffusivity

< Viscosity of water

< Permeability of material

Definition at line 256 of file MaterialBlocks.hpp.

268 {
269 double Diffusivity; ///< moisture diffusivity
270 double Viscosity; ///< Viscosity of water
271 double Permeability; ///< Permeability of material
272 double User3; // User attribute 3
273 double User4; // User attribute 4
274 double User5; // User attribute 5
275 double User6; // User attribute 6
276 double User7; // User attribute 7
277 double User8; // User attribute 8
278 double User9; // User attribute 9
279 };

◆ fill_data()

MoFEMErrorCode MoFEM::Mat_Moisture::fill_data ( const std::vector< double > &  attributes)
inlinevirtual

get data from structure

Parameters
attributesvector of doubles
Returns
error code

Reimplemented from MoFEM::GenericAttributeData.

Definition at line 289 of file MaterialBlocks.hpp.

289 {
291 if (attributes.size() < minNumberOfAtributes) {
292 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
293 "moisture diffusivity is not defined. (top tip: check number of "
294 "MOISTURE block atributes)");
295 }
296 if (8 * attributes.size() > sizeof(data)) {
297 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
298 "data inconsistency, please review the number of material "
299 "properties defined");
300 }
301 bzero(&data, sizeof(data));
302 memcpy(&data, &attributes[0], 8 * attributes.size());
304 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
unsigned int minNumberOfAtributes
minimal number of attributes

◆ getDataPtr()

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

get pointer to data structure

Returns
pointer

Implements MoFEM::GenericAttributeData.

Definition at line 283 of file MaterialBlocks.hpp.

283{ return &data; }

◆ getSizeOfData()

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

get data structure size

Returns
size of structure in bytes

Implements MoFEM::GenericAttributeData.

Definition at line 282 of file MaterialBlocks.hpp.

282{ return sizeof(data); }

Friends And Related Symbol Documentation

◆ operator<<

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

Print Mat_Elastic data.

Definition at line 72 of file MaterialBlocks.cpp.

72 {
73 os << std::endl << "Material Properties" << std::endl;
74 os << "-------------------" << std::endl;
75 os << "Diffusivity = " << e.data.Diffusivity << std::endl;
76 os << "Viscosity = " << e.data.Viscosity << std::endl;
77 os << "Permeability = " << e.data.Permeability << std::endl;
78 os << "User attribute 3 = " << e.data.User3 << std::endl;
79 os << "User attribute 4 = " << e.data.User4 << std::endl;
80 os << "User attribute 5 = " << e.data.User5 << std::endl;
81 os << "User attribute 6 = " << e.data.User6 << std::endl;
82 os << "User attribute 7 = " << e.data.User7 << std::endl;
83 os << "User attribute 8 = " << e.data.User8 << std::endl << std::endl;
84 return os;
85}

Member Data Documentation

◆ data

_data_ MoFEM::Mat_Moisture::data

Definition at line 281 of file MaterialBlocks.hpp.


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