Equation Class Template Reference
[General Purpose Equations]
#include <Equation.h>

Detailed Description
template<class T_, size_t NEN_, size_t NEE_, size_t NSN_, size_t NSE_>
class OFELI::Equation< T_, NEN_, NEE_, NSN_, NSE_ >
Abstract class for all equation classes.
Template Arguments :
- T_ : data type (double, float, ...)
- NEN_ : Number of element nodes
- NEE_ : Number of element equations
- NSN_ : Number of side nodes
- NSN_ : Number of side equations
Public Member Functions | |
| T_ * | A () |
| Return element matrix as a C-array. | |
| T_ * | b () |
| Return element right-hand side as a C-array. | |
| void | DiagBC (int dof_type=NODE_DOF, int dof=0) |
| Update element matrix to impose bc by diagonalization technique. | |
| LocalMatrix< T_, NEE_, NEE_ > & | EA () |
| Return element matrix as a LocalMatrix instance. | |
| LocalVect< T_, NEE_ > & | Eb () |
| Return element right-hand side as a LocalVect instance. | |
| void | ElementVector (const Vect< T_ > &b, int dof=0, int dof_type=NODE_DOF) |
| Localize Element Vector. | |
| LocalVect< T_, NEE_ > & | Ep () |
| Return element matrix as a C-array. | |
| Equation (const Side *sd, const Vect< T_ > &u, const double &time=0) | |
| Constructor using side data, solution at previous time step and time value. | |
| Equation (const Element *el, const Vect< T_ > &u, const double &time=0) | |
| Constructor using element data, solution at previous time step and time value. | |
| Equation (const Side *sd) | |
| Constructor using Side data. | |
| Equation (const Element *el) | |
| Constructor using Element data. | |
| Equation (class Mesh &mesh, Vect< T_ > &b, double &t, double &ts) | |
| Constructor with mesh instance, matrix and right-hand side. | |
| Equation (class Mesh &mesh) | |
| Constructor with mesh instance. | |
| Equation () | |
| Default constructor. | |
| LinearSolver< T_ > & | getLinearSolver () |
| Return reference to linear solver instance. | |
| size_t | getNbEq () const |
| Return number of element equations. | |
| size_t | getNbNodes () const |
| Return number of element nodes. | |
| void | LocalNodeVector (AbsVect< T_ > *b) |
| Localize Element Vector from a NodeVect instance. | |
| T_ * | Prev () |
| Return element matrix as a C-array. | |
| LocalMatrix< T_, NSE_, NSE_ > & | SA () |
| Return side matrix as a LocalMatrix instance. | |
| void | setInitialSolution (const Vect< T_ > &u) |
| Set initial solution (previous time step). | |
| double | setMaterialProperty (const string &exp, const string &prop) |
| Define a material property by an algebraic expression. | |
| void | setMesh (class Mesh &m) |
| Define mesh and renumber DOFs after removing imposed ones. | |
| void | SideVector (const Vect< T_ > &b) |
| Localize Side Vector. | |
| void | updateBC (const Vect< T_ > &bc) |
| Update Right-Hand side by taking into account essential boundary conditions. | |
| virtual | ~Equation () |
| Destructor. | |
Protected Member Functions | |
| void | Init (const Side *sd) |
| Set side arrays to zero. | |
| void | Init (const Element *el) |
| Set element arrays to zero. | |
Constructor & Destructor Documentation
| Equation | ( | ) |
Default constructor.
Constructs an "empty" equation
Constructor using Element data.
- Parameters:
-
el [in] Pointer to Element
References Element::getLabel().
Constructor using element data, solution at previous time step and time value.
- Parameters:
-
[in] el Pointer to element [in] u Vect instance containing solution at previous time step [in] time Time value (Default value is 0)
References Element::getLabel().
Constructor using side data, solution at previous time step and time value.
- Parameters:
-
[in] sd Pointer to side [in] u Vect instance containing solution at previous time step [in] time Time value (Default value is 0)
References Side::getLabel().
Member Function Documentation
| void DiagBC | ( | int | dof_type = NODE_DOF, |
|
| int | dof = 0 | |||
| ) |
Update element matrix to impose bc by diagonalization technique.
- Parameters:
-
[in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Side::getCode(), Node::getCode(), and Node::getLabel().
| void ElementVector | ( | const Vect< T_ > & | b, | |
| int | dof = 0, |
|||
| int | dof_type = NODE_DOF | |||
| ) |
Localize Element Vector.
- Parameters:
-
[in] b Global vector to be localized [in] dof_type DOF type option. To choose among the enumerated values: - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
[in] dof DOF setting: - = 0, All DOFs are taken into account [ default ]
- != 0, Only DOF No. dof is handled in the sustem
References Equation::b(), Side::getDOF(), Node::getDOF(), Side::getNbDOF(), and Node::getNbDOF().
| void LocalNodeVector | ( | AbsVect< T_ > * | b | ) |
Localize Element Vector from a NodeVect instance.
- Parameters:
-
[in] b Pointer to global vector to be localized. The resulting local vector can be accessed by attribute ePrev. This member function is to be used if a constructor with Element was invoked.
References Node::getLabel(), and Node::getNbDOF().
| double setMaterialProperty | ( | const string & | exp, | |
| const string & | prop | |||
| ) |
Define a material property by an algebraic expression.
- Parameters:
-
[in] exp Algebraic expression [in] prop Property name
- Return values:
-
ret Return value in expression evaluation: - ret=0, Normal evaluation
- ret!=0, An error message is displayed.
Referenced by Equa_Therm< double, 4, 4, 3, 3 >::Conduc(), Equa_Solid< double, 4, 8, 2, 4 >::Density(), Equa_Fluid< double, 4, 8, 2, 4 >::Density(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricConductivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::ElectricResistivity(), Equa_Electromagnetics< complex< double >, 3, 3, 2, 2 >::MagneticPermeability(), Equa_Solid< double, 4, 8, 2, 4 >::Poisson(), Equa_Therm< double, 4, 4, 3, 3 >::RhoCp(), Equa_Fluid< double, 4, 8, 2, 4 >::ThermalExpansion(), Equa_Fluid< double, 4, 8, 2, 4 >::Viscosity(), and Equa_Solid< double, 4, 8, 2, 4 >::Young().
| void SideVector | ( | const Vect< T_ > & | b | ) |
Localize Side Vector.
- Parameters:
-
[in] b Global vector to be localized - = NODE_DOF, DOFs are supported by nodes [ default ]
- = ELEMENT_DOF, DOFs are supported by elements
- = SIDE_DOF, DOFs are supported by sides
References Equation::b(), Node::getDOF(), and Node::getNbDOF().
| void updateBC | ( | const Vect< T_ > & | bc | ) |
Update Right-Hand side by taking into account essential boundary conditions.
Init solution.
- Parameters:
-
[in] bc Vector that contains imposed values at all DOFs