KADATH
Kadath::Equation Class Referenceabstract

Class implementing an equation. More...

#include <system_of_eqs.hpp>

Inheritance diagram for Kadath::Equation:
Kadath::Eq_bc Kadath::Eq_bc_exception Kadath::Eq_bc_order_array Kadath::Eq_first_integral Kadath::Eq_full Kadath::Eq_inside Kadath::Eq_matching Kadath::Eq_matching_exception Kadath::Eq_matching_import Kadath::Eq_matching_non_std Kadath::Eq_matching_one_side Kadath::Eq_matching_order_array Kadath::Eq_one_side Kadath::Eq_order Kadath::Eq_order_array Kadath::Eq_vel_pot

Public Member Functions

virtual ~Equation ()
 Destructor. More...
 
int get_n_cond_tot () const
 
virtual void apply (int &conte, Term_eq **res)
 Computes the terms involved in computing the residual of the equations. More...
 
virtual void export_val (int &conte, Term_eq **residuals, Array< double > &sec, int &pos_sec) const =0
 Generates the discretized errors, from the various Term_eq computed by the equation. More...
 
virtual void export_der (int &conte, Term_eq **residuals, Array< double > &sec, int &pos_sec) const =0
 Generates the discretized variations, from the various Term_eq computed by the equation. More...
 
virtual Array< int > do_nbr_conditions (const Tensor &tt) const =0
 Computes the number of conditions associated with the equation. More...
 
virtual bool take_into_account (int target) const =0
 Check whether the variation of the residual has to be taken into account when computing a given column. More...
 

