LORENE
Lorene::Metric_flat Class Reference

Flat metric for tensor calculation. More...

#include <metric.h>

Inheritance diagram for Lorene::Metric_flat:
Lorene::Metric

Public Member Functions

 Metric_flat (const Map &, const Base_vect &)
 Standard constructor. More...
 
 Metric_flat (const Metric_flat &)
 Copy constructor. More...
 
 Metric_flat (const Map &, FILE *)
 Constructor from a file (see sauve(FILE*) ) More...
 
virtual ~Metric_flat ()
 Destructor. More...
 
void operator= (const Metric_flat &)
 Assignment to another Metric_flat. More...
 
virtual void operator= (const Sym_tensor &tens)
 Assignment from a Sym_tensor . More...
 
const Base_vectget_triad () const
 Returns the vectorial basis (triad) on which the metric is defined. More...
 
virtual const Sym_tensorcov () const
 Read-only access to the covariant representation. More...
 
virtual const Sym_tensorcon () const
 Read-only access to the contravariant representation. More...
 
virtual const Connectionconnect () const
 Returns the connection. More...
 
virtual const Scalarricci_scal () const
 Returns the Ricci scalar. More...
 
virtual const Scalardeterminant () const
 Returns the determinant. More...
 
virtual void sauve (FILE *) const
 Save in a file. More...
 
const Mapget_mp () const
 Returns the mapping. More...
 
const Sym_tensorricci () const
 Returns the Ricci tensor (given by the Connection
p_connect ) More...
 
virtual const Vectorradial_vect () const
 Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity. More...
 

Protected Member Functions

virtual ostream & operator>> (ostream &) const
 Operator >> (virtual function called by the operator <<). More...
 
void del_deriv () const
 Deletes all the derived quantities. More...
 
void set_der_0x0 () const
 Sets to 0x0 all the pointers on derived quantities. More...
 
void del_tensor_depend () const
 Deletes all the derivative members of the Tensor contained in tensor_depend . More...
 
void set_tensor_depend_0x0 () const
 Sets all elements of tensor_depend to 0x0. More...
 

Protected Attributes

const Base_vecttriad
 Vectorial basis (triad) with respect to which the components of the flat metric are defined. More...
 
const Map *const mp
 Reference mapping. More...
 
Sym_tensorp_met_cov
 Pointer on the contravariant representation. More...
 
Sym_tensorp_met_con
 Pointer on the covariant representation. More...
 
Connectionp_connect
 Connection associated with the metric. More...
 
Scalarp_ricci_scal
 Pointer on the Ricci scalar. More...
 
Vectorp_radial_vect
 Pointer to the radial vector normal to a spherical slicing and pointing toward spatial infinity. More...
 
Scalarp_determinant
 Pointer on the determinant. More...
 
const Tensortensor_depend [N_TENSOR_DEPEND]
 Pointer on the dependancies, that means the array contains pointers on all the Tensor whom derivative members have been calculated using *this . More...
 

Detailed Description

Flat metric for tensor calculation.

()

Definition at line 261 of file metric.h.

Constructor & Destructor Documentation

◆ Metric_flat() [1/3]

Lorene::Metric_flat::Metric_flat ( const Map mpi,
const Base_vect triadi 
)

Standard constructor.

Standard constructor from a mapping and a triad.

Definition at line 79 of file metric_flat.C.

References cov().

◆ Metric_flat() [2/3]

Lorene::Metric_flat::Metric_flat ( const Metric_flat meti)

Copy constructor.

Definition at line 88 of file metric_flat.C.

◆ Metric_flat() [3/3]

Lorene::Metric_flat::Metric_flat ( const Map mpi,
FILE *  fd 
)

Constructor from a file (see sauve(FILE*) )

Definition at line 94 of file metric_flat.C.

◆ ~Metric_flat()

Lorene::Metric_flat::~Metric_flat ( )
virtual

Destructor.

Definition at line 106 of file metric_flat.C.

Member Function Documentation

◆ con()

const Sym_tensor & Lorene::Metric_flat::con ( ) const
virtual

Read-only access to the contravariant representation.

Reimplemented from Lorene::Metric.

Definition at line 156 of file metric_flat.C.

References Lorene::Metric::mp, Lorene::Metric::p_met_con, Lorene::Tensor::set(), Lorene::Tensor::std_spectral_base(), and triad.

◆ connect()

const Connection & Lorene::Metric_flat::connect ( ) const
virtual

Returns the connection.

Reimplemented from Lorene::Metric.

Definition at line 178 of file metric_flat.C.

References Lorene::Metric::mp, Lorene::Metric::p_connect, and triad.

◆ cov()

const Sym_tensor & Lorene::Metric_flat::cov ( ) const
virtual

Read-only access to the covariant representation.

Reimplemented from Lorene::Metric.

Definition at line 137 of file metric_flat.C.

References Lorene::Metric::mp, Lorene::Metric::p_met_cov, Lorene::Tensor::set(), Lorene::Tensor::std_spectral_base(), and triad.

◆ del_deriv()

void Lorene::Metric::del_deriv ( ) const
protectedinherited

◆ del_tensor_depend()

void Lorene::Metric::del_tensor_depend ( ) const
protectedinherited

Deletes all the derivative members of the Tensor contained in tensor_depend .

Those quantities had been previously calculated using *this .

Definition at line 200 of file metric.C.

References Lorene::Tensor::del_derive_met(), Lorene::Tensor::get_place_met(), Lorene::Metric::set_tensor_depend_0x0(), and Lorene::Metric::tensor_depend.

