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

#include <pade_approximant.hh>

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

Public Member Functions

 PadeApproximant (Mesh &mesh, Input::Record in_rec)
 Constructor. More...
 
 ~PadeApproximant (void)
 Destructor. More...
 
void initialize () override
 Prepares the object to usage. More...
 
void zero_time_step () override
 
- Public Member Functions inherited from LinearReaction
 LinearReaction (Mesh &init_mesh, Input::Record in_rec)
 Constructor. More...
 
 ~LinearReaction (void)
 Destructor. More...
 
void update_solution (void) override
 Updates the solution. More...
 
- 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 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 LinearReaction
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

void modify_reaction_matrix (void) override
 
void compute_exp_coefs (unsigned int nominator_degree, unsigned int denominator_degree, std::vector< double > &nominator_coefs, std::vector< double > &denominator_coefs)
 Evaluates nominator and denominator coeficients of PadeApproximant for exponencial function. More...
 
void evaluate_matrix_polynomial (mat &polynomial_matrix, const mat &reaction_matrix, const std::vector< double > &coefs)
 Evaluates the matrix polynomial by Horner scheme. More...
 
- Protected Member Functions inherited from LinearReaction
virtual double ** compute_reaction (double **concentrations, int loc_el) override
 
void reset_reaction_matrix ()
 Resets reaction matrix as eye matrix. More...
 
void initialize_from_input ()
 Initializes private members of sorption from the input record. More...
 
void print_reaction_matrix (void)
 
void print_indices (int dec_nr, int n_subst)
 
void print_half_lives ()
 
unsigned int find_subst_name (const std::string &name)
 
- Protected Member Functions inherited from ReactionTerm
virtual void output_vector_gather (void)
 

Protected Attributes

int nominator_degree_
 Degree of the polynomial in the nominator. More...
 
int denominator_degree_
 Degree of the polynomial in the denominator. More...
 
- Protected Attributes inherited from LinearReaction
std::vector< std::vector
< double > > 
reaction_matrix_
 
std::vector< double > prev_conc_
 
std::vector< double > half_lives_
 
std::vector< std::vector
< unsigned int > > 
substance_ids_
 
std::vector< std::vector
< double > > 
bifurcation_
 
unsigned int n_substances_
 
- 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 19 of file pade_approximant.hh.

Constructor & Destructor Documentation

PadeApproximant::PadeApproximant ( Mesh mesh,
Input::Record  in_rec 
)

Constructor.

Definition at line 38 of file pade_approximant.cc.

PadeApproximant::~PadeApproximant ( void  )

Destructor.

Definition at line 43 of file pade_approximant.cc.

Member Function Documentation

void PadeApproximant::compute_exp_coefs ( unsigned int  nominator_degree,
unsigned int  denominator_degree,
std::vector< double > &  nominator_coefs,
std::vector< double > &  denominator_coefs 
)
protected

Evaluates nominator and denominator coeficients of PadeApproximant for exponencial function.

Parameters
nominator_degreeis the degree of polynomial in the nominator
denominator_degreeis the degree of polynomial in the denominator
nominator_coefsis the vector of coeficients of the polynomial in the nominator
denominator_coefsis the vector of coeficients of the polynomial in the denominator

Definition at line 113 of file pade_approximant.cc.

Here is the caller graph for this function:

void PadeApproximant::evaluate_matrix_polynomial ( mat &  polynomial_matrix,
const mat &  reaction_matrix,
const std::vector< double > &  coefs 
)
protected

Evaluates the matrix polynomial by Horner scheme.

Parameters
polynomial_matrixis the output matrix
reaction_matrixis the reaction matrix (with elements -kt)
coefsis the vector of coeficients of the polynomial

Horner scheme for evaluating polynomial a0 + [a1 + [a2 + [a3 +...]*R(t)]*R(t)]*R(t)

Definition at line 142 of file pade_approximant.cc.

Here is the caller graph for this function:

void PadeApproximant::initialize ( )
overridevirtual

Prepares the object to usage.

Allocating memory, reading input, initialization of fields.

Reimplemented from LinearReaction.

Definition at line 47 of file pade_approximant.cc.

void PadeApproximant::modify_reaction_matrix ( void  )
overrideprotectedvirtual

Evaluates Pade approximant from Reaction_matrix.

Reimplemented from LinearReaction.

Definition at line 64 of file pade_approximant.cc.

void PadeApproximant::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 LinearReaction.

Definition at line 59 of file pade_approximant.cc.

Member Data Documentation

int PadeApproximant::denominator_degree_
protected

Degree of the polynomial in the denominator.

Definition at line 65 of file pade_approximant.hh.

Record PadeApproximant::input_type
static
Initial value:
= Record("PadeApproximant", "Abstract record with an information about pade approximant parameters.")
.derive_from( ReactionTerm::input_type )
.declare_key("decays", Array( PadeApproximant::input_type_one_decay_substep ), Default::obligatory(),
"Description of particular decay chain substeps.")
.declare_key("nom_pol_deg", Integer(), Default("2"),
"Polynomial degree of the nominator of Pade approximant.")
.declare_key("den_pol_deg", Integer(), Default("2"),
"Polynomial degree of the nominator of Pade approximant")

Input record for class PadeApproximant.

Definition at line 25 of file pade_approximant.hh.

Record PadeApproximant::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.")

Input record which defines particular decay step.

Definition at line 29 of file pade_approximant.hh.

int PadeApproximant::nominator_degree_
protected

Degree of the polynomial in the nominator.

Definition at line 64 of file pade_approximant.hh.


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