Flow123d  DF_patch_fe_data_tables-3df4116
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
FirstOrderReaction Class Reference

Class implements the linear reactions. More...

#include <first_order_reaction.hh>

Inheritance diagram for FirstOrderReaction:
Inheritance graph
[legend]
Collaboration diagram for FirstOrderReaction:
Collaboration graph
[legend]

Public Types

typedef ReactionTerm FactoryBaseType
 
- Public Types inherited from ReactionTerm
typedef std::vector< std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > > FieldFEScalarVec
 

Public Member Functions

 DECLARE_EXCEPTION (ExcTooManyReactants,<< "More than one reactant is not available at the moment.\n")
 
 FirstOrderReaction (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~FirstOrderReaction (void)
 Destructor. More...
 
- Public Member Functions inherited from FirstOrderReactionBase
 FirstOrderReactionBase (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~FirstOrderReactionBase (void)
 Destructor. More...
 
void initialize () override
 Prepares the object to usage. More...
 
void zero_time_step () override
 Moves the model to zero time. More...
 
void update_solution (void) override
 Updates the solution. More...
 
- Public Member Functions inherited from ReactionTerm
 TYPEDEF_ERR_INFO (EI_Substance, std::string)
 
 TYPEDEF_ERR_INFO (EI_Model, std::string)
 
 DECLARE_INPUT_EXCEPTION (ExcUnknownSubstance,<< "Unknown substance name: "<< EI_Substance::qval)
 
 DECLARE_INPUT_EXCEPTION (ExcWrongDescendantModel,<< "Impossible descendant model: "<< EI_Model::qval)
 
 ReactionTerm (Mesh &init_mesh, Input::Record in_rec)
 
 ~ReactionTerm (void)
 Destructor. More...
 
ReactionTermsubstances (SubstanceList &substances)
 Sets the names of substances considered in transport. More...
 
ReactionTermoutput_stream (std::shared_ptr< OutputTime > ostream)
 Sets the output stream which is given from transport class. More...
 
ReactionTermconcentration_fields (FieldFEScalarVec &conc_mobile)
 
virtual void output_data (void) override
 Output method. More...
 
void choose_next_time (void) override
 Disable changes in TimeGovernor by empty method. More...
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void set_time_upper_constraint (double dt, std::string message)
 
virtual void set_time_lower_constraint (double dt, std::string message)
 
TimeGovernortime ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
virtual double solved_time ()
 
Meshmesh ()
 
std::shared_ptr< Balancebalance () const
 
TimeMark::Type mark_type ()
 
FieldSeteq_fieldset ()
 
std::shared_ptr< FieldSeteq_fieldset_ptr ()
 
void init_user_fields (Input::Array user_fields, FieldSet &output_fields)
 

Static Public Member Functions

static const Input::Type::Recordget_input_type ()
 Input record for class FirstOrderReaction. More...
 
static const Input::Type::Recordget_input_type_single_reaction ()
 Input record which defines particular reaction. More...
 
static const Input::Type::Recordget_input_type_reactant ()
 Input record for a reactant of a reaction. More...
 
static const Input::Type::Recordget_input_type_product ()
 Input record for a product of a reaction. More...
 
- Static Public Member Functions inherited from ReactionTerm
static Input::Type::Abstractit_abstract_term ()
 
static Input::Type::Abstractit_abstract_mobile_term ()
 
static Input::Type::Abstractit_abstract_immobile_term ()
 
static Input::Type::Abstractit_abstract_reaction ()
 
- Static Public Member Functions inherited from EquationBase
static Input::Type::Recordrecord_template ()
 Template Record with common keys for derived equations. More...
 
static Input::Type::Recorduser_fields_template (std::string equation_name)
 Template Record with common key user_fields for derived equations. More...
 

Protected Member Functions

void assemble_ode_matrix (void) override
 Implements the assembly of the system matrix of the ODEs. More...
 
void initialize_from_input () override
 Initializes private members of sorption from the input record. More...
 
- Protected Member Functions inherited from FirstOrderReactionBase
virtual void compute_reaction (const DHCellAccessor &dh_cell) override
 Computes the reaction on a specified element. More...
 
unsigned int find_subst_name (const std::string &name)
 
- Protected Member Functions inherited from ReactionTerm

Protected Attributes

std::vector< double > reaction_rates_
 Vector of reaction rates of the transported substances. More...
 
- Protected Attributes inherited from FirstOrderReactionBase
std::vector< std::vector< unsigned int > > substance_ids_
 
std::vector< std::vector< double > > bifurcation_
 
unsigned int n_substances_
 Number of all transported substances. It is the dimension of the reaction matrix. More...
 
arma::mat reaction_matrix_
 Reaction matrix. More...
 
arma::vec prev_conc_
 Column vector storing previous concetrations on an element. More...
 
arma::mat molar_matrix_
 Diagonal matrix with molar masses of substances. More...
 
arma::mat molar_mat_inverse_
 Inverse of molar_matrix_. More...
 
std::shared_ptr< LinearODESolverlinear_ode_solver_
 
- Protected Attributes inherited from ReactionTerm
std::shared_ptr< OutputTimeoutput_stream_
 Pointer to a transport output stream. More...
 
std::shared_ptr< EqFieldseq_fields_base_
 Equation data - all fields needs in assembly class. More...
 
std::shared_ptr< EqDataeq_data_base_
 Equation data - all data needs in assembly class. More...
 
- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
std::shared_ptr< FieldSeteq_fieldset_
 
std::shared_ptr< Balancebalance_
 object for calculation and writing the mass balance to file. More...
 

Static Private Attributes

static const int registrar
 Registrar of class to factory. More...
 

Detailed Description

Class implements the linear reactions.

This class implements the user interface for linear reactions and prepares the reaction matrix. Common features are inherited from the FirstOrderReactionBase class.

Definition at line 39 of file first_order_reaction.hh.

Member Typedef Documentation

◆ FactoryBaseType

Definition at line 42 of file first_order_reaction.hh.

Constructor & Destructor Documentation

◆ FirstOrderReaction()

FirstOrderReaction::FirstOrderReaction ( Mesh init_mesh,
Input::Record  in_rec 
)

Constructor.

Definition at line 83 of file first_order_reaction.cc.

◆ ~FirstOrderReaction()

FirstOrderReaction::~FirstOrderReaction ( void  )

Destructor.

Definition at line 88 of file first_order_reaction.cc.

Member Function Documentation

◆ assemble_ode_matrix()

void FirstOrderReaction::assemble_ode_matrix ( void  )
overrideprotectedvirtual

Implements the assembly of the system matrix of the ODEs.

Implements FirstOrderReactionBase.

Definition at line 92 of file first_order_reaction.cc.

◆ DECLARE_EXCEPTION()

FirstOrderReaction::DECLARE_EXCEPTION ( ExcTooManyReactants  ,
<< "More than one reactant is not available at the moment.\n"   
)

◆ get_input_type()

const Record & FirstOrderReaction::get_input_type ( )
static

Input record for class FirstOrderReaction.

Definition at line 67 of file first_order_reaction.cc.

◆ get_input_type_product()

const Record & FirstOrderReaction::get_input_type_product ( )
static

Input record for a product of a reaction.

Definition at line 41 of file first_order_reaction.cc.

Here is the caller graph for this function:

◆ get_input_type_reactant()

const Record & FirstOrderReaction::get_input_type_reactant ( )
static

Input record for a reactant of a reaction.

Definition at line 32 of file first_order_reaction.cc.

Here is the caller graph for this function:

◆ get_input_type_single_reaction()

const Record & FirstOrderReaction::get_input_type_single_reaction ( )
static

Input record which defines particular reaction.

Definition at line 55 of file first_order_reaction.cc.

Here is the caller graph for this function:

◆ initialize_from_input()

void FirstOrderReaction::initialize_from_input ( )
overrideprotectedvirtual

Initializes private members of sorption from the input record.

Implements FirstOrderReactionBase.

Definition at line 111 of file first_order_reaction.cc.

Member Data Documentation

◆ reaction_rates_

std::vector<double> FirstOrderReaction::reaction_rates_
protected

Vector of reaction rates of the transported substances.

Definition at line 65 of file first_order_reaction.hh.

◆ registrar

const int FirstOrderReaction::registrar
staticprivate
Initial value:
=
Input::register_class< FirstOrderReaction, Mesh &, Input::Record >("FirstOrderReaction") +
static const Input::Type::Record & get_input_type()
Input record for class FirstOrderReaction.
unsigned int size() const
Returns number of keys in the Record.
Definition: type_record.hh:602

Registrar of class to factory.

Definition at line 69 of file first_order_reaction.hh.


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