◆ determinant()

const Scalar & Lorene::Metric_flat::determinant ( ) const
virtual

Returns the determinant.

This determinant is stored as a Scalar although it a scalar density. To be a real scalar it must be divided by e.g. the determinant of a flat metric.

Reimplemented from Lorene::Metric.

Definition at line 217 of file metric_flat.C.

References Lorene::Metric::mp, Lorene::Metric::p_determinant, and Lorene::Scalar::set_etat_one().

◆ get_mp()

const Map& Lorene::Metric::get_mp ( ) const
inlineinherited

Returns the mapping.

Definition at line 202 of file metric.h.

References Lorene::Metric::mp.

◆ get_triad()

const Base_vect* Lorene::Metric_flat::get_triad ( ) const
inline

Returns the vectorial basis (triad) on which the metric is defined.

Definition at line 309 of file metric.h.

References triad.

◆ operator=() [1/2]

void Lorene::Metric_flat::operator= ( const Metric_flat meti)

Assignment to another Metric_flat.

Definition at line 115 of file metric_flat.C.

References Lorene::Metric::operator=(), and triad.

◆ operator=() [2/2]

void Lorene::Metric_flat::operator= ( const Sym_tensor tens)
virtual

Assignment from a Sym_tensor .

In principle, this method should not be used for a Metric_flat .

Reimplemented from Lorene::Metric.

Definition at line 122 of file metric_flat.C.

◆ operator>>()

ostream & Lorene::Metric_flat::operator>> ( ostream &  ost) const
protectedvirtual

Operator >> (virtual function called by the operator <<).

Reimplemented from Lorene::Metric.

Definition at line 244 of file metric_flat.C.

References triad.

◆ radial_vect()

const Vector & Lorene::Metric::radial_vect ( ) const
virtualinherited

Returns the radial vector normal to a spherical slicing and pointing toward spatial infinity.

Definition at line 365 of file metric.C.

References Lorene::Metric::p_radial_vect, Lorene::Vector::set(), Lorene::sqrt(), and Lorene::Scalar::std_spectral_base().

◆ ricci()

const Sym_tensor & Lorene::Metric::ricci ( ) const
inherited

Returns the Ricci tensor (given by the Connection
p_connect )

Definition at line 341 of file metric.C.

References Lorene::Metric::connect(), and Lorene::Connection::ricci().

◆ ricci_scal()

const Scalar & Lorene::Metric_flat::ricci_scal ( ) const
virtual

Returns the Ricci scalar.

Reimplemented from Lorene::Metric.

Definition at line 204 of file metric_flat.C.

References Lorene::Metric::mp, Lorene::Metric::p_ricci_scal, and Lorene::Scalar::set_etat_zero().

◆ sauve()

void Lorene::Metric_flat::sauve ( FILE *  ) const
virtual

Save in a file.

Reimplemented from Lorene::Metric.

Definition at line 234 of file metric_flat.C.

◆ set_der_0x0()

void Lorene::Metric::set_der_0x0 ( ) const
protectedinherited

Sets to 0x0 all the pointers on derived quantities.

Definition at line 191 of file metric.C.

References Lorene::Metric::p_connect, Lorene::Metric::p_determinant, Lorene::Metric::p_radial_vect, and Lorene::Metric::p_ricci_scal.

◆ set_tensor_depend_0x0()

void Lorene::Metric::set_tensor_depend_0x0 ( ) const
protectedinherited

Sets all elements of tensor_depend to 0x0.

Definition at line 211 of file metric.C.

References Lorene::Metric::tensor_depend.

Member Data Documentation

◆ mp

const Map* const Lorene::Metric::mp
protectedinherited

Reference mapping.

Definition at line 95 of file metric.h.

◆ p_connect

Connection* Lorene::Metric::p_connect
mutableprotectedinherited

Connection associated with the metric.

Definition at line 112 of file metric.h.

◆ p_determinant

Scalar* Lorene::Metric::p_determinant
mutableprotectedinherited

Pointer on the determinant.

Definition at line 132 of file metric.h.

◆ p_met_con

Sym_tensor* Lorene::Metric::p_met_con
mutableprotectedinherited

Pointer on the covariant representation.

Definition at line 105 of file metric.h.

◆ p_met_cov

Sym_tensor* Lorene::Metric::p_met_cov
mutableprotectedinherited

Pointer on the contravariant representation.

Definition at line 100 of file metric.h.

◆ p_radial_vect

Vector* Lorene::Metric::p_radial_vect
mutableprotectedinherited

Pointer to the radial vector normal to a spherical slicing and pointing toward spatial infinity.

Definition at line 125 of file metric.h.

◆ p_ricci_scal

Scalar* Lorene::Metric::p_ricci_scal
mutableprotectedinherited

Pointer on the Ricci scalar.

Remark: the Ricci tensor is stored in the connection (member p_connect->p_ricci ).

Definition at line 119 of file metric.h.

◆ tensor_depend

const Tensor* Lorene::Metric::tensor_depend[N_TENSOR_DEPEND]
mutableprotectedinherited

Pointer on the dependancies, that means the array contains pointers on all the Tensor whom derivative members have been calculated using *this .

Definition at line 139 of file metric.h.

◆ triad

const Base_vect* Lorene::Metric_flat::triad
protected

Vectorial basis (triad) with respect to which the components of the flat metric are defined.

Definition at line 270 of file metric.h.


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