KADATH
Kadath::System_of_eqs Class Reference

Class used to describe and solve a system of equations. More...

#include <system_of_eqs.hpp>

Inheritance diagram for Kadath::System_of_eqs:

Classes

struct  Output_data
 Sylvain'stuff. More...
 

Public Types

enum  : bool { DO_NOT_TRANSPOSE = false , TRANSPOSE = true }
 Dummy names for the purpose of better readability. More...
 

Public Member Functions

 System_of_eqs (const Space &so)
 Standard constructor nothing is done. More...
 
 System_of_eqs (const Space &so, int i, int j)
 Constructor, nothing is done. More...
 
 System_of_eqs (const Space &so, int i)
 Constructor, nothing is done. More...
 
 System_of_eqs (const System_of_eqs &)=delete
 Constructor by copy. More...
 
 ~System_of_eqs () override
 Destructor. More...
 
const Metricget_met () const
 Returns a pointer on the Metric. More...
 
std::ostream & get_output_stream () const
 Returns the default output stream reference. More...
 
void set_output_stream (std::ostream &new_output_stream)
 Sets a new output stream reference. More...
 
const Spaceget_space () const
 Returns the space. More...
 
int get_dom_min () const
 Returns the smallest index of the domains. More...
 
int get_dom_max () const
 Returns the highest index of the domains. More...
 
int get_nbr_conditions () const
 Returns the number of conditions. More...
 
int get_nbr_unknowns () const
 Returns the number of unknowns. More...
 
unsigned get_niter () const
 Returns the current iteration number. More...
 
int get_mpi_proc_rank () const
 Returns the MPI rank. More...
 
int get_mpi_world_size () const
 Returns the total number of MPI processes. More...
 
Term_eqgive_term_double (int which, int dd) const
 Returns a pointer on a Term_eq corresponding to an unknown number. More...
 
Term_eqgive_term (int which, int dd) const
 Returns a pointer on a Term_eq corresponding to an unknown field. More...
 
Term_eqgive_cst (int which, int dd) const
 Returns a pointer on a Term_eq corresponding to a constant. More...
 
Term_eqgive_cst_hard (double xx, int dd) const
 Returns a pointer on a Term_eq corresponding to a constant generated on the fly. More...
 
Ope_defgive_def (int i) const
 Returns a pointer on a definition (better to use give_val_def if one wants to access the result of some definition). More...
 
Ope_def_globalgive_def_glob (int i) const
 Returns a pointer on a global definition. More...
 
Tensor give_val_def (const char *name) const
 Gives the result of a definition. More...
 
virtual void add_var (const char *name, double &var)
 Addition of a variable (number case) More...
 
virtual void add_var (const char *name, Tensor &var)
 Addition of a variable (field case) More...
 
virtual void add_cst (const char *name, double cst)
 Addition of a constant (number case) More...
 
virtual void add_cst (const char *name, const Tensor &cst)
 Addition of a constant (field case) More...
 
virtual void add_def (const char *name)
 Addition of a definition. More...
 
virtual void add_def (int dd, const char *name)
 Addition of a definition in a single domain. More...
 
virtual void add_def_global (const char *name)
 Addition of a global definition. More...
 
virtual void add_def_global (int dd, const char *name)
 Addition of a global definition in a single domain. More...
 
virtual void add_ope (const char *name, Term_eq(*pope)(const Term_eq &, Param *), Param *par)
 Addition of a user defined operator (one argument version) More...
 
virtual void add_ope (const char *name, Term_eq(*pope)(const Term_eq &, const Term_eq &, Param *), Param *par)
 Addition of a user defined operator (two arguments version) More...
 
bool isvar_double (const char *target, int &which) const
 Check if a string is an unknown (number). More...
 
