Flow123d
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Linear_reaction Class Reference

#include <linear_reaction.hh>

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

Public Member Functions

 Linear_reaction (Mesh &init_mesh, Input::Record in_rec)
 
 ~Linear_reaction (void)
 
void zero_time_step () override
 
virtual double ** compute_reaction (double **concentrations, int loc_el) override
 
void update_solution (void) override
 
virtual double ** modify_reaction_matrix (void)
 
- Public Member Functions inherited from ReactionTerm
 ReactionTerm (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~ReactionTerm (void)
 Destructor. More...
 
virtual void output_data (void)
 Output method. More...
 
void choose_next_time (void) override
 Disable changes in TimeGovernor by empty method. More...
 
ReactionTermnames (const std::vector< string > &names)
 Sets the names of substances considered in transport. More...
 
ReactionTermoutput_stream (OutputTime &ostream)
 Sets the output stream which is given from transport class. More...
 
ReactionTermconcentration_matrix (double **concentration, Distribution *conc_distr, int *el_4_loc, int *row_4_el)
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void initialize ()
 Initialize fields. More...
 
virtual void set_time_upper_constraint (double dt)
 
virtual void set_time_lower_constraint (double dt)
 
TimeGovernor const & time ()
 
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 Attributes

static Input::Type::Record input_type
 
static Input::Type::Record input_type_one_decay_substep
 
- Static Public Attributes inherited from ReactionTerm
static Input::Type::AbstractRecord input_type = AbstractRecord("ReactionTerm", "Equation for reading information about simple chemical reactions.")
 
static Input::Type::Record input_type_output_record
 Specification of the output record. More...
 

Protected Member Functions

double ** allocate_reaction_matrix (void)
 
 Linear_reaction ()
 
virtual void init_from_input (Input::Record in_rec) override
 
void print_reaction_matrix (void)
 
void print_indices (int dec_nr, int n_subst)
 
void release_reaction_matrix ()
 
void print_half_lives (int n_subst)
 
unsigned int find_subst_name (const std::string &name)
 
- Protected Member Functions inherited from ReactionTerm
virtual void output_vector_gather (void)
 

Protected Attributes

double ** reaction_matrix
 
double * prev_conc
 
vector< double > half_lives
 
vector< vector< unsigned int > > substance_ids
 
std::vector< std::vector
< double > > 
bifurcation
 
- Protected Attributes inherited from ReactionTerm
double ** concentration_matrix_
 
int * el_4_loc
 Indices of elements belonging to local dofs. More...
 
int * row_4_el
 Indices of rows belonging to elements. More...
 
Distributiondistribution
 Pointer to reference to distribution of elements between processors. More...
 
vector< string > names_
 Names belonging to substances. More...
 
OutputTimeoutput_stream_
 Pointer to a transport output stream. 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_
 
FieldSeteq_data_
 

Detailed Description

Definition at line 20 of file linear_reaction.hh.

Constructor & Destructor Documentation

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

Constructor with parameter for initialization of a new declared class member TODO: parameter description

Definition at line 44 of file linear_reaction.cc.

Linear_reaction::~Linear_reaction ( void  )

Destructor.

Definition at line 50 of file linear_reaction.cc.

Linear_reaction::Linear_reaction ( )
protected

This method disables to use constructor without parameters.

Member Function Documentation

double ** Linear_reaction::allocate_reaction_matrix ( void  )
protected

Definition at line 71 of file linear_reaction.cc.

Here is the caller graph for this function:

double ** Linear_reaction::compute_reaction ( double **  concentrations,
int  loc_el 
)
overridevirtual

For simulation of chemical reaction in just one element either inside of MOBILE or IMMOBILE pores.

Reimplemented from ReactionTerm.

Reimplemented in Pade_approximant.

Definition at line 161 of file linear_reaction.cc.

Here is the caller graph for this function:

unsigned int Linear_reaction::find_subst_name ( const std::string &  name)
protected

Finds a position of a string in specified array.

Definition at line 318 of file linear_reaction.cc.

Here is the caller graph for this function:

void Linear_reaction::init_from_input ( Input::Record  in_rec)
overrideprotectedvirtual

Initialize data from record in input file. It is intended to use in ascendants.

Reimplemented from ReactionTerm.

Definition at line 196 of file linear_reaction.cc.

Here is the caller graph for this function:

double ** Linear_reaction::modify_reaction_matrix ( void  )
virtual

This method modificates reaction matrix as described in ini-file a single section [Decay_i] or [FoReact_i]. It is used when bifurcation is switched off.

Reimplemented in Pade_approximant.

Definition at line 138 of file linear_reaction.cc.

Here is the caller graph for this function:

void Linear_reaction::print_half_lives ( int  n_subst)
protected

For printing (nr_of_isotopes - 1) doubles containing half-lives belonging to particular isotopes on screen.

Definition at line 182 of file linear_reaction.cc.

void Linear_reaction::print_indices ( int  dec_nr,
int  n_subst 
)
protected

For printing nr_of_isotopes identifies of isotopes in a current decay chain.

void Linear_reaction::print_reaction_matrix ( void  )
protected

For control printing of a matrix describing simple chemical raections.

Definition at line 298 of file linear_reaction.cc.

Here is the caller graph for this function:

void Linear_reaction::release_reaction_matrix ( void  )
protected

Following method releases reaction matrix to make it possible to set a new time step for chemistry.

Definition at line 281 of file linear_reaction.cc.

Here is the caller graph for this function:

void Linear_reaction::update_solution ( void  )
overridevirtual

Prepared to compute simple chemical reactions inside all of considered elements. It calls compute_reaction(...) for all the elements controled by concrete processor, when the computation is paralelized.

Reimplemented from EquationBase.

Definition at line 254 of file linear_reaction.cc.

void Linear_reaction::zero_time_step ( )
overridevirtual

Initialization of the solution in the zero time. There is lot of things that can not be done in the constructor since we have not fully initialized fields yet. Fields coming from coupling has to be set after the constructor and before zero_time_step.

Reimplemented from EquationBase.

Reimplemented in Pade_approximant.

Definition at line 58 of file linear_reaction.cc.

Here is the caller graph for this function:

Member Data Documentation

std::vector<std::vector<double> > Linear_reaction::bifurcation
protected

Two dimensional array contains mass percentage of every single decay bifurcation on every single row.

Definition at line 107 of file linear_reaction.hh.

vector<double> Linear_reaction::half_lives
protected

Sequence of (nr_of_isotopes - 1) doubles containing half-lives belonging to particular isotopes.

Definition at line 99 of file linear_reaction.hh.

Record Linear_reaction::input_type
static
Initial value:
= Record("LinearReactions", "Information for a decision about the way to simulate radioactive decay.")
.derive_from( ReactionTerm::input_type )
.declare_key("decays", Array( Linear_reaction::input_type_one_decay_substep ), Default::obligatory(),
"Description of particular decay chain substeps.")

Definition at line 26 of file linear_reaction.hh.

Record Linear_reaction::input_type_one_decay_substep
static
Initial value:
= Record("Substep", "Equation for reading information about radioactive decays.")
.declare_key("parent", String(), Default::obligatory(),
"Identifier of an isotope.")
.declare_key("half_life", Double(), Default::optional(),
"Half life of the parent substance.")
.declare_key("kinetic", Double(), Default::optional(),
"Kinetic constants describing first order reactions.")
.declare_key("products", Array(String()), Default::obligatory(),
"Identifies isotopes which decays parental atom to.")
.declare_key("branch_ratios", Array(Double()), Default("1.0"),
"Decay chain branching percentage.")

Definition at line 30 of file linear_reaction.hh.

double* Linear_reaction::prev_conc
protected

Pointer to reference previous concentration array used in compute_reaction().

Definition at line 95 of file linear_reaction.hh.

double** Linear_reaction::reaction_matrix
protected

Small (nr_of_species x nr_of_species) square matrix for realization of radioactive decay and first order reactions simulation.

Definition at line 91 of file linear_reaction.hh.

vector< vector <unsigned int> > Linear_reaction::substance_ids
protected

Sequence of integers describing an order of isotopes in decay chain or first order reaction.

Definition at line 103 of file linear_reaction.hh.


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