KADATH
Kadath::Metric_general Class Reference

Class to deal with arbitrary type of metric. More...

#include <metric.hpp>

Inheritance diagram for Kadath::Metric_general:
Kadath::Metric Kadath::Metric_const Kadath::Metric_harmonic

Public Member Functions

 Metric_general (Metric_tensor &)
 Constructor from a Metric_tensor. More...
 
 Metric_general (const Metric_general &)
 Copy constructor. More...
 
virtual Term_eq derive (int, char, const Term_eq &) const
 Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition). More...
 
virtual void set_system (System_of_eqs &syst, const char *name)
 Associate the metric to a given system of equations. More...
 
virtual Term_eq derive_flat (int, char, const Term_eq &) const
 Computes the covariant flat derivative of a Term_eq. More...
 
virtual int give_type (int) const
 Returns the type of tensorial basis of the covariant representation, in a given Domain. More...
 
virtual void update ()
 Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed, i.e. More...
 
virtual void update (int dd)
 Updates the derived quantities (Christoffels etc..) in a given Domain This is done only for the ones that are needed, i.e. More...
 
virtual void manipulate_ind (Term_eq &so, int ind) const
 Uses the Metric to manipulate one of the index of a Term_eq (i.e. More...
 
virtual Term_eq derive_partial (int typeder, char nameder, const Term_eq &so) const
 Computes the partial derivative of a Term_eq (assumes Cartesian basis of decomposition). More...
 
virtual const Metricget_background () const
 Returns a pointer on the background metric, if it exists. More...
 
const Term_eqgive_term (int typemet, int dd) const
 Gives one representation of the metric, in a Domain. More...
 
const Term_eqgive_christo (int dd) const
 Gives the Christoffel symbols, in a Domain. More...
 
const Term_eqgive_riemann (int dd) const
 Gives the Riemann tensor, in a Domain. More...
 
const Term_eqgive_ricci_tensor (int dd) const
 Gives the Ricci tensor, in a Domain. More...
 
const Term_eqgive_ricci_scalar (int dd) const
 Gives the Ricci scalar, in a Domain. More...
 
const Term_eqgive_dirac (int dd) const
 Gives the potential of the Dirac gauge, in a Domain. More...
 
const Term_eqgive_det_cov (int dd) const
 Gives the determinant of the covariant metric, in a Domain. More...
 

Protected Member Functions

virtual void compute_con (int) const
 Computes the contravariant representation, in a given Domain. More...
 
virtual void compute_cov (int) const
 Computes the covariant representation, in a given Domain. More...
 
virtual void compute_christo (int) const
 Computes the Christoffel symbols, in a given Domain. More...
 
virtual void compute_riemann (int) const
 Computes the Riemann tensor, in a given Domain. More...
 
virtual void compute_ricci_tensor (int) const
 Computes the Ricci tensor, in a given Domain. More...
 
virtual void compute_dirac (int) const
 Computes the Dirac gauge term, in a given Domain. More...
 
virtual void compute_ricci_scalar (int) const
 Computes the Ricci scalar, in a given Domain. More...
 
virtual void compute_det_cov (int) const
 Computes the determinant of the covariant representation, in a given Domain. More...
 

Protected Attributes

Metric_tensorp_met
 Pointer on the Metric_tensor describing the metric. More...
 
const Base_tensorbasis
 The tensorial basis used. More...
 
Metric_flat fmet
 Associated flat metric. More...
 
int place_syst
 Gives the location of the metric amongst the various unknowns of the associated System_of_eqs. More...
 
const Spaceespace
 The associated Space. More...
 
const System_of_eqssyst
 Pointer of the system of equations where the metric is used (only one for now). More...
 
MMPtr_array< Term_eqp_met_cov
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_met_con
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_christo
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_riemann
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_ricci_tensor
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_ricci_scalar
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_dirac
 Array of pointers on various Term_eq. More...
 
MMPtr_array< Term_eqp_det_cov
 Array of pointers on various Term_eq. More...
 
int type_tensor
 States if one works in the CON or COV representation. More...
 

Detailed Description

Class to deal with arbitrary type of metric.

Definition at line 379 of file metric.hpp.

Constructor & Destructor Documentation

◆ Metric_general() [1/2]

Kadath::Metric_general::Metric_general ( Metric_tensor met)

Constructor from a Metric_tensor.

Definition at line 30 of file metric_general.cpp.

References Kadath::Metric_tensor::get_type(), and Kadath::Metric::type_tensor.

◆ Metric_general() [2/2]

Kadath::Metric_general::Metric_general ( const Metric_general so)

Copy constructor.

Definition at line 35 of file metric_general.cpp.

Member Function Documentation

◆ compute_christo()

◆ compute_con()

◆ compute_cov()

◆ compute_det_cov()

void Kadath::Metric::compute_det_cov ( int  ) const
protectedvirtualinherited

Computes the determinant of the covariant representation, in a given Domain.

Reimplemented in Kadath::Metric_harmonic.

Definition at line 750 of file metric.cpp.

◆ compute_dirac()

◆ compute_ricci_scalar()

◆ compute_ricci_tensor()

◆ compute_riemann()

◆ derive()

Term_eq Kadath::Metric_general::derive ( int  typeder,
char  nameder,
const Term_eq so 
) const
virtual

Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).