bool isvar (const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
 Check if a string is an unknown field. More...
 
bool iscst (const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
 Check if a string is a constant (can required indices manipulation and/or inner contraction). More...
 
bool isdef (int dd, const char *target, int &which, int &valence, char *&name_ind, Array< int > *&type_ind) const
 Check if a string is a definition (can required indices manipulation and/or inner contraction). More...
 
bool isdef_glob (int dd, const char *target, int &which) const
 Check if a string is a global definition. More...
 
bool is_ope_minus (const char *input, char *output) const
 Checks if a string contains the operator minus. More...
 
bool isdouble (const char *input, double &output) const
 Checks if a string is a double. More...
 
bool ismet (const char *input, char *&name_ind, int &type_ind) const
 Checks if a string is a metric. More...
 
bool ismet (const char *input) const
 Checks if a string is a metric (without arguments, probably deprecated) More...
 
bool ischristo (const char *input, char *&name_ind, Array< int > *&type_ind) const
 Checks if a string represents the Christoffel symbols. More...
 
bool isriemann (const char *input, char *&name_ind, Array< int > *&type_ind) const
 Checks if a string represents the Riemann tensor. More...
 
bool isricci_tensor (const char *input, char *&name_ind, Array< int > *&type_ind) const
 Checks if a string represents the Ricci tensor. More...
 
bool isricci_scalar (const char *input, char *&name_ind, Array< int > *&type_ind) const
 Checks if a string represents the Ricci scalar. More...
 
bool is_ope_bin (const char *input, char *p1, char *p2, char symb) const
 Checks if a string represents an operator of the type "a + b". More...
 
bool is_ope_uni (const char *input, char *p1, const char *nameope) const
 Checks if a string represents an operator of the type "ope(a)". More...
 
bool is_ope_uni (const char *input, char *p1, char *p2, const char *nameope) const
 Checks if a string represents an operator of the type "ope(a,b)". More...
 
bool is_ope_deriv (const char *input, char *p1, int &typeder, char &nameind) const
 Checks if a string represents the covariant derivative. More...
 
bool is_ope_deriv_flat (const char *input, char *p1, int &typeder, char &nameind) const
 Checks if a string represents the flat covariant derivative. More...
 
bool is_ope_deriv_background (const char *input, char *p1, int &typeder, char &nameind) const
 Checks if a string represents the covariant derivative wrt a background metric. More...
 
bool is_ope_pow (const char *input, char *p1, int &expo) const
 Checks if a string represents the power of something (like "a^2"). More...
 
bool is_ope_partial (const char *input, char *p1, char &nameind) const
 Checks if a string represents the partial derivative (like "partial_i a") More...
 
bool is_ope_der_var (int dd, const char *input, char *p1, int &which) const
 Checks if a string represents the derivative wrt a numerical coordinate of a given Domain (like "a,T") More...
 
Ope_eqgive_ope (int dom, const char *name, int bb=0) const
 Function that reads a string and returns a pointer on the generated Ope_eq. More...
 
virtual void add_eq_inside (int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation to be solved inside a domain (assumed to be second order). More...
 
virtual void add_eq_inside (int dom, const char *eq, const List_comp &list)
 Addition of an equation to be solved inside a domain (assumed to be second order). More...
 
virtual void add_eq_order (int dom, int order, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation to be solved inside a domain (of arbitrary order). More...
 
virtual void add_eq_order (int dom, int order, const char *eq, const List_comp &list)
 Addition of an equation to be solved inside a domain (of arbitrary order). More...
 
virtual void add_eq_bc (int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation describing a boundary condition. More...
 
virtual void add_eq_bc (int dom, int bb, const char *eq, const List_comp &list)
 Addition of an equation describing a boundary condition. More...
 
virtual void add_eq_matching (int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation describing a matching condition between two domains (standard setting) More...
 
virtual void add_eq_matching (int dom, int bb, const char *eq, const List_comp &list)
 Addition of an equation describing a matching condition between two domains (standard setting) More...
 
virtual void add_eq_matching_one_side (int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation describing a matching condition between two domains (specialized function for time evolution). More...
 
virtual void add_eq_matching_one_side (int dom, int bb, const char *eq, const List_comp &list)
 Addition of an equation describing a matching condition between two domains (specialized function for time evolution). More...
 
virtual void add_eq_matching_non_std (int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation describing a matching condition between domains. More...
 
virtual void add_eq_matching_non_std (int dom, int bb, const char *eq, const List_comp &list)
 Addition of an equation describing a matching condition between domains. More...
 
virtual void add_eq_matching_import (int dom, int bb, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation describing a matching condition between domains using the ("import" setting) The matching is performed in the configuration space. More...
 
virtual void add_eq_matching_import (int dom, int bb, const char *eq, const List_comp &list)
 Addition of an equation describing a matching condition between domains using the ("import" setting) The matching is performed in the configuration space. More...
 
virtual void add_eq_full (int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation to be solved inside a domain (assumed to be zeroth order i.e. More...
 
virtual void add_eq_full (int dom, const char *eq, const List_comp &list)
 Addition of an equation to be solved inside a domain (assumed to be zeroth order i.e. More...
 
virtual void add_eq_one_side (int dom, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation to be solved inside a domain (assumed to be first order). More...
 
virtual void add_eq_one_side (int dom, const char *eq, const List_comp &list)
 Addition of an equation to be solved inside a domain (assumed to be first order). More...
 
virtual void add_eq_matching_exception (int dom, int bb, const char *eq, const Param &par, const char *eq_exception, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of a matching condition, except for one coefficient where an alternative condition is enforced (highly specialized usage). More...
 
virtual void add_eq_matching_exception (int dom, int bb, const char *eq, const Param &par, const char *eq_exception, const List_comp &list)
 Addition of a matching condition, except for one coefficient where an alternative condition is enforced (highly specialized usage). More...
 
virtual void add_eq_order (int dom, const Array< int > &orders, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation to be solved inside a domain of arbitrary order. More...
 
virtual void add_eq_order (int dom, const Array< int > &orders, const char *eq, const List_comp &list)
 Addition of an equation to be solved inside a domain of arbitrary order. More...
 
virtual void add_eq_vel_pot (int dom, int order, const char *eq, const char *const_part)
 Addition of an equation for the velocity potential of irrotational binaries. More...
 
void add_eq_bc_exception (int dom, int bound, const char *eq, const char *const_part)
 Addition of an boundary equation with an exception for $l=m=0$. More...
 
virtual void add_eq_bc (int dom, int bb, const Array< int > &orders, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation a boundary condition of arbitrary orders. More...
 
virtual void add_eq_bc (int dom, int bb, const Array< int > &orders, const char *eq, const List_comp &list)
 Addition of an equation a boundary condition of arbitrary orders. More...
 
virtual void add_eq_matching (int dom, int bb, const Array< int > &orders, const char *eq, int n_cmp=-1, Array< int > **p_cmp=nullptr)
 Addition of an equation a matching condition of arbitrary orders. More...
 
virtual void add_eq_matching (int dom, int bb, const Array< int > &orders, const char *eq, const List_comp &list)
 Addition of an equation a matching condition of arbitrary orders. More...
 
virtual void add_eq_first_integral (int dom_min, int dom_max, const char *integ_part, const char *const_part)
 Addition of an equation representing a first integral. More...
 
virtual void add_eq_mode (int dom, int bb, const char *eq, const Index &pos_cf, double val)
 Addition of an equation prescribing the value of one coefficient of a scalar field, on a given boundary. More...
 
virtual void add_eq_val_mode (int dom, const char *eq, const Index &pos_cf, double val)
 Addition of an equation prescribing the value of one coefficient of a scalar field. More...
 
virtual void add_eq_val (int dom, const char *eq, const Index &pos)
 Addition of an equation saying that the value of a field must be zero at one collocation point. More...
 
virtual void add_eq_point (int dom, const char *eq, const Point &MM)
 Addition of an equation saying that the value of a field must be zero at one point (arbitrary). More...
 
Array< double > check_equations ()
 Computes the residual of all the equations. More...
 
void vars_to_terms ()
 Copies the various unknowns (doubles and Tensors) into their Term_eq counterparts. More...
 
virtual void vars_to_terms_impl ()
 Sylvain's stuff. More...
 
virtual void compute_nbr_of_conditions ()
 Sylvain's stuff. More...
 
Array< double > sec_member ()
 Computes the second member of the Newton-Raphson equations. More...
 
void xx_to_ders (const Array< double > &vder)
 Sets the values the variation of the fields. More...
 
void xx_to_vars (const Array< double > &val, int &conte)
 Sets the values the of the fields. More...
 
Array< double > do_JX (const Array< double > &xx)
 Computes the product $ J \times x$ where $J$ is the Jacobian of the system. More...
 
Array< double > do_col_J (int i)
 Computes one column of the Jacobian. More...
 
virtual void compute_matrix_cyclic (Array< double > &matrix, int n, int first_col=0, int n_col=ALL_COLUMNS, int num_proc=1, bool transpose=DO_NOT_TRANSPOSE)
 Compute some columns of the jacobian of the system of equations. More...
 
virtual void compute_matrix_adjacent (Array< double > &matrix, int n, int first_col=0, int n_col=ALL_COLUMNS, int num_proc=1, bool transpose=DO_NOT_TRANSPOSE, std::vector< std::vector< std::size_t >> *dm=nullptr)
 Sylvain's stuff. More...
 
template<Computational_model computational_model = default_computational_model>
bool do_newton (double prec, double &error)
 Does one step of the Newton-Raphson iteration. More...
 
void newton_update_vars (Array< double > const &xx)
 Update the values of var and var_double from the solution of the linear system of the last Newton iteration. More...
 
void update_terms_from_variable_domains (const Array< int > &zedoms)
 Updates the variations of the Term_eq that comes from the fact that some Domains are variable (i.e. More...
 
template<Computational_model computational_model = default_computational_model>
bool do_newton_with_linesearch (double precision, double &error, int ntrymax=10, double stepmax=1.0)
 Does one step of the Newton-Raphson iteration with a linesearch algorithm. More...
 
void do_arnoldi (int n, Array< double > &qi, Matrice &Hmat)
 Performs the Arnoldi algorithm (under developpement) More...
 
void update_gmres (const Array< double > &)
 Perfoems one step of the GMRES method (under developpement) More...
 

Public Attributes

Output_data current_output_data
 Data related to the last newton iterations. More...
 

Static Public Attributes

static std::size_t default_block_size {64}
 Defines the sub-matrix size in the scalapack 2D cyclic block decomposition. More...
 
static constexpr std::size_t nb_core_per_node {24}
 Sylvain's stuff. More...
 
static constexpr int ALL_COLUMNS {-1}
 Dummy variable for the purpose of better readability. More...
 

Protected Member Functions

void init_proc_data ()
 Sylvain's stuff. More...
 

Protected Attributes

std::ostream * output_stream
 Default output stream for log messages. More...
 
const Spaceespace
 Associated Space. More...
 
int dom_min
 Smallest domain number. More...
 
int dom_max
 Highest domain number. More...
 
int ndom
 Number of domains used. More...
 
int nvar_double
 Number of unknowns that are numbers (i.e. not fields) More...
 
MMPtr_array< double > var_double
 Pointer on the unknowns that are numbers (i.e. not fields) More...
 
MMPtr_array< char > names_var_double
 Names of the unknowns that are numbers (i.e. not fields) More...
 
int nvar
 Number of unknown fields. More...
 
MMPtr_array< Tensorvar
 Pointer on the unknown fields. More...
 
MMPtr_array< char > names_var
 Names of the unknown fields. More...
 
int nterm_double
 Number of Term_eq corresponding to the unknowns that are numbers. More...
 
MMPtr_array< Term_eqterm_double
 Pointers on the Term_eq corresponding to the unknowns that are numbers. More...
 
Array< int > assoc_var_double
 Array giving the correspondance with the var_double pointers. More...
 
int nterm
 Number of Term_eq corresponding to the unknown fields. More...
 
MMPtr_array< Term_eqterm
 Pointers on the Term_eq corresponding to the unknown fields. More...
 
Array< int > assoc_var
 Array giving the correspondance with the var pointers. More...
 
int ncst
 Number of constants passed by the user. More...
 
int nterm_cst
 Number of Term_eq coming from the constants passed by the user. More...
 
MMPtr_array< Term_eqcst
 Pointers on the Term_eq coming from the constants passed by the user. More...
 
MMPtr_array< char > names_cst
 Names of the constants passed by the user. More...
 
int ncst_hard
 Number of constants generated on the fly (when encoutering things like "2.2" etc...) More...
 
MMPtr_array< Term_eqcst_hard
 Pointers on the Term_eq coming from the constants generated on the fly (when encoutering things like "2.2" etc...) More...
 
Array< double > val_cst_hard
 Values of the constants generated on the fly (when encoutering things like "2.2" etc...) More...
 
int ndef
 Number of definitions. More...
 
MMPtr_array< Ope_defdef
 Pointers on the definition (i.e. on the Ope_def that is needed to compute the result). More...
 
MMPtr_array< char > names_def
 Names of the definitions. More...
 
int ndef_glob
 Number of global definitions (the one that require the knowledge of the whole space to give the result, like integrals). More...
 
MMPtr_array< Ope_def_globaldef_glob
 Pointers on the global definitions. More...
 
MMPtr_array< char > names_def_glob
 Names of the global definitions. More...
 
int nopeuser
 Number of operators defined by the user (single argument). More...
 
Term_eq(* opeuser [VARMAX])(const Term_eq &, Param *)
 Pointers on the functions used by the user defined operators (single argument). More...
 
MMPtr_array< Paramparuser
 Parameters used by the user defined operators (single argument). More...
 
MMPtr_array< char > names_opeuser
 Names of the user defined operators (single argument). More...
 
int nopeuser_bin
 Number of operators defined by the user (with two arguments). More...
 
Term_eq(* opeuser_bin [VARMAX])(const Term_eq &, const Term_eq &, Param *)
 Pointers on the functions used by the user defined operators (with two arguments). More...
 
MMPtr_array< Paramparuser_bin
 Parameters used by the user defined operators (with two arguments). More...
 
MMPtr_array< char > names_opeuser_bin
 Names of the user defined operators (with two arguments). More...
 
Metricmet
 Pointer on the associated Metric, if defined. More...
 
char * name_met
 Name by which the metric is recognized. More...
 
int neq_int
 Number of integral equations (i.e. which are doubles) More...
 
MMPtr_array< Eq_inteq_int
 Pointers onto the integral equations. More...
 
int neq
 Number of field equations. More...
 
MMPtr_array< Equationeq
 Pointers onto the field equations. More...
 
MMPtr_array< Term_eqresults
 Pointers on the residual of the various equations. More...
 
int nbr_unknowns
 Number of unknowns (basically the number of coefficients of all the unknown fields, once regularities are taken into account). More...
 
int nbr_conditions
 Total number of conditions (the number of coefficients of all the equations, once regularities are taken into account). More...
 
MMPtr_array< Indexwhich_coef
 Stores the "true" coefficients on some boundaries (probably deprecated). More...
 
unsigned niter {0u}
 Counter toward the number of times the do_newton method has been called. More...
 
int mpi_world_size {1}
 Sylvain's stuff. More...
 
int mpi_proc_rank {0}
 Sylvain's stuff. More...
 

Private Member Functions

template<Computational_model computational_model = default_computational_model>
void check_size_VS_unknowns (int n)
 Tests the value of the number of unknowns. More...
 
template<Computational_model computational_model = default_computational_model>
void check_bsize (int bsize)
 Tests the not too many processors are used. More...
 
template<Computational_model computational_model = default_computational_model>
void compute_matloc (Array< double > &matloc_in, int nn, int bsize)
 Computes the local part of the Jacobian Used by do_newton_with_linesearch ; only implemented in parallel version. More...
 
template<Computational_model computational_model = default_computational_model>
void translate_second_member (Array< double > &secloc, Array< double > const &second, int nn, int bsize, int nprow, int myrow, int mycol)
 Distributes the second member of Newton-Raphson accross the various processors. More...
 
template<Computational_model computational_model = default_computational_model>
void get_global_solution (Array< double > &auxi, Array< double > const &secloc, int nn, int bsize, int nprow, int myrow, int mycol)
 Solves the linear problem in Newton-Raphson. More...
 
template<Computational_model computational_model = default_computational_model>
void update_fields (double lambda, vector< double > const &old_var_double, vector< Tensor > const &old_var_fields, vector< double > const &p_var_double, vector< Tensor > const &p_var_fields)
 Update the fields after a Newton-Raphson iteration. More...
 
template<Computational_model computational_model = default_computational_model>
void compute_old_and_var (Array< double > const &xx, vector< double > &old_var_double, vector< Tensor > &old_var_fields, vector< double > &p_var_double, vector< Tensor > &p_var_fields)
 Update the fields when some domains have been modified. More...
 
template<Computational_model computational_model = default_computational_model>
double compute_f (Array< double > const &second)
 Inner routine for the linesearch algorithm Used by do_newton_with_linesearch ; only implemented in parallel version. More...
 
template<Computational_model computational_model = default_computational_model>
void compute_p (Array< double > &xx, Array< double > const &second, int nn)
 Inner routine for the linesearch algorithm Used by do_newton_with_linesearch ; only implemented in parallel version. More...
 
template<Computational_model computational_model = default_computational_model>
void check_positive (double delta)
 Tests the positivity of   $\celta$ Used by do_newton_with_linesearch ; only implemented in parallel version. More...
 
template<Computational_model computational_model = default_computational_model>
void check_negative (double delta)
 Tests the positivity of   $\celta$ Used by do_newton_with_linesearch ; only implemented in parallel version. More...
 

Friends

class Space_spheric
 
class Space_bispheric
 
class Space_critic
 
class Space_polar
 
class Space_spheric_adapted
 
class Space_polar_adapted
 
class Space_bin_ns
 
class Space_bin_bh
 
class Space_bin_fake
 
class Space_polar_periodic
 
class Space_adapted_bh
 
class Space_bbh
 
class Metric
 
class Metric_general
 
class Metric_flat
 
class Metric_dirac
 
class Metric_dirac_const
 
class Metric_conf
 
class Metric_relax
 
class Metric_ADS
 
class Metric_AADS
 
class Metric_const
 
class Metric_flat_nophi
 
class Metric_nophi
 
class Metric_nophi_AADS
 
class Metric_nophi_const
 
class Metric_nophi_AADS_const
 
class Metric_conf_factor
 
class Metric_conf_factor_const
 
class Metric_cfc
 

Detailed Description

Class used to describe and solve a system of equations.

It is the central object of Kadath. The equations are solved between the domains dom_min and dom_max . The various quantities are given names (char*) that are used when passing the equations to the System_of_eqs.

Todo:
Remove commented code blocks when stability is at an acceptable level (especially in the do_newton_***.cpp files).

Definition at line 60 of file system_of_eqs.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : bool

Dummy names for the purpose of better readability.

Definition at line 72 of file system_of_eqs.hpp.

Constructor & Destructor Documentation

◆ System_of_eqs() [1/4]

Kadath::System_of_eqs::System_of_eqs ( const Space so)
explicit

Standard constructor nothing is done.

The space is affected and the equations are to be solved in all space.

Parameters
so[input] : associated space.

Definition at line 34 of file system_of_eqs.cpp.

References cst, cst_hard, eq, eq_int, init_proc_data(), names_cst, names_var, ndom, opeuser, opeuser_bin, paruser, paruser_bin, results, term, term_double, var, and var_double.

◆ System_of_eqs() [2/4]

Kadath::System_of_eqs::System_of_eqs ( const Space so,
int  i,
int  j 
)

Constructor, nothing is done.

The space is affected and the equations are solved only between two domains.

Parameters
so[input] : associated space.
i[input] : smallest domain number.
j[input] : highest domain number.

Definition at line 80 of file system_of_eqs.cpp.

References cst, cst_hard, eq, eq_int, init_proc_data(), names_cst, names_var, ndom, opeuser, opeuser_bin, paruser, paruser_bin, results, term, term_double, var, and var_double.

◆ System_of_eqs() [3/4]

Kadath::System_of_eqs::System_of_eqs ( const Space so,
int  i 
)
inline

Constructor, nothing is done.

The space is affected and the equations are solved only in one domain.

Parameters
so[input] : associated space.
i[input] : the domain number.

Definition at line 194 of file system_of_eqs.hpp.

◆ System_of_eqs() [4/4]

Kadath::System_of_eqs::System_of_eqs ( const System_of_eqs )
delete

Constructor by copy.

◆ ~System_of_eqs()

Member Function Documentation

◆ add_cst() [1/2]

void Kadath::System_of_eqs::add_cst ( const char *  name,
const Tensor cst 
)
virtual

Addition of a constant (field case)

Parameters
name: name of the constant (used afterwards by System_of_eqs)
cst: constant.

Definition at line 296 of file system_of_eqs.cpp.

References cst, dom_max, dom_min, names_cst, ncst, and nterm_cst.

◆ add_cst() [2/2]

void Kadath::System_of_eqs::add_cst ( const char *  name,
double  cst 
)
virtual

Addition of a constant (number case)

Parameters
name: name of the constant (used afterwards by System_of_eqs)
cst: variable.

Definition at line 324 of file system_of_eqs.cpp.

References cst, dom_max, dom_min, names_cst, ncst, and nterm_cst.

◆ add_def() [1/2]

void Kadath::System_of_eqs::add_def ( const char *  name)
virtual

Addition of a definition.

Parameters
name: string describing the definition (like "A=...")

Definition at line 387 of file system_of_eqs.cpp.

References dom_max, and dom_min.

◆ add_def() [2/2]

void Kadath::System_of_eqs::add_def ( int  dd,
const char *  name 
)
virtual

Addition of a definition in a single domain.

Parameters
dd: number of the Domain.
name: string describing the definition (like "A=...")

Definition at line 358 of file system_of_eqs.cpp.

References def, give_ope(), is_ope_bin(), names_def, and ndef.

◆ add_def_global() [1/2]

void Kadath::System_of_eqs::add_def_global ( const char *  name)
virtual

Addition of a global definition.

Parameters
name: string describing the definition (like "A=...")

Definition at line 411 of file system_of_eqs.cpp.

References dom_max, and dom_min.

◆ add_def_global() [2/2]

void Kadath::System_of_eqs::add_def_global ( int  dd,
const char *  name 
)
virtual

Addition of a global definition in a single domain.

Parameters
dd: number of the Domain.
name: string describing the definition (like "A=...")

Definition at line 393 of file system_of_eqs.cpp.

References def_glob, is_ope_bin(), names_def_glob, and ndef_glob.

◆ add_eq_bc() [1/4]

void Kadath::System_of_eqs::add_eq_bc ( int  dom,
int  bb,
const Array< int > &  orders,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation a boundary condition of arbitrary orders.

The order can be different for each variable. It is irrelevant for the variable corresponding to the boundary.

Parameters
dom: number of the Domain.
bb: the boundary.
orders: orders of the equation, for each variable.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 541 of file add_eq.cpp.

References add_eq_bc(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_bc() [2/4]

void Kadath::System_of_eqs::add_eq_bc ( int  dom,
int  bb,
const Array< int > &  orders,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation a boundary condition of arbitrary orders.

The order can be different for each variable. It is irrelevant for the variable corresponding to the boundary.

Parameters
dom: number of the Domain.
bb: the boundary.
orders: orders of the equation, for each variable.
eq: string defining the equation.
n_cmpnumber 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 515 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_bc() [3/4]

void Kadath::System_of_eqs::add_eq_bc ( int  dom,
int  bb,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation describing a boundary condition.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 194 of file add_eq.cpp.

References add_eq_bc(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_bc() [4/4]

void Kadath::System_of_eqs::add_eq_bc ( int  dom,
int  bb,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation describing a boundary condition.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
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 168 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_bc_exception()

void Kadath::System_of_eqs::add_eq_bc_exception ( int  dom,
int  bound,
const char *  eq,
const char *  const_part 
)

Addition of an boundary equation with an exception for $l=m=0$.

Parameters
dom: number of the Domain.
bound: boundary index.
eq: string defining the equation.
const_part: constant par

Definition at line 123 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_first_integral()

void Kadath::System_of_eqs::add_eq_first_integral ( int  dom_min,
int  dom_max,
const char *  integ_part,
const char *  const_part 
)
virtual

Addition of an equation representing a first integral.

Parameters
dom_min: index of the first Domain
dom_max: index of the last Domain
integ_part: name of the integral quantity
const_part: equation fixing the value of the integral.

Definition at line 578 of file add_eq.cpp.

References dom_max, dom_min, eq, espace, Kadath::Space::get_domain(), nbr_conditions, and neq.

◆ add_eq_full() [1/2]

void Kadath::System_of_eqs::add_eq_full ( int  dom,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be zeroth order i.e.

with no derivatives).

Parameters
dom: number of the Domain.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 403 of file add_eq.cpp.

References add_eq_full(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_full() [2/2]

void Kadath::System_of_eqs::add_eq_full ( int  dom,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be zeroth order i.e.

with no derivatives).

Parameters
dom: number of the Domain.
eq: string defining the equation.
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 374 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_inside() [1/2]

void Kadath::System_of_eqs::add_eq_inside ( int  dom,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be second order).

Version with a list of components

Parameters
dom: number of the Domain.
eq: string defining the equation.
list: list of the components to be considered

Definition at line 52 of file add_eq.cpp.

References add_eq_inside(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_inside() [2/2]

void Kadath::System_of_eqs::add_eq_inside ( int  dom,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be second order).

Parameters
dom: number of the Domain.
eq: string defining the equation.
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 26 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching() [1/4]

void Kadath::System_of_eqs::add_eq_matching ( int  dom,
int  bb,
const Array< int > &  orders,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation a matching condition of arbitrary orders.

The order can be different for each variable. It is irrelevant for the variable corresponding to the boundary.

Parameters
dom: number of the Domain.
bb: the boundary.
orders: orders of the equation, for each variable.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 574 of file add_eq.cpp.

References add_eq_matching(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching() [2/4]

void Kadath::System_of_eqs::add_eq_matching ( int  dom,
int  bb,
const Array< int > &  orders,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation a matching condition of arbitrary orders.

The order can be different for each variable. It is irrelevant for the variable corresponding to the boundary.

Parameters
dom: number of the Domain.
bb: the boundary.
orders: orders of the equation, for each variable.
eq: string defining the equation.
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 545 of file add_eq.cpp.

References dom_max, dom_min, eq, espace, Kadath::Domain::find_other_dom(), Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching() [3/4]

void Kadath::System_of_eqs::add_eq_matching ( int  dom,
int  bb,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation describing a matching condition between two domains (standard setting)

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 227 of file add_eq.cpp.

References add_eq_matching(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching() [4/4]

void Kadath::System_of_eqs::add_eq_matching ( int  dom,
int  bb,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation describing a matching condition between two domains (standard setting)

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
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 198 of file add_eq.cpp.

References dom_max, dom_min, eq, espace, Kadath::Domain::find_other_dom(), Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching_exception() [1/2]

void Kadath::System_of_eqs::add_eq_matching_exception ( int  dom,
int  bb,
const char *  eq,
const Param par,
const char *  eq_exception,
const List_comp list 
)
virtual

Addition of a matching condition, except for one coefficient where an alternative condition is enforced (highly specialized usage).

Parameters
dom: number of the Domain.
bb: the boundary
eq: string defining the equation.  
par: parameters for the exceptional condition (i.e. which coefficient is concerned basically).
eq_exception: the excpetionnal equation used.
list: list of the components to be considered.

Definition at line 266 of file add_eq.cpp.

References add_eq_matching_exception(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching_exception() [2/2]

void Kadath::System_of_eqs::add_eq_matching_exception ( int  dom,
int  bb,
const char *  eq,
const Param par,
const char *  eq_exception,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of a matching condition, except for one coefficient where an alternative condition is enforced (highly specialized usage).

Parameters
dom: number of the Domain.
bb: the boundary
eq: string defining the equation.  
par: parameters for the exceptional condition (i.e. which coefficient is concerned basically).
eq_exception: the excpetionnal equation used.
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 231 of file add_eq.cpp.

References dom_max, dom_min, eq, espace, Kadath::Domain::find_other_dom(), Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching_import() [1/2]

void Kadath::System_of_eqs::add_eq_matching_import ( int  dom,
int  bb,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation describing a matching condition between domains using the ("import" setting) The matching is performed in the configuration space.

It is intended where the collocations points are different at each side of the boundary. It can happen when there are more than one touching domain (bispheric vs spheric) and when the number of points is different.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 370 of file add_eq.cpp.

References add_eq_matching_import(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching_import() [2/2]

void Kadath::System_of_eqs::add_eq_matching_import ( int  dom,
int  bb,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation describing a matching condition between domains using the ("import" setting) The matching is performed in the configuration space.

It is intended where the collocations points are different at each side of the boundary. It can happen when there are more than one touching domain (bispheric vs spheric) and when the number of points is different.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
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 344 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), Kadath::Space::get_indices_matching_non_std(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching_non_std() [1/2]

void Kadath::System_of_eqs::add_eq_matching_non_std ( int  dom,
int  bb,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation describing a matching condition between domains.

The matching is performed in the configuration space. It is intended where the collocations points are different at each side of the boundary. It can happen when there are more than one touching domain (bispheric vs spheric) and when the number of points is different.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 340 of file add_eq.cpp.

References add_eq_matching_non_std(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching_non_std() [2/2]

void Kadath::System_of_eqs::add_eq_matching_non_std ( int  dom,
int  bb,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation describing a matching condition between domains.

The matching is performed in the configuration space. It is intended where the collocations points are different at each side of the boundary. It can happen when there are more than one touching domain (bispheric vs spheric) and when the number of points is different.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
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 303 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), Kadath::Space::get_indices_matching_non_std(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_matching_one_side() [1/2]

void Kadath::System_of_eqs::add_eq_matching_one_side ( int  dom,
int  bb,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation describing a matching condition between two domains (specialized function for time evolution).

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 299 of file add_eq.cpp.

References add_eq_matching_one_side(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_matching_one_side() [2/2]

void Kadath::System_of_eqs::add_eq_matching_one_side ( int  dom,
int  bb,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation describing a matching condition between two domains (specialized function for time evolution).

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the equation.
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 270 of file add_eq.cpp.

References dom_max, dom_min, eq, espace, Kadath::Domain::find_other_dom(), Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_mode()

void Kadath::System_of_eqs::add_eq_mode ( int  dom,
int  bb,
const char *  eq,
const Index pos_cf,
double  val 
)
virtual

Addition of an equation prescribing the value of one coefficient of a scalar field, on a given boundary.

Parameters
dom: number of the Domain.
bb: the boundary.
eq: string defining the scalar field.
pos_cf: which coefficient is used.
val: the value the coefficient must have.

Definition at line 438 of file add_eq.cpp.

References eq_int, give_ope(), nbr_conditions, and neq_int.

◆ add_eq_one_side() [1/2]

void Kadath::System_of_eqs::add_eq_one_side ( int  dom,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be first order).

Parameters
dom: number of the Domain.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 434 of file add_eq.cpp.

References add_eq_one_side(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_one_side() [2/2]

void Kadath::System_of_eqs::add_eq_one_side ( int  dom,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation to be solved inside a domain (assumed to be first order).

Parameters
dom: number of the Domain.
eq: string defining the equation.
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 407 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_order() [1/4]

void Kadath::System_of_eqs::add_eq_order ( int  dom,
const Array< int > &  orders,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation to be solved inside a domain of arbitrary order.

The order can be different for each variable (first order in time and second in $r$ for instance).

Parameters
dom: number of the Domain.
orders: orders of the equation, for each variable.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 511 of file add_eq.cpp.

References add_eq_order(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_order() [2/4]

void Kadath::System_of_eqs::add_eq_order ( int  dom,
const Array< int > &  orders,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation to be solved inside a domain of arbitrary order.

The order can be different for each variable (first order in time and second in $r$ for instance).

Parameters
dom: number of the Domain.
orders: orders of the equation, for each variable.
eq: string defining the equation.
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 485 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_order() [3/4]

void Kadath::System_of_eqs::add_eq_order ( int  dom,
int  order,
const char *  eq,
const List_comp list 
)
virtual

Addition of an equation to be solved inside a domain (of arbitrary order).

Parameters
dom: number of the Domain.
order: order of the equation.
eq: string defining the equation.
list: list of the components to be considered.

Definition at line 164 of file add_eq.cpp.

References add_eq_order(), Kadath::List_comp::get_ncomp(), and Kadath::List_comp::get_pcomp().

◆ add_eq_order() [4/4]

void Kadath::System_of_eqs::add_eq_order ( int  dom,
int  order,
const char *  eq,
int  n_cmp = -1,
Array< int > **  p_cmp = nullptr 
)
virtual

Addition of an equation to be solved inside a domain (of arbitrary order).

Parameters
dom: number of the Domain.
order: order of the equation.
eq: string defining the equation.
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 56 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_eq_point()

void Kadath::System_of_eqs::add_eq_point ( int  dom,
const char *  eq,
const Point MM 
)
virtual

Addition of an equation saying that the value of a field must be zero at one point (arbitrary).

Parameters
dom: number of the Domain.
eq: string defining the scalar field that must vanish.
MM: which point is used.

Definition at line 473 of file add_eq.cpp.

References eq_int, give_ope(), nbr_conditions, and neq_int.

◆ add_eq_val()

void Kadath::System_of_eqs::add_eq_val ( int  dom,
const char *  eq,
const Index pos 
)
virtual

Addition of an equation saying that the value of a field must be zero at one collocation point.

Parameters
dom: number of the Domain.
eq: string defining the scalar field that must vanish.
pos: which collocation point is used.

Definition at line 462 of file add_eq.cpp.

References eq_int, give_ope(), nbr_conditions, and neq_int.

◆ add_eq_val_mode()

void Kadath::System_of_eqs::add_eq_val_mode ( int  dom,
const char *  eq,
const Index pos_cf,
double  val 
)
virtual

Addition of an equation prescribing the value of one coefficient of a scalar field.

Parameters
dom: number of the Domain.
eq: string defining the scalar field.
pos_cf: which coefficient is used.
val: the value the coefficient must have.

Definition at line 450 of file add_eq.cpp.

References eq_int, give_ope(), nbr_conditions, and neq_int.

◆ add_eq_vel_pot()

void Kadath::System_of_eqs::add_eq_vel_pot ( int  dom,
int  order,
const char *  eq,
const char *  const_part 
)
virtual

Addition of an equation for the velocity potential of irrotational binaries.

Parameters
dom: number of the Domain.
order: order of the equation.
eq: string defining the equation.
const_part: constant par

Definition at line 82 of file add_eq.cpp.

References eq, espace, Kadath::Space::get_domain(), give_ope(), is_ope_bin(), nbr_conditions, and neq.

◆ add_ope() [1/2]

void Kadath::System_of_eqs::add_ope ( const char *  name,
Term_eq(*)(const Term_eq &, const Term_eq &, Param *)  pope,
Param par 
)
virtual

Addition of a user defined operator (two arguments version)

Parameters
name: name of the operator (used afterwards by System_of_eqs)
pope: pointer on the function describing the action of the operator.
par: parameters of the operator.

Definition at line 348 of file system_of_eqs.cpp.

References names_opeuser_bin, nopeuser_bin, opeuser_bin, and paruser_bin.

◆ add_ope() [2/2]

void Kadath::System_of_eqs::add_ope ( const char *  name,
Term_eq(*)(const Term_eq &, Param *)  pope,
Param par 
)
virtual

Addition of a user defined operator (one argument version)

Parameters
name: name of the operator (used afterwards by System_of_eqs)
pope: pointer on the function describing the action of the operator.
par: parameters of the operator.

Definition at line 339 of file system_of_eqs.cpp.

References names_opeuser, nopeuser, opeuser, and paruser.

◆ add_var() [1/2]

void Kadath::System_of_eqs::add_var ( const char *  name,
double &  var 
)
virtual

Addition of a variable (number case)

Parameters
name: name of the variable (used afterwards by System_of_eqs)
var: variable.

Definition at line 242 of file system_of_eqs.cpp.

References assoc_var_double, dom_max, dom_min, names_var_double, nbr_unknowns, nterm_double, nvar_double, Kadath::Array< T >::set(), term_double, and var_double.

◆ add_var() [2/2]

void Kadath::System_of_eqs::add_var ( const char *  name,
Tensor var 
)
virtual

Addition of a variable (field case)

Parameters
name: name of the variable (used afterwards by System_of_eqs)
var: variable.

Definition at line 264 of file system_of_eqs.cpp.

References assoc_var, dom_max, dom_min, espace, Kadath::Tensor::espace, Kadath::Space::get_domain(), names_var, Kadath::Domain::nbr_unknowns(), nbr_unknowns, nterm, nvar, Kadath::Array< T >::set(), term, and var.

◆ check_bsize()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::check_bsize ( int  bsize)
private

Tests the not too many processors are used.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ check_equations()

Array< double > Kadath::System_of_eqs::check_equations ( )

Computes the residual of all the equations.

This is essentially the value of the biggest coefficient.

Returns
an array of the error, on all the equations.

Definition at line 26 of file solver.cpp.

References eq, neq, neq_int, sec_member(), and Kadath::Array< T >::set().

◆ check_negative()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::check_negative ( double  delta)
private

Tests the positivity of   $\celta$ Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ check_positive()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::check_positive ( double  delta)
private

Tests the positivity of   $\celta$ Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ check_size_VS_unknowns()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::check_size_VS_unknowns ( int  n)
private

Tests the value of the number of unknowns.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ compute_f()

template<Computational_model computational_model = default_computational_model>
double Kadath::System_of_eqs::compute_f ( Array< double > const &  second)
private

Inner routine for the linesearch algorithm Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ compute_matloc()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::compute_matloc ( Array< double > &  matloc_in,
int  nn,
int  bsize 
)
private

Computes the local part of the Jacobian Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ compute_matrix_adjacent()

void Kadath::System_of_eqs::compute_matrix_adjacent ( Array< double > &  matrix,
int  n,
int  first_col = 0,
int  n_col = ALL_COLUMNS,
int  num_proc = 1,
bool  transpose = DO_NOT_TRANSPOSE,
std::vector< std::vector< std::size_t >> *  dm = nullptr 
)
virtual

Sylvain's stuff.

Definition at line 564 of file system_of_eqs.cpp.

References ALL_COLUMNS, do_col_J(), Kadath::Array< T >::get_ndim(), and Kadath::Array< T >::set().

◆ compute_matrix_cyclic()

void Kadath::System_of_eqs::compute_matrix_cyclic ( Array< double > &  matrix,
int  n,
int  first_col = 0,
int  n_col = ALL_COLUMNS,
int  num_proc = 1,
bool  transpose = DO_NOT_TRANSPOSE 
)
virtual

Compute some columns of the jacobian of the system of equations.

Default arguments are to be used in the case of a non-MPI version. For the MPI case, each process has to know which columns he has to compute.

Parameters
matrix2D array storing the result (need to be allocated before being passed).
nsize of the matrix (which is square).
first_colindex of the first column to compute.
n_colnumber of columns to compute.
num_procnumber of process.
transposedoes the result has to be transposed (this has to be the case for the scalapack linear solve).

Definition at line 529 of file system_of_eqs.cpp.

References ALL_COLUMNS, do_col_J(), Kadath::Array< T >::get_ndim(), mpi_proc_rank, mpi_world_size, and Kadath::Array< T >::set().

◆ compute_nbr_of_conditions()

void Kadath::System_of_eqs::compute_nbr_of_conditions ( )
virtual

Sylvain's stuff.

Definition at line 51 of file solver.cpp.

References def, dom_max, dom_min, eq, met, nbr_conditions, ndef, neq, neq_int, results, and Kadath::Metric::update().

◆ compute_old_and_var()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::compute_old_and_var ( Array< double > const &  xx,
vector< double > &  old_var_double,
vector< Tensor > &  old_var_fields,
vector< double > &  p_var_double,
vector< Tensor > &  p_var_fields 
)
private

Update the fields when some domains have been modified.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ compute_p()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::compute_p ( Array< double > &  xx,
Array< double > const &  second,
int  nn 
)
private

Inner routine for the linesearch algorithm Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ do_arnoldi()

void Kadath::System_of_eqs::do_arnoldi ( int  n,
Array< double > &  qi,
Matrice Hmat 
)

Performs the Arnoldi algorithm (under developpement)

◆ do_col_J()

◆ do_JX()

Array< double > Kadath::System_of_eqs::do_JX ( const Array< double > &  xx)

Computes the product $ J \times x$ where $J$ is the Jacobian of the system.

Parameters
xx: the vector $ x$.
Returns
the product.

Definition at line 94 of file solver.cpp.

References def, dom_max, dom_min, eq, eq_int, met, nbr_conditions, ndef, neq, neq_int, results, Kadath::Array< T >::set(), Kadath::Metric::update(), and xx_to_ders().

◆ do_newton()

template<Computational_model computational_model>
bool Kadath::System_of_eqs::do_newton ( double  prec,
double &  error 
)

Does one step of the Newton-Raphson iteration.

Template Parameters
computational_modeltemplate parameter for the computational model (mpi/sequential/GPU) selection.
Parameters
prec: required precision.
error: achieved precision.
Returns
true if the required precision is achieved, false otherwise.

Definition at line 1699 of file system_of_eqs.hpp.

◆ do_newton_with_linesearch()

template<Computational_model computational_model>
bool Kadath::System_of_eqs::do_newton_with_linesearch ( double  precision,
double &  error,
int  ntrymax = 10,
double  stepmax = 1.0 
)

Does one step of the Newton-Raphson iteration with a linesearch algorithm.

Only implemented in the parallel version.

Parameters
precision: required precision.
error: achieved precision.
ntrymax: first linesearch parameter.
stepmax: second linesearch parameter.
Returns
true if the required precision is achieved, false otherwise.

Definition at line 1708 of file system_of_eqs.hpp.

◆ get_dom_max()

int Kadath::System_of_eqs::get_dom_max ( ) const
inline

Returns the highest index of the domains.

Definition at line 220 of file system_of_eqs.hpp.

References dom_max.

◆ get_dom_min()

int Kadath::System_of_eqs::get_dom_min ( ) const
inline

Returns the smallest index of the domains.

Definition at line 216 of file system_of_eqs.hpp.

References dom_min.

◆ get_global_solution()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::get_global_solution ( Array< double > &  auxi,
Array< double > const &  secloc,
int  nn,
int  bsize,
int  nprow,
int  myrow,
int  mycol 
)
private

Solves the linear problem in Newton-Raphson.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ get_met()

const Metric * Kadath::System_of_eqs::get_met ( ) const

Returns a pointer on the Metric.

Definition at line 162 of file system_of_eqs.cpp.

References met.

◆ get_mpi_proc_rank()

int Kadath::System_of_eqs::get_mpi_proc_rank ( ) const
inline

Returns the MPI rank.

Definition at line 234 of file system_of_eqs.hpp.

References mpi_proc_rank.

◆ get_mpi_world_size()

int Kadath::System_of_eqs::get_mpi_world_size ( ) const
inline

Returns the total number of MPI processes.

Definition at line 235 of file system_of_eqs.hpp.

References mpi_world_size.

◆ get_nbr_conditions()

int Kadath::System_of_eqs::get_nbr_conditions ( ) const
inline

Returns the number of conditions.

Definition at line 224 of file system_of_eqs.hpp.

References nbr_conditions.

◆ get_nbr_unknowns()

int Kadath::System_of_eqs::get_nbr_unknowns ( ) const
inline

Returns the number of unknowns.

Definition at line 228 of file system_of_eqs.hpp.

References nbr_unknowns.

◆ get_niter()

unsigned Kadath::System_of_eqs::get_niter ( ) const
inline

Returns the current iteration number.

Definition at line 232 of file system_of_eqs.hpp.

References niter.

◆ get_output_stream()

std::ostream& Kadath::System_of_eqs::get_output_stream ( ) const
inline

Returns the default output stream reference.

Definition at line 204 of file system_of_eqs.hpp.

References output_stream.

◆ get_space()

const Space& Kadath::System_of_eqs::get_space ( ) const
inline

Returns the space.

Definition at line 212 of file system_of_eqs.hpp.

References espace.

◆ give_cst()

Term_eq * Kadath::System_of_eqs::give_cst ( int  which,
int  dd 
) const

Returns a pointer on a Term_eq corresponding to a constant.

Parameters
which: index of the unknown.
dd: the index of the Domain.

Definition at line 188 of file system_of_eqs.cpp.

References cst, dom_max, dom_min, ncst, and ndom.

◆ give_cst_hard()

Term_eq * Kadath::System_of_eqs::give_cst_hard ( double  xx,
int  dd 
) const

Returns a pointer on a Term_eq corresponding to a constant generated on the fly.

Parameters
xx: the value of the constant
dd: the index of the Domain.

Definition at line 196 of file system_of_eqs.cpp.

References cst_hard, ncst_hard, Kadath::Array< T >::set(), and val_cst_hard.

◆ give_def()

Ope_def * Kadath::System_of_eqs::give_def ( int  i) const

Returns a pointer on a definition (better to use give_val_def if one wants to access the result of some definition).

Parameters
i: the index of the definition (one has to manage the different domains properly...)

Definition at line 210 of file system_of_eqs.cpp.

References def, and ndef.

◆ give_def_glob()

Ope_def_global * Kadath::System_of_eqs::give_def_glob ( int  i) const

Returns a pointer on a global definition.

Parameters
i: the index of the definition (one has to manage the different domains properly...)

Definition at line 216 of file system_of_eqs.cpp.

References def_glob, and ndef_glob.

◆ give_ope()

Ope_eq * Kadath::System_of_eqs::give_ope ( int  dom,
const char *  name,
int  bb = 0 
) const

◆ give_term()

Term_eq * Kadath::System_of_eqs::give_term ( int  which,
int  dd 
) const

Returns a pointer on a Term_eq corresponding to an unknown field.

Parameters
which: index of the unknown.
dd: the index of the Domain.

Definition at line 179 of file system_of_eqs.cpp.

References dom_max, dom_min, ndom, nvar, and term.

◆ give_term_double()

Term_eq * Kadath::System_of_eqs::give_term_double ( int  which,
int  dd 
) const

Returns a pointer on a Term_eq corresponding to an unknown number.

Parameters
which: index of the unknown.
dd: the index of the Domain.

Definition at line 170 of file system_of_eqs.cpp.

References dom_max, dom_min, ndom, nvar_double, and term_double.

◆ give_val_def()

◆ init_proc_data()

void Kadath::System_of_eqs::init_proc_data ( )
inlineprotected

Sylvain's stuff.

Definition at line 169 of file system_of_eqs.hpp.

References mpi_proc_rank, and mpi_world_size.

◆ is_ope_bin()

bool Kadath::System_of_eqs::is_ope_bin ( const char *  input,
char *  p1,
char *  p2,
char  symb 
) const

Checks if a string represents an operator of the type "a + b".

Parameters
input: the string to be tested.
p1: the returned first argument.
p2: the returned second argument.
symb: the symbol representing the operator (can be +, -; * and so on...)

Definition at line 276 of file give_ope.cpp.

◆ is_ope_der_var()

bool Kadath::System_of_eqs::is_ope_der_var ( int  dd,
const char *  input,
char *  p1,
int &  which 
) const

Checks if a string represents the derivative wrt a numerical coordinate of a given Domain (like "a,T")

Parameters
dd: number of the Domain
input: the string to be tested.
p1: the returned argument.
which: the variable concerned by the derivative.

Definition at line 539 of file give_ope.cpp.

References espace, Kadath::Space::get_domain(), and Kadath::Domain::give_place_var().

◆ is_ope_deriv()

bool Kadath::System_of_eqs::is_ope_deriv ( const char *  input,
char *  p1,
int &  typeder,
char &  nameind 
) const

Checks if a string represents the covariant derivative.

Parameters
input: the string to be tested.
p1: the returned argument.
typeder: the type of derivative (COV or CON).
nameind: name of the index corresponding to the derivative.

Definition at line 385 of file give_ope.cpp.

◆ is_ope_deriv_background()

bool Kadath::System_of_eqs::is_ope_deriv_background ( const char *  input,
char *  p1,
int &  typeder,
char &  nameind 
) const

Checks if a string represents the covariant derivative wrt a background metric.

Parameters
input: the string to be tested.
p1: the returned argument.
typeder: the type of derivative (COV or CON).
nameind: name of the index corresponding to the derivative.

Definition at line 455 of file give_ope.cpp.

◆ is_ope_deriv_flat()

bool Kadath::System_of_eqs::is_ope_deriv_flat ( const char *  input,
char *  p1,
int &  typeder,
char &  nameind 
) const

Checks if a string represents the flat covariant derivative.

Parameters
input: the string to be tested.
p1: the returned argument.
typeder: the type of derivative (COV or CON).
nameind: name of the index corresponding to the derivative.

Definition at line 419 of file give_ope.cpp.

◆ is_ope_minus()

bool Kadath::System_of_eqs::is_ope_minus ( const char *  input,
char *  output 
) const

Checks if a string contains the operator minus.

Parameters
input: the string to be tested.
output: returns the argument of the minus operator ("A" if one started with "-A")

Definition at line 293 of file give_ope.cpp.

◆ is_ope_partial()

bool Kadath::System_of_eqs::is_ope_partial ( const char *  input,
char *  p1,
char &  nameind 
) const

Checks if a string represents the partial derivative (like "partial_i a")

Parameters
input: the string to be tested.
p1: the returned argument.
nameind: name of the index corresponding to the derivative.

Definition at line 491 of file give_ope.cpp.

◆ is_ope_pow()

bool Kadath::System_of_eqs::is_ope_pow ( const char *  input,
char *  p1,
int &  expo 
) const

Checks if a string represents the power of something (like "a^2").

Parameters
input: the string to be tested.
p1: the returned argument.
expo: the returned power.

Definition at line 519 of file give_ope.cpp.

◆ is_ope_uni() [1/2]

bool Kadath::System_of_eqs::is_ope_uni ( const char *  input,
char *  p1,
char *  p2,
const char *  nameope 
) const

Checks if a string represents an operator of the type "ope(a,b)".

Parameters
input: the string to be tested.
p1: the returned first argument.
p2: the returned first argument.
nameope: name of the operator

Definition at line 349 of file give_ope.cpp.

◆ is_ope_uni() [2/2]

bool Kadath::System_of_eqs::is_ope_uni ( const char *  input,
char *  p1,
const char *  nameope 
) const

Checks if a string represents an operator of the type "ope(a)".

Parameters
input: the string to be tested.
p1: the returned argument.
nameope: name of the operator

Definition at line 314 of file give_ope.cpp.

◆ ischristo()

bool Kadath::System_of_eqs::ischristo ( const char *  input,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Checks if a string represents the Christoffel symbols.

The reserved word is "Gam"

Parameters
input: the string to be tested.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 185 of file give_ope.cpp.

References met.

◆ iscst()

bool Kadath::System_of_eqs::iscst ( const char *  target,
int &  which,
int &  valence,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Check if a string is a constant (can required indices manipulation and/or inner contraction).

Parameters
target: the string to be tested.
which: the index of the found constant (if found).
valence: valence of the result.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 63 of file give_ope.cpp.

References cst, names_cst, ncst, and ndom.

◆ isdef()

bool Kadath::System_of_eqs::isdef ( int  dd,
const char *  target,
int &  which,
int &  valence,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Check if a string is a definition (can required indices manipulation and/or inner contraction).

Parameters
dd: index of the Domain.
target: the string to be tested.
which: the index of the found definition (if found).
valence: valence of the result.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 106 of file give_ope.cpp.

References def, names_def, and ndef.

◆ isdef_glob()

bool Kadath::System_of_eqs::isdef_glob ( int  dd,
const char *  target,
int &  which 
) const

Check if a string is a global definition.

Parameters
dd: index of the Domain.
target: the string to be tested.
which: the index of the found definition (if found).

Definition at line 127 of file give_ope.cpp.

References def_glob, names_def_glob, and ndef_glob.

◆ isdouble()

bool Kadath::System_of_eqs::isdouble ( const char *  input,
double &  output 
) const

Checks if a string is a double.

Parameters
input: the string to be tested.
output: returns the double

Definition at line 140 of file give_ope.cpp.

◆ ismet() [1/2]

bool Kadath::System_of_eqs::ismet ( const char *  input) const

Checks if a string is a metric (without arguments, probably deprecated)

Parameters
input: the string to be tested.

Definition at line 170 of file give_ope.cpp.

References met, and name_met.

◆ ismet() [2/2]

bool Kadath::System_of_eqs::ismet ( const char *  input,
char *&  name_ind,
int &  type_ind 
) const

Checks if a string is a metric.

Parameters
input: the string to be tested.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 147 of file give_ope.cpp.

References met, and name_met.

◆ isricci_scalar()

bool Kadath::System_of_eqs::isricci_scalar ( const char *  input,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Checks if a string represents the Ricci scalar.

The reserved word is "R"

Parameters
input: the string to be tested.
name_ind: name of the indices of the result (not used in this case).
type_ind: type of the indices of the result (COV or CON) (not used in this case).

Definition at line 254 of file give_ope.cpp.

References met.

◆ isricci_tensor()

bool Kadath::System_of_eqs::isricci_tensor ( const char *  input,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Checks if a string represents the Ricci tensor.

The reserved word is "R"

Parameters
input: the string to be tested.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 233 of file give_ope.cpp.

References met.

◆ isriemann()

bool Kadath::System_of_eqs::isriemann ( const char *  input,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Checks if a string represents the Riemann tensor.

The reserved word is "R"

Parameters
input: the string to be tested.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 205 of file give_ope.cpp.

References met.

◆ isvar()

bool Kadath::System_of_eqs::isvar ( const char *  target,
int &  which,
int &  valence,
char *&  name_ind,
Array< int > *&  type_ind 
) const

Check if a string is an unknown field.

Parameters
target: the string to be tested.
which: the index of the found constant (if found).
valence: valence of the result.
name_ind: name of the indices of the result.
type_ind: type of the indices of the result (COV or CON).

Definition at line 39 of file give_ope.cpp.

References names_var, nvar, and var.

◆ isvar_double()

bool Kadath::System_of_eqs::isvar_double ( const char *  target,
int &  which 
) const

Check if a string is an unknown (number).

Parameters
target: the string to be tested.
which: the index of the found variable (if found).

Definition at line 25 of file give_ope.cpp.

References names_var_double, and nvar_double.

◆ newton_update_vars()

void Kadath::System_of_eqs::newton_update_vars ( Array< double > const &  xx)

Update the values of var and var_double from the solution of the linear system of the last Newton iteration.

Parameters
xxarray storing the solution of the linear system from the current Newton iteration.

Definition at line 583 of file system_of_eqs.cpp.

References espace, nvar, nvar_double, var, var_double, xx_to_vars(), and Kadath::Space::xx_to_vars_variable_domains().

◆ sec_member()

Array< double > Kadath::System_of_eqs::sec_member ( )

Computes the second member of the Newton-Raphson equations.

It is essentially the coefficients of the residual of all the equations (plus some Galerking issues).

Definition at line 75 of file solver.cpp.

References compute_nbr_of_conditions(), eq, eq_int, nbr_conditions, neq, neq_int, results, Kadath::Array< T >::set(), and vars_to_terms().

◆ set_output_stream()

void Kadath::System_of_eqs::set_output_stream ( std::ostream &  new_output_stream)
inline

Sets a new output stream reference.

Definition at line 208 of file system_of_eqs.hpp.

References output_stream.

◆ translate_second_member()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::translate_second_member ( Array< double > &  secloc,
Array< double > const &  second,
int  nn,
int  bsize,
int  nprow,
int  myrow,
int  mycol 
)
private

Distributes the second member of Newton-Raphson accross the various processors.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ update_fields()

template<Computational_model computational_model = default_computational_model>
void Kadath::System_of_eqs::update_fields ( double  lambda,
vector< double > const &  old_var_double,
vector< Tensor > const &  old_var_fields,
vector< double > const &  p_var_double,
vector< Tensor > const &  p_var_fields 
)
private

Update the fields after a Newton-Raphson iteration.

Used by do_newton_with_linesearch ; only implemented in parallel version.

◆ update_gmres()

void Kadath::System_of_eqs::update_gmres ( const Array< double > &  )

Perfoems one step of the GMRES method (under developpement)

◆ update_terms_from_variable_domains()

void Kadath::System_of_eqs::update_terms_from_variable_domains ( const Array< int > &  zedoms)

Updates the variations of the Term_eq that comes from the fact that some Domains are variable (i.e.

their shape).

Parameters
zedoms: the number of all the variable domains.

Definition at line 236 of file solver.cpp.

References cst, espace, Kadath::Space::get_domain(), Kadath::Array< T >::get_size(), nterm, nterm_cst, term, and Kadath::Domain::update_term_eq().

◆ vars_to_terms()

void Kadath::System_of_eqs::vars_to_terms ( )

Copies the various unknowns (doubles and Tensors) into their Term_eq counterparts.

Definition at line 222 of file system_of_eqs.cpp.

References dom_max, dom_min, espace, Kadath::Space::get_domain(), Kadath::Domain::vars_to_terms(), and vars_to_terms_impl().

◆ vars_to_terms_impl()

void Kadath::System_of_eqs::vars_to_terms_impl ( )
virtual

◆ xx_to_ders()

void Kadath::System_of_eqs::xx_to_ders ( const Array< double > &  vder)

Sets the values the variation of the fields.

Parameters
vder: values of all the variations (essentially the coefficients of all the variations of the unknowns).

Definition at line 417 of file system_of_eqs.cpp.

References Kadath::Domain::affecte_tau(), dom_max, dom_min, espace, Kadath::Space::get_domain(), Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), nbr_unknowns, nterm, nvar_double, term, term_double, and Kadath::Space::xx_to_ders_variable_domains().

◆ xx_to_vars()

void Kadath::System_of_eqs::xx_to_vars ( const Array< double > &  val,
int &  conte 
)

Sets the values the of the fields.

Parameters
val: values of all the fields (essentially the coefficients of all the unknowns).
conte: current position in the Array val.

Definition at line 457 of file system_of_eqs.cpp.

References Kadath::Domain::affecte_tau(), dom_max, dom_min, espace, Kadath::Space::get_domain(), Kadath::Array< T >::get_ndim(), Kadath::Array< T >::get_size(), nbr_unknowns, nvar, nvar_double, var, and var_double.

Member Data Documentation

◆ ALL_COLUMNS

constexpr int Kadath::System_of_eqs::ALL_COLUMNS {-1}
staticconstexpr

Dummy variable for the purpose of better readability.

Definition at line 70 of file system_of_eqs.hpp.

◆ assoc_var

Array<int> Kadath::System_of_eqs::assoc_var
protected

Array giving the correspondance with the var pointers.

Definition at line 114 of file system_of_eqs.hpp.

◆ assoc_var_double

Array<int> Kadath::System_of_eqs::assoc_var_double
protected

Array giving the correspondance with the var_double pointers.

Definition at line 110 of file system_of_eqs.hpp.

◆ cst

MMPtr_array<Term_eq> Kadath::System_of_eqs::cst
protected

Pointers on the Term_eq coming from the constants passed by the user.

Definition at line 118 of file system_of_eqs.hpp.

◆ cst_hard

MMPtr_array<Term_eq> Kadath::System_of_eqs::cst_hard
mutableprotected

Pointers on the Term_eq coming from the constants generated on the fly (when encoutering things like "2.2" etc...)

Definition at line 122 of file system_of_eqs.hpp.

◆ current_output_data

Output_data Kadath::System_of_eqs::current_output_data

Data related to the last newton iterations.

Definition at line 91 of file system_of_eqs.hpp.

◆ def

MMPtr_array<Ope_def> Kadath::System_of_eqs::def
protected

Pointers on the definition (i.e. on the Ope_def that is needed to compute the result).

Definition at line 127 of file system_of_eqs.hpp.

◆ def_glob

MMPtr_array<Ope_def_global> Kadath::System_of_eqs::def_glob
protected

Pointers on the global definitions.

Definition at line 132 of file system_of_eqs.hpp.

◆ default_block_size

std::size_t Kadath::System_of_eqs::default_block_size {64}
static

Defines the sub-matrix size in the scalapack 2D cyclic block decomposition.

For optimal performances, this value should be set so that three blocks can be loaded simultaneously in the lowest level of cache memory

Definition at line 66 of file system_of_eqs.hpp.

◆ dom_max

int Kadath::System_of_eqs::dom_max
protected

Highest domain number.

Definition at line 97 of file system_of_eqs.hpp.

◆ dom_min

int Kadath::System_of_eqs::dom_min
protected

Smallest domain number.

Definition at line 96 of file system_of_eqs.hpp.

◆ eq

MMPtr_array<Equation> Kadath::System_of_eqs::eq
protected

Pointers onto the field equations.

Definition at line 154 of file system_of_eqs.hpp.

◆ eq_int

MMPtr_array<Eq_int> Kadath::System_of_eqs::eq_int
protected

Pointers onto the integral equations.

Definition at line 151 of file system_of_eqs.hpp.

◆ espace

const Space& Kadath::System_of_eqs::espace
protected

Associated Space.

Definition at line 95 of file system_of_eqs.hpp.

◆ met

Metric* Kadath::System_of_eqs::met
protected

Pointer on the associated Metric, if defined.

Definition at line 147 of file system_of_eqs.hpp.

◆ mpi_proc_rank

int Kadath::System_of_eqs::mpi_proc_rank {0}
protected

Sylvain's stuff.

Definition at line 167 of file system_of_eqs.hpp.

◆ mpi_world_size

int Kadath::System_of_eqs::mpi_world_size {1}
protected

Sylvain's stuff.

Definition at line 165 of file system_of_eqs.hpp.

◆ name_met

char* Kadath::System_of_eqs::name_met
protected

Name by which the metric is recognized.

Definition at line 148 of file system_of_eqs.hpp.

◆ names_cst

MMPtr_array<char> Kadath::System_of_eqs::names_cst
protected

Names of the constants passed by the user.

Definition at line 119 of file system_of_eqs.hpp.

◆ names_def

MMPtr_array<char> Kadath::System_of_eqs::names_def
protected

Names of the definitions.

Definition at line 128 of file system_of_eqs.hpp.

◆ names_def_glob

MMPtr_array<char> Kadath::System_of_eqs::names_def_glob
protected

Names of the global definitions.

Definition at line 133 of file system_of_eqs.hpp.

◆ names_opeuser

MMPtr_array<char> Kadath::System_of_eqs::names_opeuser
protected

Names of the user defined operators (single argument).

Definition at line 139 of file system_of_eqs.hpp.

◆ names_opeuser_bin

MMPtr_array<char> Kadath::System_of_eqs::names_opeuser_bin
protected

Names of the user defined operators (with two arguments).

Definition at line 144 of file system_of_eqs.hpp.

◆ names_var

MMPtr_array<char> Kadath::System_of_eqs::names_var
protected

Names of the unknown fields.

Definition at line 106 of file system_of_eqs.hpp.

◆ names_var_double

MMPtr_array<char> Kadath::System_of_eqs::names_var_double
protected

Names of the unknowns that are numbers (i.e. not fields)

Definition at line 102 of file system_of_eqs.hpp.

◆ nb_core_per_node

constexpr std::size_t Kadath::System_of_eqs::nb_core_per_node {24}
staticconstexpr

Sylvain's stuff.

Definition at line 68 of file system_of_eqs.hpp.

◆ nbr_conditions

int Kadath::System_of_eqs::nbr_conditions
protected

Total number of conditions (the number of coefficients of all the equations, once regularities are taken into account).

Definition at line 159 of file system_of_eqs.hpp.

◆ nbr_unknowns

int Kadath::System_of_eqs::nbr_unknowns
protected

Number of unknowns (basically the number of coefficients of all the unknown fields, once regularities are taken into account).

Definition at line 158 of file system_of_eqs.hpp.

◆ ncst

int Kadath::System_of_eqs::ncst
protected

Number of constants passed by the user.

Definition at line 116 of file system_of_eqs.hpp.

◆ ncst_hard

int Kadath::System_of_eqs::ncst_hard
mutableprotected

Number of constants generated on the fly (when encoutering things like "2.2" etc...)

Definition at line 121 of file system_of_eqs.hpp.

◆ ndef

int Kadath::System_of_eqs::ndef
protected

Number of definitions.

Definition at line 126 of file system_of_eqs.hpp.

◆ ndef_glob

int Kadath::System_of_eqs::ndef_glob
protected

Number of global definitions (the one that require the knowledge of the whole space to give the result, like integrals).

Definition at line 131 of file system_of_eqs.hpp.

◆ ndom

int Kadath::System_of_eqs::ndom
protected

Number of domains used.

Definition at line 98 of file system_of_eqs.hpp.

◆ neq

int Kadath::System_of_eqs::neq
protected

Number of field equations.

Definition at line 153 of file system_of_eqs.hpp.

◆ neq_int

int Kadath::System_of_eqs::neq_int
protected

Number of integral equations (i.e. which are doubles)

Definition at line 150 of file system_of_eqs.hpp.

◆ niter

unsigned Kadath::System_of_eqs::niter {0u}
protected

Counter toward the number of times the do_newton method has been called.

Definition at line 163 of file system_of_eqs.hpp.

◆ nopeuser

int Kadath::System_of_eqs::nopeuser
protected

Number of operators defined by the user (single argument).

Definition at line 136 of file system_of_eqs.hpp.

◆ nopeuser_bin

int Kadath::System_of_eqs::nopeuser_bin
protected

Number of operators defined by the user (with two arguments).

Definition at line 141 of file system_of_eqs.hpp.

◆ nterm

int Kadath::System_of_eqs::nterm
protected

Number of Term_eq corresponding to the unknown fields.

Definition at line 112 of file system_of_eqs.hpp.

◆ nterm_cst

int Kadath::System_of_eqs::nterm_cst
protected

Number of Term_eq coming from the constants passed by the user.

Definition at line 117 of file system_of_eqs.hpp.

◆ nterm_double

int Kadath::System_of_eqs::nterm_double
protected

Number of Term_eq corresponding to the unknowns that are numbers.

Definition at line 108 of file system_of_eqs.hpp.

◆ nvar

int Kadath::System_of_eqs::nvar
protected

Number of unknown fields.

Definition at line 104 of file system_of_eqs.hpp.

◆ nvar_double

int Kadath::System_of_eqs::nvar_double
protected

Number of unknowns that are numbers (i.e. not fields)

Definition at line 100 of file system_of_eqs.hpp.

◆ opeuser

Term_eq(* Kadath::System_of_eqs::opeuser[VARMAX])(const Term_eq &, Param *)
protected

Pointers on the functions used by the user defined operators (single argument).

Definition at line 137 of file system_of_eqs.hpp.

◆ opeuser_bin

Term_eq(* Kadath::System_of_eqs::opeuser_bin[VARMAX])(const Term_eq &, const Term_eq &, Param *)
protected

Pointers on the functions used by the user defined operators (with two arguments).

Definition at line 142 of file system_of_eqs.hpp.

◆ output_stream

std::ostream* Kadath::System_of_eqs::output_stream
protected

Default output stream for log messages.

Definition at line 94 of file system_of_eqs.hpp.

◆ paruser

MMPtr_array<Param> Kadath::System_of_eqs::paruser
protected

Parameters used by the user defined operators (single argument).

Definition at line 138 of file system_of_eqs.hpp.

◆ paruser_bin

MMPtr_array<Param> Kadath::System_of_eqs::paruser_bin
protected

Parameters used by the user defined operators (with two arguments).

Definition at line 143 of file system_of_eqs.hpp.

◆ results

MMPtr_array<Term_eq> Kadath::System_of_eqs::results
protected

Pointers on the residual of the various equations.

Definition at line 156 of file system_of_eqs.hpp.

◆ term

MMPtr_array<Term_eq> Kadath::System_of_eqs::term
protected

Pointers on the Term_eq corresponding to the unknown fields.

Definition at line 113 of file system_of_eqs.hpp.

◆ term_double

MMPtr_array<Term_eq> Kadath::System_of_eqs::term_double
protected

Pointers on the Term_eq corresponding to the unknowns that are numbers.

Definition at line 109 of file system_of_eqs.hpp.

◆ val_cst_hard

Array<double> Kadath::System_of_eqs::val_cst_hard
mutableprotected

Values of the constants generated on the fly (when encoutering things like "2.2" etc...)

Definition at line 123 of file system_of_eqs.hpp.

◆ var

MMPtr_array<Tensor> Kadath::System_of_eqs::var
protected

Pointer on the unknown fields.

Definition at line 105 of file system_of_eqs.hpp.

◆ var_double

MMPtr_array<double> Kadath::System_of_eqs::var_double
protected

Pointer on the unknowns that are numbers (i.e. not fields)

Definition at line 101 of file system_of_eqs.hpp.

◆ which_coef

MMPtr_array<Index> Kadath::System_of_eqs::which_coef
protected

Stores the "true" coefficients on some boundaries (probably deprecated).

Definition at line 161 of file system_of_eqs.hpp.


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