Flow123d  jenkins-Flow123d-windows32-release-multijob-51
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ReactionTerm Class Referenceabstract

#include <reaction.hh>

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

Public Member Functions

 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...
 
Setters
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 zero_time_step ()
 
virtual void update_solution ()
 
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::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

virtual void output_vector_gather (void)
 
virtual double ** compute_reaction (double **concentrations, int loc_el)=0
 

Protected Attributes

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 17 of file reaction.hh.

Constructor & Destructor Documentation

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 18 of file reaction.cc.

ReactionTerm::~ReactionTerm ( void  )

Destructor.

Definition at line 29 of file reaction.cc.

Member Function Documentation

void ReactionTerm::choose_next_time ( void  )
overridevirtual

Disable changes in TimeGovernor by empty method.

Reimplemented from EquationBase.

Definition at line 41 of file reaction.cc.

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 LinearReaction.

Definition at line 34 of file reaction.cc.

ReactionTerm& ReactionTerm::concentration_matrix ( double **  concentration,
Distribution conc_distr,
int *  el_4_loc,
int *  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 57 of file reaction.hh.

Here is the caller graph for this function:

ReactionTerm& ReactionTerm::names ( const std::vector< string > &  names)
inline

Sets the names of substances considered in transport.

Definition at line 46 of file reaction.hh.

Here is the caller graph for this function:

virtual void ReactionTerm::output_data ( void  )
inlinevirtual

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 75 of file reaction.hh.

Here is the caller graph for this function:

ReactionTerm& ReactionTerm::output_stream ( OutputTime ostream)
inline

Sets the output stream which is given from transport class.

Definition at line 50 of file reaction.hh.

Here is the caller graph for this function:

virtual void ReactionTerm::output_vector_gather ( void  )
inlineprotectedvirtual

Communicate parallel concentration vectors into sequential output vector.

Reimplemented in SorptionBase, and DualPorosity.

Definition at line 84 of file reaction.hh.

Member Data Documentation

double** ReactionTerm::concentration_matrix_
protected

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

Definition at line 95 of file reaction.hh.

Distribution* ReactionTerm::distribution_
protected

Pointer to reference to distribution of elements between processors.

Definition at line 103 of file reaction.hh.

int* ReactionTerm::el_4_loc_
protected

Indices of elements belonging to local dofs.

Definition at line 98 of file reaction.hh.

AbstractRecord ReactionTerm::input_type = AbstractRecord("ReactionTerm", "Equation for reading information about simple chemical reactions.")
static

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

Definition at line 24 of file reaction.hh.

Record ReactionTerm::input_type_output_record
static
Initial value:
= Record("ReactionTermOutput", "Output setting for transport equations.")
.declare_key("output_stream", OutputTime::input_type, Default::obligatory(),
"Parameters of output stream.")

Specification of the output record.

Need not to be used by all reaction models, but they should allow output of similar fields.

Definition at line 31 of file reaction.hh.

vector<string> ReactionTerm::names_
protected

Names belonging to substances.

Must be same as in the transport.

Definition at line 109 of file reaction.hh.

OutputTime* ReactionTerm::output_stream_
protected

Pointer to a transport output stream.

Definition at line 112 of file reaction.hh.

int* ReactionTerm::row_4_el_
protected

Indices of rows belonging to elements.

Definition at line 100 of file reaction.hh.


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