Flow123d  jenkins-Flow123d-linux-release-multijob-198
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
Substance Class Reference

#include <substance.hh>

Collaboration diagram for Substance:
Collaboration graph
[legend]

Public Member Functions

 Substance ()
 Default constructor. More...
 
 Substance (const Input::Record &in_rec)
 Initialization from input tree. More...
 
std::string name () const
 Getter for substance name. More...
 
double molar_mass () const
 Getter for molar mass. More...
 

Static Public Attributes

static Input::Type::Record input_type
 Input type for a substance. More...
 

Protected Attributes

std::string name_
 Name of a chemical substance. More...
 
double molar_mass_
 Molar mass [kg/mol] of the substance. More...
 

Friends

class SubstanceList
 

Detailed Description

Class Substance is a storage for data which are specific for a (chemical) substance. The purpose is to easily share them among equations (e.g. between transport and reactions).

Definition at line 44 of file substance.hh.

Constructor & Destructor Documentation

Substance::Substance ( )

Default constructor.

Definition at line 50 of file substance.cc.

Substance::Substance ( const Input::Record in_rec)

Initialization from input tree.

Definition at line 56 of file substance.cc.

Member Function Documentation

double Substance::molar_mass ( ) const
inline

Getter for molar mass.

Definition at line 58 of file substance.hh.

std::string Substance::name ( ) const
inline

Getter for substance name.

Definition at line 55 of file substance.hh.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class SubstanceList
friend

Definition at line 72 of file substance.hh.

Member Data Documentation

Record Substance::input_type
static
Initial value:
= Record("Substance", "Chemical substance.")
.declare_key("name", String(), Default::obligatory(), "Name of the substance.")
.declare_key("molar_mass", Double(0), Default("1"), "Molar mass of the substance [kg/mol].")
.allow_auto_conversion("name")

Input type for a substance.

Definition at line 62 of file substance.hh.

double Substance::molar_mass_
protected

Molar mass [kg/mol] of the substance.

Definition at line 70 of file substance.hh.

std::string Substance::name_
protected

Name of a chemical substance.

Definition at line 67 of file substance.hh.


The documentation for this class was generated from the following files: