Flow123d  release_3.0.0-968-gc87a28e79
Public Member Functions | Static Public Member Functions | List of all members
ReactionTerm Class Referenceabstract

#include <reaction_term.hh>

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

Public Member Functions

 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)
 Constructor. More...
 
 ~ReactionTerm (void)
 Destructor. More...
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual void initialize ()
 
virtual void zero_time_step ()
 
virtual ~EquationBase ()
 
virtual void update_solution ()
 
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 ()
 
double solved_time ()
 
Meshmesh ()
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 
virtual void get_solution_vector (double *&vector, unsigned int &size)
 
virtual void get_parallel_solution_vector (Vec &vector)
 

Static Public Member Functions

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 ()
 

Setters

double ** concentration_matrix_
 
LongIdxel_4_loc_
 Indices of elements belonging to local dofs. More...
 
LongIdxrow_4_el_
 Indices of rows belonging to elements. More...
 
Distributiondistribution_
 Pointer to reference to distribution of elements between processors. More...
 
SubstanceList substances_
 Names belonging to substances. More...
 
std::shared_ptr< OutputTimeoutput_stream_
 Pointer to a transport output stream. More...
 
std::shared_ptr< DOFHandlerMultiDimdof_handler_
 Pointer to DOF handler used through the reaction tree. 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...
 
virtual bool evaluate_time_constraint (double &time_constraint)=0
 Computes a constraint for time step. More...
 
ReactionTermconcentration_matrix (double **concentration, Distribution *conc_distr, LongIdx *el_4_loc, LongIdx *row_4_el)
 
virtual void output_data (void) override
 Output method. More...
 
void choose_next_time (void) override
 Disable changes in TimeGovernor by empty method. More...
 
ReactionTermset_dh (std::shared_ptr< DOFHandlerMultiDim > dof_handler)
 Sets the pointer to DOF handler (shared through the reaction tree) More...
 
virtual double ** compute_reaction (double **concentrations, int loc_el)=0
 

Additional Inherited Members

- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
FieldSeteq_data_
 
std::shared_ptr< Balancebalance_
 object for calculation and writing the mass balance to file. More...
 

Detailed Description

Definition at line 44 of file reaction_term.hh.

Constructor & Destructor Documentation

◆ ReactionTerm()

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

Constructor.

Parameters
init_meshis the reference to the computational mesh
in_recis the input record

Definition at line 51 of file reaction_term.cc.

Here is the caller graph for this function:

◆ ~ReactionTerm()

ReactionTerm::~ReactionTerm ( void  )

Destructor.

Definition at line 61 of file reaction_term.cc.

Member Function Documentation

◆ choose_next_time()

void ReactionTerm::choose_next_time ( void  )
overridevirtual

Disable changes in TimeGovernor by empty method.

Reimplemented from EquationBase.

Definition at line 68 of file reaction_term.cc.

◆ compute_reaction()

virtual double** ReactionTerm::compute_reaction ( double **  concentrations,
int  loc_el 
)
protectedpure virtual

Computation of reaction term on a single element. Inputs should be loc_el and local copies of concentrations of the element, which is then returned.

Implemented in SorptionBase, DualPorosity, and FirstOrderReactionBase.

◆ concentration_matrix()

ReactionTerm& ReactionTerm::concentration_matrix ( double **  concentration,
Distribution conc_distr,
LongIdx el_4_loc,
LongIdx row_4_el 
)
inline

Sets the pointer to concentration matrix for the mobile zone, all substances and on all elements (given by transport).

Definition at line 87 of file reaction_term.hh.

◆ DECLARE_INPUT_EXCEPTION() [1/2]

ReactionTerm::DECLARE_INPUT_EXCEPTION ( ExcUnknownSubstance  ,
<< "Unknown substance name: "<< EI_Substance::qval   
)

◆ DECLARE_INPUT_EXCEPTION() [2/2]

