Flow123d
jenkins-Flow123d-windows32-release-multijob-51
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
flow123d
src
reaction
pade_approximant.hh
Go to the documentation of this file.
1
/*
2
* pade_approximant.h
3
*
4
* Created on: Apr 2, 2012
5
* Author: lukas
6
*/
7
8
#ifndef PADE_APPROXIMANT_H_
9
#define PADE_APPROXIMANT_H_
10
11
#include <
input/input_type.hh
>
12
#include "armadillo"
13
14
using namespace
arma;
15
16
class
Mesh
;
17
class
LinearReaction
;
18
19
class
PadeApproximant
:
public
LinearReaction
20
{
21
public
:
22
/**
23
* Input record for class PadeApproximant.
24
*/
25
static
Input::Type::Record
input_type
;
26
/**
27
* Input record which defines particular decay step.
28
*/
29
static
Input::Type::Record
input_type_one_decay_substep
;
30
31
/// Constructor.
32
PadeApproximant
(
Mesh
&mesh,
Input::Record
in_rec);
33
34
/// Destructor.
35
~
PadeApproximant
(
void
);
36
37
void
initialize()
override
;
38
void
zero_time_step()
override
;
39
40
protected
:
41
/**
42
* Evaluates Pade approximant from Reaction_matrix.
43
*/
44
void
modify_reaction_matrix(
void
)
override
;
45
46
/// Evaluates nominator and denominator coeficients of PadeApproximant for exponencial function.
47
/** @param nominator_degree is the degree of polynomial in the nominator
48
* @param denominator_degree is the degree of polynomial in the denominator
49
* @param nominator_coefs is the vector of coeficients of the polynomial in the nominator
50
* @param denominator_coefs is the vector of coeficients of the polynomial in the denominator
51
*/
52
void
compute_exp_coefs(
unsigned
int
nominator_degree,
unsigned
int
denominator_degree,
53
std::vector<double>
&nominator_coefs,
std::vector<double>
&denominator_coefs);
54
55
/// Evaluates the matrix polynomial by Horner scheme.
56
/** @param polynomial_matrix is the output matrix
57
* @param reaction_matrix is the reaction matrix (with elements -kt)
58
* @param coefs is the vector of coeficients of the polynomial
59
*/
60
void
evaluate_matrix_polynomial(mat &polynomial_matrix,
61
const
mat &reaction_matrix,
62
const
std::vector<double>
&coefs);
63
64
int
nominator_degree_
;
///< Degree of the polynomial in the nominator.
65
int
denominator_degree_
;
///< Degree of the polynomial in the denominator.
66
};
67
68
#endif // PADE_APPROXIMANT_H_
PadeApproximant
Definition:
pade_approximant.hh:19
PadeApproximant::nominator_degree_
int nominator_degree_
Degree of the polynomial in the nominator.
Definition:
pade_approximant.hh:64
PadeApproximant::input_type
static Input::Type::Record input_type
Definition:
pade_approximant.hh:25
Mesh
Definition:
mesh.h:108
std::vector< double >
PadeApproximant::denominator_degree_
int denominator_degree_
Degree of the polynomial in the denominator.
Definition:
pade_approximant.hh:65
input_type.hh
Input::Record
Accessor to the data with type Type::Record.
Definition:
accessors.hh:308
PadeApproximant::input_type_one_decay_substep
static Input::Type::Record input_type_one_decay_substep
Definition:
pade_approximant.hh:29
Input::Type::Record
Record type proxy class.
Definition:
type_record.hh:161
LinearReaction
Definition:
linear_reaction.hh:20
Generated on Mon Oct 20 2014 14:40:49 for Flow123d by
1.8.7