KADATH
Kadath::Term_eq Class Reference

This class is intended to describe the manage objects appearing in the equations. More...

#include <term_eq.hpp>

Inheritance diagram for Kadath::Term_eq:

Public Member Functions

 Term_eq (int dom, int val)
 Constructor for a double type Term_eq. More...
 
 Term_eq (int dom, double val)
 Constructor for a double type Term_eq. More...
 
 Term_eq (int dom, double val, double der)
 Constructor for a double type Term_eq. More...
 
 Term_eq (int dom, const Tensor &val)
 Constructor for a tensorial field Term_eq. More...
 
 Term_eq (int dom, const Tensor &val, const Tensor &der)
 Constructor for a tensorial field Term_eq. More...
 
 Term_eq (const Term_eq &)
 Copy constructor. More...
 
 ~Term_eq ()
 Destructor. More...
 
 Term_eq (Term_eq &&) noexcept
 Move constructor. More...
 
Term_eqoperator= (Term_eq &&) noexcept
 Move assignment operator. More...
 
double get_val_d () const
 
double get_der_d () const
 
Tensor const & get_val_t () const
 
Tensor const & get_der_t () const
 
const Tensorget_p_val_t () const
 
const Tensorget_p_der_t () const
 
int get_type_data () const
 
int get_dom () const
 
void operator= (const Term_eq &)
 Assignment operator. More...
 
void set_val_d (double)
 Sets the double value. More...
 
void set_der_d (double)
 Sets the double variation. More...
 
void set_val_t (Tensor)
 Sets the tensorial value (only the values in the pertinent Domain are copied). More...
 
void set_der_t (Tensor)
 Sets the tensorial variation (only the values in the pertinent Domain are copied). More...
 
void set_der_zero ()
 Sets the variation of the approriate type to zero. More...
 
Tensorset_val_t ()
 Read/write accessor to the tensorial value. More...
 
Tensorset_der_t ()
 Read/write accessor to the tensorial derivative. More...
 