The index corresponding to the derivation is given a name. If need be inner summation is performed.

Parameters
typeder: the result is either $D_i$ or $D^i$
nameder: the name given as the derivation index.
so: the Term_eq to be derived.
Returns
: the covariant derivative.

Reimplemented from Kadath::Metric.

Definition at line 632 of file metric_general.cpp.

References compute_christo(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive_with_other(), Kadath::Tensor::do_summation_one_dom(), fmet, Kadath::Term_eq::get_dom(), Kadath::Tensor::get_index_type(), Kadath::Tensor::get_name_ind(), Kadath::Tensor::get_parameters(), Kadath::Tensor::get_valence(), Kadath::Tensor::is_m_quant_affected(), Kadath::Metric::manipulate_ind(), Kadath::Metric::p_christo, Kadath::Tensor::set_name_affected(), Kadath::Tensor::set_name_ind(), Kadath::Tensor::set_parameters(), and Kadath::Term_eq::val_t.

◆ derive_flat()

Term_eq Kadath::Metric_general::derive_flat ( int  typeder,
char  nameder,
const Term_eq so 
) const
virtual

Computes the covariant flat derivative of a Term_eq.

The index corresponding to the derivation is given a name. If need be inner summation is performed.

Parameters
typeder: the result is either $\bar{D}_i$ or $\bar{D}^i$
nameder: the name given as the derivation index.
so: the Term_eq to be derived.
Returns
: the covariant flat derivative.

Reimplemented from Kadath::Metric.

Definition at line 617 of file metric_general.cpp.

References compute_con(), compute_cov(), Kadath::Metric_flat::derive_with_other(), fmet, Kadath::Term_eq::get_dom(), Kadath::Metric::p_met_con, and Kadath::Metric::p_met_cov.

◆ derive_partial()

Term_eq Kadath::Metric::derive_partial ( int  typeder,
char  nameder,
const Term_eq so 
) const
virtualinherited

◆ get_background()

const Metric * Kadath::Metric::get_background ( ) const
virtualinherited

Returns a pointer on the background metric, if it exists.

Reimplemented in Kadath::Metric_AADS.

Definition at line 167 of file metric.cpp.

◆ give_christo()

const Term_eq * Kadath::Metric::give_christo ( int  dd) const
inherited

Gives the Christoffel symbols, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 124 of file metric.cpp.

References Kadath::Metric::compute_christo(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_christo.

◆ give_det_cov()

const Term_eq * Kadath::Metric::give_det_cov ( int  dd) const
inherited

Gives the determinant of the covariant metric, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 159 of file metric.cpp.

References Kadath::Metric::compute_det_cov(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_det_cov.

◆ give_dirac()

const Term_eq * Kadath::Metric::give_dirac ( int  dd) const
inherited

Gives the potential of the Dirac gauge, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 152 of file metric.cpp.

References Kadath::Metric::compute_dirac(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_dirac.

◆ give_ricci_scalar()

const Term_eq * Kadath::Metric::give_ricci_scalar ( int  dd) const
inherited

Gives the Ricci scalar, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 145 of file metric.cpp.

References Kadath::Metric::compute_ricci_scalar(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_ricci_scalar.

◆ give_ricci_tensor()

const Term_eq * Kadath::Metric::give_ricci_tensor ( int  dd) const
inherited

Gives the Ricci tensor, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 138 of file metric.cpp.

References Kadath::Metric::compute_ricci_tensor(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_ricci_tensor.

◆ give_riemann()

const Term_eq * Kadath::Metric::give_riemann ( int  dd) const
inherited

Gives the Riemann tensor, in a Domain.

This is the Term_eq version.

Parameters
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 131 of file metric.cpp.

References Kadath::Metric::compute_riemann(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), and Kadath::Metric::p_riemann.

◆ give_term()

const Term_eq * Kadath::Metric::give_term ( int  typemet,
int  dd 
) const
inherited

Gives one representation of the metric, in a Domain.

This is the Term_eq version.

Parameters
typemet: CON or COV.
dd: in which Domain.
Returns
: pointer on the result (being a Term_eq).

Definition at line 103 of file metric.cpp.

References Kadath::Metric::compute_con(), Kadath::Metric::compute_cov(), Kadath::Metric::espace, Kadath::Space::get_nbr_domains(), Kadath::Metric::p_met_con, and Kadath::Metric::p_met_cov.

◆ give_type()

int Kadath::Metric_general::give_type ( int  dd) const
virtual

Returns the type of tensorial basis of the covariant representation, in a given Domain.

Reimplemented from Kadath::Metric.

Definition at line 43 of file metric_general.cpp.

References basis, and Kadath::Base_tensor::get_basis().

◆ manipulate_ind()

◆ set_system()

void Kadath::Metric_general::set_system ( System_of_eqs syst,
const char *  name 
)
virtual

Associate the metric to a given system of equations.

Parameters
syst: the System_of_eqs.
name: name by which the metric will be known in the system (like "g", "f"...)

Reimplemented in Kadath::Metric_const.

Definition at line 802 of file metric_general.cpp.

References Kadath::System_of_eqs::add_var(), Kadath::System_of_eqs::met, Kadath::System_of_eqs::name_met, Kadath::System_of_eqs::ndom, Kadath::System_of_eqs::nvar, p_met, place_syst, and Kadath::Metric::syst.

◆ update() [1/2]

void Kadath::Metric::update ( )
virtualinherited

Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed, i.e.

for the ones that have already been computed.

Reimplemented in Kadath::Metric_flat_nophi, Kadath::Metric_AADS, Kadath::Metric_ADS, and Kadath::Metric_flat.

Definition at line 99 of file metric.cpp.

References Kadath::Metric::espace, and Kadath::Space::get_nbr_domains().

◆ update() [2/2]

Member Data Documentation

◆ basis

const Base_tensor& Kadath::Metric_general::basis
protected

The tensorial basis used.

Definition at line 383 of file metric.hpp.

◆ espace

const Space& Kadath::Metric::espace
protectedinherited

The associated Space.

Definition at line 42 of file metric.hpp.

◆ fmet

Metric_flat Kadath::Metric_general::fmet
protected

Associated flat metric.

Definition at line 384 of file metric.hpp.

◆ p_christo

MMPtr_array<Term_eq> Kadath::Metric::p_christo
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto one component of the Christoffel symbols, in a given Domain.

Definition at line 60 of file metric.hpp.

◆ p_det_cov

MMPtr_array<Term_eq> Kadath::Metric::p_det_cov
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto determinant of the covariant representation, in a given Domain.

Definition at line 85 of file metric.hpp.

◆ p_dirac

MMPtr_array<Term_eq> Kadath::Metric::p_dirac
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto the potential of the Dirac gauge, in a given Domain.

Definition at line 80 of file metric.hpp.

◆ p_met

Metric_tensor* Kadath::Metric_general::p_met
protected

Pointer on the Metric_tensor describing the metric.

Definition at line 382 of file metric.hpp.

◆ p_met_con

MMPtr_array<Term_eq> Kadath::Metric::p_met_con
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto one component of the contravariant representation of the Metric, in a given Domain.

Definition at line 55 of file metric.hpp.

◆ p_met_cov

MMPtr_array<Term_eq> Kadath::Metric::p_met_cov
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto one component of the covariant representation of the Metric, in a given Domain.

Definition at line 50 of file metric.hpp.

◆ p_ricci_scalar

MMPtr_array<Term_eq> Kadath::Metric::p_ricci_scalar
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto the Ricci scalar, in a given Domain.

Definition at line 75 of file metric.hpp.

◆ p_ricci_tensor

MMPtr_array<Term_eq> Kadath::Metric::p_ricci_tensor
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto one component of the Ricci tensor, in a given Domain.

Definition at line 70 of file metric.hpp.

◆ p_riemann

MMPtr_array<Term_eq> Kadath::Metric::p_riemann
mutableprotectedinherited

Array of pointers on various Term_eq.

Each one points onto one component of the Riemann tensor, in a given Domain.

Definition at line 65 of file metric.hpp.

◆ place_syst

int Kadath::Metric_general::place_syst
protected

Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.

Definition at line 385 of file metric.hpp.

◆ syst

const System_of_eqs* Kadath::Metric::syst
protectedinherited

Pointer of the system of equations where the metric is used (only one for now).

Definition at line 44 of file metric.hpp.

◆ type_tensor

int Kadath::Metric::type_tensor
protectedinherited

States if one works in the CON or COV representation.

Definition at line 86 of file metric.hpp.


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