Protected Member Functions

 Equation (const Domain *dom, int nd, int nope, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Constructor. More...
 

Protected Attributes

const Domaindom
 Pointer on the Domain where the equation is defined. More...
 
int ndom
 Number of the domain. More...
 
int n_ope
 Number of terms involved in the equation (one for bulk, two or more fot matching...). More...
 
MMPtr_array< Ope_eqparts
 Array of pointers on the various terms. More...
 
bool called
 Indicator checking whther the result has been computed already once. More...
 
int n_comp
 Number of components of the residual (1 for a scalar, 6 for a symmetric rank-2 tensor etc). More...
 
int n_cond_tot
 Total number of discretized equations (essentially the number of all coefficients of the residual). More...
 
Array< int > * n_cond
 Number of discretized equations, component by component. More...
 
int n_cmp_used
 Number of components used (by default the same thing as n_comp). More...
 
Array< int > ** p_cmp_used
 Array of pointer on the indices of the used components. More...
 

Friends

class System_of_eqs
 

Detailed Description

Class implementing an equation.

This is a purely abstract class that can not be instanciated.

Definition at line 1059 of file system_of_eqs.hpp.

Constructor & Destructor Documentation

◆ Equation()

Kadath::Equation::Equation ( const Domain dom,
int  nd,
int  nope,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
protected

Constructor.

Parameters
dom: Pointer on the Domain
nd: index of the Domain (consistence is not checked).
nope: number of operators.
n_cmp: number of components of eq to be considered. All the components are used of it is -1.
p_cmp: pointer on the indexes of the components to be considered. Not used of nused = -1 .

Definition at line 38 of file equation.cpp.

◆ ~Equation()

Kadath::Equation::~Equation ( )
virtual

Destructor.

Definition at line 44 of file equation.cpp.

References called, n_cond, and parts.

Member Function Documentation

◆ apply()

void Kadath::Equation::apply ( int &  conte,
Term_eq **  res 
)
virtual

Computes the terms involved in computing the residual of the equations.

Parameters
conte: current position in the array of terms.
res: array of pointers on the various terms.

Reimplemented in Kadath::Eq_matching_non_std.

Definition at line 49 of file equation.cpp.

References called, do_nbr_conditions(), Kadath::Array< T >::get_size(), n_comp, n_cond, n_cond_tot, n_ope, and parts.

◆ do_nbr_conditions()

virtual Array<int> Kadath::Equation::do_nbr_conditions ( const Tensor tt) const
pure virtual

◆ export_der()

virtual void Kadath::Equation::export_der ( int &  conte,
Term_eq **  residuals,
Array< double > &  sec,
int &  pos_sec 
) const
pure virtual

Generates the discretized variations, from the various Term_eq computed by the equation.

Basically used when computing the Jacobian of the Newton-Raphson algorithm.

Parameters
conte: current position in the array of terms.
residuals: array of pointers on the various terms.
sec: array of the discretized errors.
pos_sec: current position in sec.

Implemented in Kadath::Eq_first_integral, Kadath::Eq_matching_exception, Kadath::Eq_matching_order_array, Kadath::Eq_bc_order_array, Kadath::Eq_order_array, Kadath::Eq_one_side, Kadath::Eq_full, Kadath::Eq_matching_import, Kadath::Eq_matching_non_std, Kadath::Eq_matching_one_side, Kadath::Eq_matching, Kadath::Eq_bc, Kadath::Eq_order, Kadath::Eq_bc_exception, Kadath::Eq_vel_pot, and Kadath::Eq_inside.

◆ export_val()

virtual void Kadath::Equation::export_val ( int &  conte,
Term_eq **  residuals,
Array< double > &  sec,
int &  pos_sec 
) const
pure virtual

Generates the discretized errors, from the various Term_eq computed by the equation.

Basically used when computing the second member of the Newton-Raphson algorithm.

Parameters
conte: current position in the array of terms.
residuals: array of pointers on the various terms.
sec: array of the discretized errors.
pos_sec: current position in sec.

Implemented in Kadath::Eq_first_integral, Kadath::Eq_matching_exception, Kadath::Eq_matching_order_array, Kadath::Eq_bc_order_array, Kadath::Eq_order_array, Kadath::Eq_one_side, Kadath::Eq_full, Kadath::Eq_matching_import, Kadath::Eq_matching_non_std, Kadath::Eq_matching_one_side, Kadath::Eq_matching, Kadath::Eq_bc, Kadath::Eq_order, Kadath::Eq_bc_exception, Kadath::Eq_vel_pot, and Kadath::Eq_inside.

◆ get_n_cond_tot()

int Kadath::Equation::get_n_cond_tot ( ) const
inline
Returns
the total number of discretized conditions.

Definition at line 1095 of file system_of_eqs.hpp.

References n_cond_tot.

◆ take_into_account()

virtual bool Kadath::Equation::take_into_account ( int  target) const
pure virtual

Member Data Documentation

◆ called

bool Kadath::Equation::called
protected

Indicator checking whther the result has been computed already once.

If not the quantities n_cond must be computed.

Definition at line 1070 of file system_of_eqs.hpp.

◆ dom

const Domain* Kadath::Equation::dom
protected

Pointer on the Domain where the equation is defined.

Definition at line 1061 of file system_of_eqs.hpp.

◆ n_cmp_used

int Kadath::Equation::n_cmp_used
protected

Number of components used (by default the same thing as n_comp).

Definition at line 1075 of file system_of_eqs.hpp.

◆ n_comp

int Kadath::Equation::n_comp
protected

Number of components of the residual (1 for a scalar, 6 for a symmetric rank-2 tensor etc).

Definition at line 1071 of file system_of_eqs.hpp.

◆ n_cond

Array<int>* Kadath::Equation::n_cond
protected

Number of discretized equations, component by component.

Definition at line 1073 of file system_of_eqs.hpp.

◆ n_cond_tot

int Kadath::Equation::n_cond_tot
protected

Total number of discretized equations (essentially the number of all coefficients of the residual).

Definition at line 1072 of file system_of_eqs.hpp.

◆ n_ope

int Kadath::Equation::n_ope
protected

Number of terms involved in the equation (one for bulk, two or more fot matching...).

Definition at line 1063 of file system_of_eqs.hpp.

◆ ndom

int Kadath::Equation::ndom
protected

Number of the domain.

Definition at line 1062 of file system_of_eqs.hpp.

◆ p_cmp_used

Array<int>** Kadath::Equation::p_cmp_used
protected

Array of pointer on the indices of the used components.

Definition at line 1076 of file system_of_eqs.hpp.

◆ parts

MMPtr_array<Ope_eq> Kadath::Equation::parts
protected

Array of pointers on the various terms.

Definition at line 1064 of file system_of_eqs.hpp.


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