Term_eq der_abs (int i) const
 Computes the derivative wrt to an absolute coordinate (i.e. More...
 

Protected Attributes

const int dom
 Index of the Domain where the Term_eq is defined. More...
 
double * val_d
 Pointer on the value, if the Term_eq is a double. More...
 
double * der_d
 Pointer on the variation if the Term_eq is a double. More...
 
Tensorval_t
 Pointer on the value, if the Term_eq is a Tensor. More...
 
Tensorder_t
 Pointer on the variation, if the Term_eq is a Tensor. More...
 
const int type_data
 Flag describing the type of data : More...
 

Friends

class Ope_lap
 
class Ope_lap2
 
class Ope_dn
 
class Ope_int
 
class Ope_grad
 
class Ope_id
 
class Ope_der
 
class Ope_der_flat
 
class Ope_der_background
 
class Ope_mult_r
 
class Ope_mult_x
 
class Ope_div_rsint
 
class Ope_mult_rsint
 
class Ope_div_r
 
class Ope_div_sint
 
class Ope_div_cost
 
class Ope_mult_sint
 
class Ope_div_xpone
 
class Ope_partial
 
class Ope_partial_var
 
class Ope_determinant
 
class Ope_inverse
 
class Ope_inverse_nodet
 
class Ope_mode
 
class Ope_val_mode
 
class Ope_val
 
class Ope_point
 
class Ope_val_ori
 
class Ope_sqrt
 
class Ope_sqrt_anti
 
class Ope_sqrt_nonstd
 
class Ope_def
 
class Ope_def_global
 
class Ope_srdr
 
class Ope_ddp
 
class Ope_ddt
 
class Ope_dt
 
class Ope_ddr
 
class Ope_dr
 
class Ope_exp
 
class Ope_log
 
class Ope_atanh
 
class Ope_cosh
 
class Ope_sinh
 
class Ope_cos
 
class Ope_sin
 
class Ope_int_volume
 
class Ope_fit_waves
 
class Ope_change_basis
 
class Ope_mult_1mrsL
 
class Ope_div_1mrsL
 
class Ope_div_1mx2
 
class Ope_dtime
 
class Ope_ddtime
 
class Ope_conjug
 
class Domain
 
class Domain_nucleus
 
class Domain_shell
 
class Domain_compact
 
class Domain_shell_outer_adapted
 
class Domain_shell_inner_adapted
 
class Domain_polar_shell_outer_adapted
 
class Domain_polar_shell_inner_adapted
 
class Domain_polar_shell_inner_homothetic
 
class Domain_polar_shell_outer_homothetic
 
class Domain_bispheric_rect
 
class Domain_bispheric_eta_first
 
class Domain_bispheric_chi_first
 
class Domain_nucleus_symphi
 
class Domain_shell_symphi
 
class Domain_compact_symphi
 
class Metric
 
class Metric_general
 
class Metric_flat
 
class Metric_dirac
 
class Metric_dirac_const
 
class Metric_harmonic
 
class Metric_conf
 
class Metric_const
 
class Metric_ADS
 
class Metric_AADS
 
class Metric_conf_factor
 
class Metric_conf_factor_const
 
class System_of_eqs
 
class Space_spheric_adapted
 
class Space_polar_adapted
 
class Space_bin_ns
 
class Space_bin_bh
 
class Metric_flat_nophi
 
class Metric_nophi
 
class Metric_nophi_const
 
class Metric_nophi_AADS
 
class Metric_nophi_AADS_const
 
class Metric_cfc
 
class Domain_polar_periodic_nucleus
 
class Domain_polar_periodic_shell
 
class Space_polar_periodic
 
class Space_adapted_bh
 
class Space_bbh
 
ostream & operator<< (ostream &, const Term_eq &)
 Display. More...
 
Term_eq operator+ (const Term_eq &, const Term_eq &)
 Operator +. More...
 
Term_eq operator- (const Term_eq &, const Term_eq &)
 Operator -. More...
 
Term_eq operator* (const Term_eq &, const Term_eq &)
 Operator *. More...
 
Term_eq operator/ (const Term_eq &, const Term_eq &)
 Operator /. More...
 
Term_eq scalar_product (const Term_eq &, const Term_eq &)
 Operator scalar product. More...
 
Term_eq operator* (int, const Term_eq &)
 Operator *. More...
 
Term_eq operator* (const Term_eq &, int)
 Operator *. More...
 
Term_eq operator* (double, const Term_eq &)
 Operator *. More...
 
Term_eq operator* (const Term_eq &, double)
 Operator *. More...
 
Term_eq operator* (const Scalar &, const Term_eq &)
 Operator *. More...
 
Term_eq operator/ (const Term_eq &, double)
 Operator /. More...
 
Term_eq sqrt (const Term_eq &)
 Operator square root. More...
 
Term_eq partial (const Term_eq &, char)
 Operator partial derivative. More...
 
Term_eq div_1mx2 (const Term_eq &)
 Division by $1-x^2$. More...
 
Term_eq bessel_jl (const Term_eq &, int)
 Bessel function. More...
 
Term_eq bessel_yl (const Term_eq &, int)
 Bessel function. More...
 
Term_eq bessel_djl (const Term_eq &, int)
 Bessel function. More...
 
Term_eq bessel_dyl (const Term_eq &, int)
 Bessel function. More...
 
Term_eq fjl (const Space &, int, int, const Term_eq &, const Param &)
 Bessel function. More...
 
Term_eq fyl (const Space &, int, int, const Term_eq &, const Param &)
 Bessel function. More...
 
Term_eq operator+ (const Term_eq &, double)
 Operator +. More...
 
Term_eq operator+ (double, const Term_eq &)
 Operator +. More...
 
Term_eq operator- (const Term_eq &)
 Operator -. More...
 

Detailed Description

This class is intended to describe the manage objects appearing in the equations.

Basically a Term_eq can be either a double or a tensorial field. It is also defined only in a given Domain and not in the whole space. ALong with the quantity itself it also contains its variation that is used by the automatic differentiation algorithm to compute the Jacobian of the system.

Definition at line 62 of file term_eq.hpp.

Constructor & Destructor Documentation

◆ Term_eq() [1/7]

Kadath::Term_eq::Term_eq ( int  dom,
int  val 
)
inline

Constructor for a double type Term_eq.

Only the value is initialized.

Parameters
dom: the domain.
val: the value (as an integer).

Definition at line 289 of file term_eq.hpp.

◆ Term_eq() [2/7]

Kadath::Term_eq::Term_eq ( int  dom,
double  val 
)
inline

Constructor for a double type Term_eq.

Only the value is initialized.

Parameters
dom: the domain.
val: the value.

Definition at line 295 of file term_eq.hpp.

◆ Term_eq() [3/7]

Kadath::Term_eq::Term_eq ( int  dom,
double  val,
double  der 
)
inline

Constructor for a double type Term_eq.

Parameters
dom: the domain.
val: the value.
der: the variation.

Definition at line 299 of file term_eq.hpp.

◆ Term_eq() [4/7]

Kadath::Term_eq::Term_eq ( int  dom,
const Tensor val 
)

◆ Term_eq() [5/7]

Kadath::Term_eq::Term_eq ( int  dom,
const Tensor val,
const Tensor der 
)

Constructor for a tensorial field Term_eq.

Only the value is initialized.

Parameters
dom: the domain.
val: the value.
der: the variation.

Definition at line 41 of file term_eq.cpp.

References der_t, dom, Kadath::Tensor::get_n_comp(), Kadath::Tensor::get_name_ind(), Kadath::Tensor::get_valence(), Kadath::Tensor::indices(), Kadath::Tensor::is_name_affected(), Kadath::Tensor::set(), Kadath::Scalar::set_domain(), Kadath::Tensor::set_name_affected(), Kadath::Tensor::set_name_ind(), and val_t.

◆ Term_eq() [6/7]

◆ ~Term_eq()

Kadath::Term_eq::~Term_eq ( )

Destructor.

Definition at line 104 of file term_eq.cpp.

References der_d, der_t, val_d, and val_t.

◆ Term_eq() [7/7]

Kadath::Term_eq::Term_eq ( Kadath::Term_eq &&  so)
inlinenoexcept

Move constructor.

Definition at line 303 of file term_eq.hpp.

Member Function Documentation

◆ der_abs()

Term_eq Kadath::Term_eq::der_abs ( int  i) const

Computes the derivative wrt to an absolute coordinate (i.e.

like the Cartesian ones).

Parameters
i: the index of the coordinate (from 1 to the dimension).

Definition at line 39 of file term_eq_math.cpp.

References Kadath::Val_domain::der_abs(), der_t, dom, Kadath::Index::inc(), Kadath::Tensor::set(), Kadath::Scalar::set_domain(), type_data, and val_t.

◆ get_der_d()

double Kadath::Term_eq::get_der_d ( ) const
inline
Returns
the double variation.

Definition at line 341 of file term_eq.hpp.

References der_d, and type_data.

◆ get_der_t()

Tensor const & Kadath::Term_eq::get_der_t ( ) const
inline
Returns
the tensorial variation.

Definition at line 369 of file term_eq.hpp.

References der_t, and type_data.

◆ get_dom()

int Kadath::Term_eq::get_dom ( ) const
inline
Returns
the index of the Domain.

Definition at line 135 of file term_eq.hpp.

References dom.

◆ get_p_der_t()

const Tensor* Kadath::Term_eq::get_p_der_t ( ) const
inline
Returns
a pointer on the tensorial variation.

Definition at line 127 of file term_eq.hpp.

References der_t.

◆ get_p_val_t()

const Tensor* Kadath::Term_eq::get_p_val_t ( ) const
inline
Returns
a pointer on the tensorial value.

Definition at line 123 of file term_eq.hpp.

References val_t.

◆ get_type_data()

int Kadath::Term_eq::get_type_data ( ) const
inline
Returns
the type of data (TERM_D or TERM_T)

Definition at line 131 of file term_eq.hpp.

References type_data.

◆ get_val_d()

double Kadath::Term_eq::get_val_d ( ) const
inline
Returns
the double value.

Definition at line 327 of file term_eq.hpp.

References type_data, and val_d.

◆ get_val_t()

Tensor const & Kadath::Term_eq::get_val_t ( ) const
inline
Returns
the tensorial value.

Definition at line 355 of file term_eq.hpp.

References type_data, and val_t.

◆ operator=() [1/2]

void Kadath::Term_eq::operator= ( const Term_eq so)

Assignment operator.

Definition at line 116 of file term_eq.cpp.

References der_d, der_t, dom, type_data, val_d, and val_t.

◆ operator=() [2/2]

Term_eq & Kadath::Term_eq::operator= ( Term_eq &&  so)
inlinenoexcept

Move assignment operator.

Definition at line 317 of file term_eq.hpp.

◆ set_der_d()

void Kadath::Term_eq::set_der_d ( double  so)
inline

Sets the double variation.

Definition at line 395 of file term_eq.hpp.

References der_d, and type_data.

◆ set_der_t() [1/2]

Tensor* Kadath::Term_eq::set_der_t ( )
inline

Read/write accessor to the tensorial derivative.

Definition at line 151 of file term_eq.hpp.

References der_t.

◆ set_der_t() [2/2]

void Kadath::Term_eq::set_der_t ( Tensor  so)

Sets the tensorial variation (only the values in the pertinent Domain are copied).

Definition at line 171 of file term_eq.cpp.

References der_t, dom, Kadath::Tensor::get_n_comp(), Kadath::Tensor::indices(), Kadath::Tensor::set(), Kadath::Scalar::set_domain(), type_data, and val_t.

◆ set_der_zero()

void Kadath::Term_eq::set_der_zero ( )

Sets the variation of the approriate type to zero.

Definition at line 187 of file term_eq.cpp.

References der_d, der_t, dom, Kadath::Tensor::get_n_comp(), Kadath::Tensor::indices(), Kadath::Tensor::set(), Kadath::Scalar::set_domain(), Kadath::Val_domain::set_zero(), type_data, and val_t.

◆ set_val_d()

void Kadath::Term_eq::set_val_d ( double  so)
inline

Sets the double value.

Definition at line 383 of file term_eq.hpp.

References type_data, and val_d.

◆ set_val_t() [1/2]

Tensor* Kadath::Term_eq::set_val_t ( )
inline

Read/write accessor to the tensorial value.

Definition at line 147 of file term_eq.hpp.

References val_t.

◆ set_val_t() [2/2]

void Kadath::Term_eq::set_val_t ( Tensor  so)

Sets the tensorial value (only the values in the pertinent Domain are copied).

Definition at line 155 of file term_eq.cpp.

References dom, Kadath::Tensor::get_n_comp(), Kadath::Tensor::indices(), Kadath::Tensor::set(), Kadath::Scalar::set_domain(), type_data, and val_t.

Friends And Related Function Documentation

◆ bessel_djl

Term_eq bessel_djl ( const Term_eq so,
int  ll 
)
friend

Bessel function.

Definition at line 159 of file term_eq_bessel.cpp.

◆ bessel_dyl

Term_eq bessel_dyl ( const Term_eq so,
int  ll 
)
friend

Bessel function.

Definition at line 267 of file term_eq_bessel.cpp.

◆ bessel_jl

Term_eq bessel_jl ( const Term_eq so,
int  ll 
)
friend

Bessel function.

Definition at line 25 of file term_eq_bessel.cpp.

◆ bessel_yl

Term_eq bessel_yl ( const Term_eq so,
int  ll 
)
friend

Bessel function.

Definition at line 93 of file term_eq_bessel.cpp.

◆ div_1mx2

Term_eq div_1mx2 ( const Term_eq so)
friend

Division by $1-x^2$.

Definition at line 703 of file term_eq_math.cpp.

◆ fjl

Term_eq fjl ( const Space space,
int  mm,
int  ll,
const Term_eq omega,
const Param parfit 
)
friend

Bessel function.

Definition at line 44 of file ope_fit_waves.cpp.

◆ fyl

Term_eq fyl ( const Space space,
int  mm,
int  ll,
const Term_eq omega,
const Param parfit 
)
friend

Bessel function.

Definition at line 72 of file ope_fit_waves.cpp.

◆ operator* [1/6]

Term_eq operator* ( const Scalar fact,
const Term_eq so 
)
friend

Operator *.

Definition at line 616 of file term_eq_math.cpp.

◆ operator* [2/6]

Term_eq operator* ( const Term_eq aa,
const Term_eq bb 
)
friend

Operator *.

Definition at line 249 of file term_eq_math.cpp.

◆ operator* [3/6]

Term_eq operator* ( const Term_eq so,
double  xx 
)
friend

Operator *.

Definition at line 637 of file term_eq_math.cpp.

◆ operator* [4/6]

Term_eq operator* ( const Term_eq so,
int  nn 
)
friend

Operator *.

Definition at line 590 of file term_eq_math.cpp.

◆ operator* [5/6]

Term_eq operator* ( double  xx,
const Term_eq so 
)
friend

Operator *.

Definition at line 594 of file term_eq_math.cpp.

◆ operator* [6/6]

Term_eq operator* ( int  nn,
const Term_eq so 
)
friend

Operator *.

Definition at line 568 of file term_eq_math.cpp.

◆ operator+ [1/3]

Term_eq operator+ ( const Term_eq aa,
const Term_eq bb 
)
friend

Operator +.

Definition at line 65 of file term_eq_math.cpp.

◆ operator+ [2/3]

Term_eq operator+ ( const Term_eq aa,
double  xx 
)
friend

Operator +.

Definition at line 25 of file term_eq_math.cpp.

◆ operator+ [3/3]

Term_eq operator+ ( double  xx,
const Term_eq aa 
)
friend

Operator +.

Definition at line 30 of file term_eq_math.cpp.

◆ operator- [1/2]

Term_eq operator- ( const Term_eq aa)
friend

Operator -.

Definition at line 35 of file term_eq_math.cpp.

◆ operator- [2/2]

Term_eq operator- ( const Term_eq aa,
const Term_eq bb 
)
friend

Operator -.

Definition at line 159 of file term_eq_math.cpp.

◆ operator/ [1/2]

Term_eq operator/ ( const Term_eq aa,
const Term_eq bb 
)
friend

Operator /.

Definition at line 345 of file term_eq_math.cpp.

◆ operator/ [2/2]

Term_eq operator/ ( const Term_eq so,
double  xx 
)
friend

Operator /.

Definition at line 641 of file term_eq_math.cpp.

◆ operator<<

ostream& operator<< ( ostream &  flux,
const Term_eq so 
)
friend

Display.

Definition at line 208 of file term_eq.cpp.

◆ partial

Term_eq partial ( const Term_eq so,
char  ind 
)
friend

Operator partial derivative.

Definition at line 685 of file term_eq_math.cpp.

◆ scalar_product

Term_eq scalar_product ( const Term_eq aa,
const Term_eq bb 
)
friend

Operator scalar product.

Definition at line 444 of file term_eq_math.cpp.

◆ sqrt

Term_eq sqrt ( const Term_eq so)
friend

Operator square root.

Definition at line 663 of file term_eq_math.cpp.

Member Data Documentation

◆ der_d

double* Kadath::Term_eq::der_d
protected

Pointer on the variation if the Term_eq is a double.

Definition at line 67 of file term_eq.hpp.

◆ der_t

Tensor* Kadath::Term_eq::der_t
protected

Pointer on the variation, if the Term_eq is a Tensor.

Definition at line 69 of file term_eq.hpp.

◆ dom

const int Kadath::Term_eq::dom
protected

Index of the Domain where the Term_eq is defined.

Definition at line 65 of file term_eq.hpp.

◆ type_data

const int Kadath::Term_eq::type_data
protected

Flag describing the type of data :

  • TERM_D for a double
  • TERM_T for a tensorial field.

Definition at line 75 of file term_eq.hpp.

◆ val_d

double* Kadath::Term_eq::val_d
protected

Pointer on the value, if the Term_eq is a double.

Definition at line 66 of file term_eq.hpp.

◆ val_t

Tensor* Kadath::Term_eq::val_t
protected

Pointer on the value, if the Term_eq is a Tensor.

Definition at line 68 of file term_eq.hpp.


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