KADATH
|
Class to deal with a metric in the spatial harmonic gauge. More...
#include <metric.hpp>
Public Member Functions | |
Metric_harmonic (Metric_tensor &) | |
Constructor from a Metric_tensor . More... | |
Metric_harmonic (const Metric_harmonic &) | |
Copy constructor. More... | |
const Metric_flat & | get_fmet () const |
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 Metric * | get_background () const |
Returns a pointer on the background metric, if it exists. More... | |
const Term_eq * | give_term (int typemet, int dd) const |
Gives one representation of the metric, in a Domain . More... | |
const Term_eq * | give_christo (int dd) const |
Gives the Christoffel symbols, in a Domain . More... | |
const Term_eq * | give_riemann (int dd) const |
Gives the Riemann tensor, in a Domain . More... | |
const Term_eq * | give_ricci_tensor (int dd) const |
Gives the Ricci tensor, in a Domain . More... | |
const Term_eq * | give_ricci_scalar (int dd) const |
Gives the Ricci scalar, in a Domain . More... | |
const Term_eq * | give_dirac (int dd) const |
Gives the potential of the Dirac gauge, in a Domain . More... | |
const Term_eq * | give_det_cov (int dd) const |
Gives the determinant of the covariant metric, in a Domain . More... | |
Protected Member Functions | |
virtual void | compute_ricci_tensor (int) const |
Computes the Ricci tensor, 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... | |
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_dirac (int) const |
Computes the Dirac gauge term, in a given Domain . More... | |
Protected Attributes | |
Metric_tensor * | p_met |
Pointer on the Metric_tensor describing the metric. More... | |
const Base_tensor & | basis |
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 Space & | espace |
The associated Space . More... | |
const System_of_eqs * | syst |
Pointer of the system of equations where the metric is used (only one for now). More... | |
MMPtr_array< Term_eq > | p_met_cov |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_met_con |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_christo |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_riemann |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_ricci_tensor |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_ricci_scalar |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_dirac |
Array of pointers on various Term_eq . More... | |
MMPtr_array< Term_eq > | p_det_cov |
Array of pointers on various Term_eq . More... | |
int | type_tensor |
States if one works in the CON or COV representation. More... | |
Class to deal with a metric in the spatial harmonic gauge.
The gauge not enforced at this level but only assumed to be verified. It has to be part of the equations solved for things to be consistent.
Definition at line 535 of file metric.hpp.
Kadath::Metric_harmonic::Metric_harmonic | ( | Metric_tensor & | met | ) |
Constructor from a Metric_tensor
.
Definition at line 29 of file metric_harmonic.cpp.
References Kadath::Metric_tensor::get_type(), and Kadath::Metric::type_tensor.
Kadath::Metric_harmonic::Metric_harmonic | ( | const Metric_harmonic & | so | ) |
Copy constructor.
Definition at line 34 of file metric_harmonic.cpp.
|
protectedvirtualinherited |
Computes the Christoffel symbols, in a given Domain
.
Reimplemented from Kadath::Metric.
Definition at line 428 of file metric_general.cpp.
References Kadath::Metric_general::basis, Kadath::Metric_general::compute_con(), Kadath::Metric_general::compute_cov(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive(), Kadath::Metric::espace, Kadath::Metric_general::fmet, Kadath::Space::get_domain(), Kadath::Space::get_ndim(), Kadath::Index::inc(), Kadath::Metric::p_christo, Kadath::Metric::p_met_con, Kadath::Metric::p_met_cov, Kadath::Tensor::set(), Kadath::Array< T >::set(), Kadath::Scalar::set_domain(), Kadath::Metric::type_tensor, and Kadath::Term_eq::val_t.
|
protectedvirtualinherited |
Computes the contravariant representation, in a given Domain
.
Reimplemented from Kadath::Metric.
Reimplemented in Kadath::Metric_const.
Definition at line 238 of file metric_general.cpp.
References Kadath::Metric_general::basis, Kadath::System_of_eqs::dom_min, Kadath::Metric::espace, Kadath::Term_eq::get_der_t(), Kadath::Space::get_domain(), Kadath::Tensor::get_n_comp(), Kadath::Space::get_ndim(), Kadath::Term_eq::get_val_t(), Kadath::Metric_general::p_met, Kadath::Metric::p_met_con, Kadath::Metric_general::place_syst, Kadath::Tensor::set(), Kadath::Scalar::set_domain(), Kadath::Metric::syst, Kadath::System_of_eqs::term, and Kadath::Metric::type_tensor.
|
protectedvirtualinherited |
Computes the covariant representation, in a given Domain
.
Reimplemented from Kadath::Metric.
Reimplemented in Kadath::Metric_const.
Definition at line 49 of file metric_general.cpp.
References Kadath::Metric_general::basis, Kadath::System_of_eqs::dom_min, Kadath::Metric::espace, Kadath::Term_eq::get_der_t(), Kadath::Space::get_domain(), Kadath::Tensor::get_n_comp(), Kadath::Space::get_ndim(), Kadath::Term_eq::get_val_t(), Kadath::Metric_general::p_met, Kadath::Metric::p_met_cov, Kadath::Metric_general::place_syst, Kadath::Tensor::set(), Kadath::Scalar::set_domain(), Kadath::Metric::syst, Kadath::System_of_eqs::term, and Kadath::Metric::type_tensor.
|
protectedvirtual |
Computes the determinant of the covariant representation, in a given Domain
.
Reimplemented from Kadath::Metric.
Definition at line 41 of file metric_harmonic.cpp.
References Kadath::Metric_general::compute_cov(), Kadath::Metric::espace, Kadath::Space::get_domain(), Kadath::Space::get_ndim(), Kadath::Metric::p_det_cov, Kadath::Metric::p_met_cov, and Kadath::Scalar::set_domain().
|
protectedvirtualinherited |
Computes the Dirac gauge term, in a given Domain
.
Reimplemented from Kadath::Metric.
Definition at line 756 of file metric_general.cpp.
References Kadath::Metric_general::basis, Kadath::Metric_general::compute_con(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive(), Kadath::Metric::espace, Kadath::Metric_general::fmet, Kadath::Space::get_domain(), Kadath::Space::get_ndim(), Kadath::Index::inc(), Kadath::Metric::p_dirac, Kadath::Metric::p_met_con, Kadath::Tensor::set(), Kadath::Scalar::set_domain(), and Kadath::Term_eq::val_t.
|
protectedvirtual |
Computes the Ricci scalar, in a given Domain
.
Reimplemented from Kadath::Metric.
Definition at line 209 of file metric_harmonic.cpp.
References Kadath::Metric_general::compute_con(), compute_ricci_tensor(), Kadath::Metric::espace, Kadath::Space::get_domain(), Kadath::Space::get_ndim(), Kadath::Metric::p_met_con, Kadath::Metric::p_ricci_scalar, Kadath::Metric::p_ricci_tensor, and Kadath::Scalar::set_domain().
|
protectedvirtual |
Computes the Ricci tensor, in a given Domain
.
Reimplemented from Kadath::Metric_general.
Definition at line 107 of file metric_harmonic.cpp.
References Kadath::Metric_general::basis, Kadath::Metric_general::compute_christo(), compute_det_cov(), Kadath::Metric_general::compute_dirac(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive(), Kadath::Metric::espace, Kadath::Metric_general::fmet, Kadath::Space::get_domain(), Kadath::Space::get_ndim(), Kadath::Index::inc(), Kadath::Metric::p_christo, Kadath::Metric::p_det_cov, Kadath::Metric::p_dirac, Kadath::Metric::p_met_con, Kadath::Metric::p_met_cov, Kadath::Metric::p_ricci_tensor, Kadath::Tensor::set(), Kadath::Scalar::set_domain(), and Kadath::Term_eq::val_t.
|
protectedvirtualinherited |
Computes the Riemann tensor, in a given Domain
.
Reimplemented from Kadath::Metric.
Definition at line 493 of file metric_general.cpp.
References Kadath::Metric_general::basis, Kadath::Metric_general::compute_christo(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive(), Kadath::Metric::espace, Kadath::Metric_general::fmet, Kadath::Space::get_ndim(), Kadath::Index::inc(), Kadath::Metric::p_christo, Kadath::Metric::p_riemann, Kadath::Tensor::set(), Kadath::Array< T >::set(), Kadath::Scalar::set_domain(), and Kadath::Term_eq::val_t.
|
virtualinherited |
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.
typeder | : the result is either ![]() ![]() |
nameder | : the name given as the derivation index. |
so | : the Term_eq to be derived. |
Reimplemented from Kadath::Metric.
Definition at line 632 of file metric_general.cpp.
References Kadath::Metric_general::compute_christo(), Kadath::Term_eq::der_t, Kadath::Metric_flat::derive_with_other(), Kadath::Tensor::do_summation_one_dom(), Kadath::Metric_general::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.
|
virtualinherited |
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.
typeder | : the result is either ![]() ![]() |
nameder | : the name given as the derivation index. |
so | : the Term_eq to be derived. |
Reimplemented from Kadath::Metric.
Definition at line 617 of file metric_general.cpp.
References Kadath::Metric_general::compute_con(), Kadath::Metric_general::compute_cov(), Kadath::Metric_flat::derive_with_other(), Kadath::Metric_general::fmet, Kadath::Term_eq::get_dom(), Kadath::Metric::p_met_con, and Kadath::Metric::p_met_cov.
|
virtualinherited |
Computes the partial 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.
typeder | : the result is either ![]() ![]() |
nameder | : the name given as the derivation index. |
so | : the Term_eq to be derived. |
Reimplemented in Kadath::Metric_flat_nophi, and Kadath::Metric_flat.
Definition at line 172 of file metric.cpp.
References Kadath::Metric::compute_con(), Kadath::Metric::compute_cov(), Kadath::Term_eq::der_t, Kadath::Tensor::do_summation_one_dom(), Kadath::Metric::espace, Kadath::Tensor::get_basis(), Kadath::Base_tensor::get_basis(), Kadath::Term_eq::get_dom(), Kadath::Tensor::get_index_type(), Kadath::Tensor::get_name_ind(), Kadath::Term_eq::get_type_data(), Kadath::Tensor::get_valence(), Kadath::Index::inc(), Kadath::Tensor::is_name_affected(), Kadath::Metric::manipulate_ind(), Kadath::Metric::p_met_con, Kadath::Metric::p_met_cov, Kadath::Tensor::set(), Kadath::Array< T >::set(), Kadath::Index::set(), Kadath::Scalar::set_domain(), Kadath::Tensor::set_name_affected(), Kadath::Tensor::set_name_ind(), Kadath::Metric::type_tensor, and Kadath::Term_eq::val_t.
|
virtualinherited |
Returns a pointer on the background metric, if it exists.
Reimplemented in Kadath::Metric_AADS.
Definition at line 167 of file metric.cpp.
|
inline |
Definition at line 543 of file metric.hpp.
References Kadath::Metric_general::fmet.
|
inherited |
Gives the Christoffel symbols, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives the determinant of the covariant metric, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives the potential of the Dirac gauge, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives the Ricci scalar, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives the Ricci tensor, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives the Riemann tensor, in a Domain
.
This is the Term_eq
version.
dd | : in which Domain . |
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.
|
inherited |
Gives one representation of the metric, in a Domain
.
This is the Term_eq
version.
typemet | : CON or COV. |
dd | : in which Domain . |
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.
|
virtualinherited |
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 Kadath::Metric_general::basis, and Kadath::Base_tensor::get_basis().
|
virtualinherited |
Uses the Metric
to manipulate one of the index of a Term_eq
(i.e.
moves the index up or down)
so | : the Term_eq to be manipulated. |
ind | : index number. |
Reimplemented in Kadath::Metric_AADS, Kadath::Metric_ADS, Kadath::Metric_flat_nophi, and Kadath::Metric_flat.
Definition at line 645 of file metric.cpp.
References Kadath::Metric::compute_con(), Kadath::Metric::compute_cov(), Kadath::Term_eq::der_t, Kadath::Metric::espace, Kadath::Term_eq::get_der_t(), Kadath::Term_eq::get_dom(), Kadath::Space::get_domain(), Kadath::Tensor::get_index_type(), Kadath::Tensor::get_name_ind(), Kadath::Space::get_ndim(), Kadath::Term_eq::get_val_t(), Kadath::Tensor::get_valence(), Kadath::Index::inc(), Kadath::Tensor::is_name_affected(), Kadath::Metric::p_met_con, Kadath::Metric::p_met_cov, Kadath::Tensor::set(), Kadath::Array< T >::set(), Kadath::Index::set(), Kadath::Term_eq::set_der_t(), Kadath::Scalar::set_domain(), Kadath::Tensor::set_name_affected(), Kadath::Tensor::set_name_ind(), Kadath::Term_eq::set_val_t(), Kadath::Metric::type_tensor, and Kadath::Term_eq::val_t.
|
virtualinherited |
Associate the metric to a given system of equations.
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, Kadath::Metric_general::p_met, Kadath::Metric_general::place_syst, and Kadath::Metric::syst.
|
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().
|
virtualinherited |
Updates the derived quantities (Christoffels etc..) in a given Domain
This is done only for the ones that are needed, i.e.
for the ones that have already been computed.
dd | : the index of the Domain . |
Reimplemented in Kadath::Metric_flat_nophi, Kadath::Metric_flat, Kadath::Metric_AADS, and Kadath::Metric_ADS.
Definition at line 82 of file metric.cpp.
References Kadath::Metric::compute_christo(), Kadath::Metric::compute_con(), Kadath::Metric::compute_cov(), Kadath::Metric::compute_det_cov(), Kadath::Metric::compute_dirac(), Kadath::Metric::compute_ricci_scalar(), Kadath::Metric::compute_ricci_tensor(), Kadath::Metric::compute_riemann(), Kadath::Metric::p_christo, Kadath::Metric::p_det_cov, Kadath::Metric::p_dirac, Kadath::Metric::p_met_con, Kadath::Metric::p_met_cov, Kadath::Metric::p_ricci_scalar, Kadath::Metric::p_ricci_tensor, Kadath::Metric::p_riemann, and Kadath::Metric::type_tensor.
|
protectedinherited |
The tensorial basis used.
Definition at line 383 of file metric.hpp.
|
protectedinherited |
The associated Space
.
Definition at line 42 of file metric.hpp.
|
protectedinherited |
Associated flat metric.
Definition at line 384 of file metric.hpp.
|
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.
|
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.
|
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.
|
protectedinherited |
Pointer on the Metric_tensor
describing the metric.
Definition at line 382 of file metric.hpp.
|
mutableprotectedinherited |
|
mutableprotectedinherited |
|
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.
|
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.
|
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.
|
protectedinherited |
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs
.
Definition at line 385 of file metric.hpp.
|
protectedinherited |
Pointer of the system of equations where the metric is used (only one for now).
Definition at line 44 of file metric.hpp.
|
protectedinherited |
States if one works in the CON or COV representation.
Definition at line 86 of file metric.hpp.