ReactionTerm::DECLARE_INPUT_EXCEPTION ( ExcWrongDescendantModel  ,
<< "Impossible descendant model: "<< EI_Model::qval   
)

◆ evaluate_time_constraint()

virtual bool ReactionTerm::evaluate_time_constraint ( double &  time_constraint)
pure virtual

Computes a constraint for time step.

Implemented in SorptionBase, DualPorosity, and FirstOrderReactionBase.

◆ it_abstract_immobile_term()

Abstract & ReactionTerm::it_abstract_immobile_term ( )
static

Definition at line 37 of file reaction_term.cc.

Here is the caller graph for this function:

◆ it_abstract_mobile_term()

Abstract & ReactionTerm::it_abstract_mobile_term ( )
static

Definition at line 31 of file reaction_term.cc.

Here is the caller graph for this function:

◆ it_abstract_reaction()

Abstract & ReactionTerm::it_abstract_reaction ( )
static

Definition at line 43 of file reaction_term.cc.

Here is the caller graph for this function:

◆ it_abstract_term()

Abstract & ReactionTerm::it_abstract_term ( )
static

Static variable for definition of common input record in reaction term.

Definition at line 25 of file reaction_term.cc.

Here is the caller graph for this function:

◆ output_data()

virtual void ReactionTerm::output_data ( void  )
inlineoverridevirtual

Output method.

Some reaction models have their own data to output (sorption, dual porosity)

  • this is where it must be reimplemented. On the other hand, some do not have (linear reaction, pade approximant)
  • that is why it is not pure virtual.

Reimplemented from EquationBase.

Reimplemented in SorptionBase, and DualPorosity.

Definition at line 105 of file reaction_term.hh.

◆ output_stream()

ReactionTerm& ReactionTerm::output_stream ( std::shared_ptr< OutputTime ostream)
inline

Sets the output stream which is given from transport class.

Definition at line 77 of file reaction_term.hh.

◆ set_dh()

ReactionTerm& ReactionTerm::set_dh ( std::shared_ptr< DOFHandlerMultiDim dof_handler)
inline

Sets the pointer to DOF handler (shared through the reaction tree)

Definition at line 111 of file reaction_term.hh.

◆ substances()

ReactionTerm& ReactionTerm::substances ( SubstanceList substances)
inline

Sets the names of substances considered in transport.

Definition at line 73 of file reaction_term.hh.

◆ TYPEDEF_ERR_INFO() [1/2]

ReactionTerm::TYPEDEF_ERR_INFO ( EI_Model  ,
std::string   
)

◆ TYPEDEF_ERR_INFO() [2/2]

ReactionTerm::TYPEDEF_ERR_INFO ( EI_Substance  ,
std::string   
)

Member Data Documentation

◆ concentration_matrix_

double** ReactionTerm::concentration_matrix_
protected

Pointer to two-dimensional array[species][elements] containing concentrations.

Definition at line 127 of file reaction_term.hh.

◆ distribution_

Distribution* ReactionTerm::distribution_
protected

Pointer to reference to distribution of elements between processors.

Definition at line 135 of file reaction_term.hh.

◆ dof_handler_

std::shared_ptr<DOFHandlerMultiDim> ReactionTerm::dof_handler_
protected

Pointer to DOF handler used through the reaction tree.

Definition at line 147 of file reaction_term.hh.

◆ el_4_loc_

LongIdx* ReactionTerm::el_4_loc_
protected

Indices of elements belonging to local dofs.

Definition at line 130 of file reaction_term.hh.

◆ output_stream_

std::shared_ptr<OutputTime> ReactionTerm::output_stream_
protected

Pointer to a transport output stream.

Definition at line 144 of file reaction_term.hh.

◆ row_4_el_

LongIdx* ReactionTerm::row_4_el_
protected

Indices of rows belonging to elements.

Definition at line 132 of file reaction_term.hh.

◆ substances_

SubstanceList ReactionTerm::substances_
protected

Names belonging to substances.

Must be same as in the transport.

Definition at line 141 of file reaction_term.hh.


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