Connection Class Reference
[Tensorial fields]

Class Connection. More...

#include <connection.h>

Inheritance diagram for Connection:
Connection_flat Connection_fcart Connection_fspher

List of all members.

Public Member Functions

 Connection (const Tensor_sym &delta_i, const Metric_flat &flat_met_i)
 Standard constructor ab initio.
 Connection (const Metric &met, const Metric_flat &flat_met_i)
 Standard constructor for a connection associated with a metric.
 Connection (const Connection &)
 Copy constructor.
virtual ~Connection ()
 Destructor.
void operator= (const Connection &)
 Assignment to another Connection.
void update (const Tensor_sym &delta_i)
 Update the connection when it is defined ab initio.
void update (const Metric &met)
 Update the connection when it is associated with a metric.
const Mapget_mp () const
 Returns the mapping.
const Tensor_symget_delta () const
 Returns the tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection.
virtual Tensorp_derive_cov (const Tensor &tens) const
 Computes the covariant derivative $\nabla T$ of a tensor $T$ (with respect to the current connection).
virtual Tensorp_divergence (const Tensor &tens) const
 Computes the divergence of a tensor $T$ (with respect to the current connection).
virtual const Tensorricci () const
 Computes (if not up to date) and returns the Ricci tensor associated with the current connection.

Protected Member Functions

 Connection (const Map &, const Base_vect &)
 Constructor for derived classes.
void del_deriv () const
 Deletes all the derived quantities.
void set_der_0x0 () const
 Sets to 0x0 all the pointers on derived quantities.

Protected Attributes

const Map *const mp
 Reference mapping.
const Base_vect *const triad
 Triad $(e_i)$ with respect to which the connection coefficients are defined.
Tensor_sym delta
 Tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection.
bool assoc_metric
 Indicates whether the connection is associated with a metric (in which case the Ricci tensor is symmetric, i.e.
Tensorp_ricci
 Pointer of the Ricci tensor associated with the connection.

Private Member Functions

void fait_delta (const Metric &)
 Computes the difference $\Delta^i_{\ jk}$ between the connection coefficients and that a the flat connection in the case where the current connection is associated with a metric.

Private Attributes

const Metric_flatflat_met
 Flat metric with respect to which $\Delta^i_{\ jk}$ (member delta ) is defined.

Detailed Description

Class Connection.

()

This class deals only with torsion-free connections.

Note that we use the MTW convention for the indices of the connection coefficients with respect to a given triad $(e_i)$:

\[ \Gamma^i_{\ jk} := \langle e^i, \nabla_{e_k} \, e_j \rangle \]

Definition at line 109 of file connection.h.


Constructor & Destructor Documentation

Connection::Connection ( const Tensor_sym delta_i,
const Metric_flat flat_met_i 
)

Standard constructor ab initio.

Parameters:
delta_i tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection. The connection coefficients with respect to the triad $(e_i)$ are defined according to the MTW convention:

\[ \Gamma^i_{\ jk} := \langle e^i, \nabla_{e_k} \, e_j \rangle \]

$\Delta^i_{\ jk}$ must be symmetric with respect to the indices j and k.

flat_met_i flat metric with respect to which $\Delta^i_{\ jk}$ is defined

Definition at line 125 of file connection.C.

References Tensor::get_index_type(), Tensor::get_valence(), set_der_0x0(), Tensor_sym::sym_index1(), and Tensor_sym::sym_index2().

Connection::Connection ( const Metric met,
const Metric_flat flat_met_i 
)

Standard constructor for a connection associated with a metric.

Parameters:
met Metric to which the connection will be associated
flat_met_i flat metric to define the $\Delta^i_{\ jk}$ representation of the connection

Definition at line 146 of file connection.C.

References fait_delta(), and set_der_0x0().

Connection::Connection ( const Connection conn_i  ) 

Copy constructor.

Definition at line 162 of file connection.C.

References set_der_0x0().

Connection::Connection ( const Map mpi,
const Base_vect bi 
) [protected]

Constructor for derived classes.

Definition at line 175 of file connection.C.

References set_der_0x0().

Connection::~Connection (  )  [virtual]

Destructor.

Definition at line 191 of file connection.C.

References del_deriv().


Member Function Documentation

void Connection::del_deriv (  )  const [protected]

Deletes all the derived quantities.

Definition at line 201 of file connection.C.

References p_ricci, and set_der_0x0().

void Connection::fait_delta ( const Metric gam  )  [private]

Computes the difference $\Delta^i_{\ jk}$ between the connection coefficients and that a the flat connection in the case where the current connection is associated with a metric.

Definition at line 274 of file connection.C.

References Metric::con(), Metric::cov(), delta, Tensor_sym::derive_cov(), flat_met, and Tensor::set().

const Tensor_sym& Connection::get_delta (  )  const [inline]

Returns the tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection.

The connection coefficients with respect to the triad $(e_i)$ are defined according to the MTW convention:

\[ \Gamma^i_{\ jk} := \langle e^i, \nabla_{e_k} \, e_j \rangle \]

Note that $\Delta^i_{\ jk}$ is symmetric with respect to the indices j and k.

Returns:
delta}(i,j,k) = $\Delta^i_{\ jk}$

Definition at line 267 of file connection.h.

References delta.

const Map& Connection::get_mp (  )  const [inline]

Returns the mapping.

Definition at line 249 of file connection.h.

References mp.

void Connection::operator= ( const Connection ci  ) 

Assignment to another Connection.

Reimplemented in Connection_flat, Connection_fspher, and Connection_fcart.

Definition at line 221 of file connection.C.

References del_deriv(), delta, flat_met, and triad.

Tensor * Connection::p_derive_cov ( const Tensor tens  )  const [virtual]

Computes the covariant derivative $\nabla T$ of a tensor $T$ (with respect to the current connection).

The extra index (with respect to the indices of $T$) of $\nabla T$ is chosen to be the last one. This convention agrees with that of MTW (see Eq. (10.17) of MTW). For instance, if $T$ is a 1-form, whose components w.r.t. the triad $e^i$ are $T_i$: $T=T_i \; e^i$, then the covariant derivative of $T$ is the bilinear form $\nabla T$ whose components $\nabla_j T_i$ are such that

\[ \nabla T = \nabla_j T_i \; e^i \otimes e^j \]

Parameters:
tens tensor $T$
Returns:
pointer on the covariant derivative $\nabla T$ ; this pointer is polymorphe, i.e. it is a pointer on a Vector if the argument is a Scalar , and on a Tensor otherwise. NB: The corresponding memory is allocated by the method p_derive_cov() and must be deallocated by the user afterwards.

Reimplemented in Connection_flat, Connection_fspher, and Connection_fcart.

Definition at line 303 of file connection.C.

References Scalar::dec_dzpuis(), delta, Tensor::derive_cov(), flat_met, Tensor::get_index_type(), Tensor::get_n_comp(), Tensor::get_triad(), Tensor::get_valence(), Tensor::indices(), mp, Tensor::set(), Itbl::set(), Tensor_sym::sym_index1(), Tensor_sym::sym_index2(), and triad.

Tensor * Connection::p_divergence ( const Tensor tens  )  const [virtual]

Computes the divergence of a tensor $T$ (with respect to the current connection).

The divergence is taken with respect of the last index of $T$ which thus must be contravariant. For instance if $T$ is a twice contravariant tensor, whose components w.r.t. the triad $e_i$ are $T^{ij}$: $T = T^{ij} \; e_i \otimes e_j$, the divergence of $T$ is the vector

\[ {\rm div}\, T = \nabla_k T^{ik} \; e_i \]

where $\nabla$ denotes the current connection.

Parameters:
tens tensor $T$
Returns:
pointer on the divergence of $T$ ; this pointer is polymorphe, i.e. its is a pointer on a Scalar if $T$ is a Vector , on a Vector if $T$ is a tensor of valence 2, and on a Tensor otherwise. NB: The corresponding memory is allocated by the method p_divergence() and must be deallocated by the user afterwards.

Reimplemented in Connection_flat, Connection_fspher, and Connection_fcart.

Definition at line 459 of file connection.C.

References Scalar::dec_dzpuis(), delta, Tensor::divergence(), flat_met, Tensor::get_index_type(), Tensor::get_n_comp(), Tensor::get_triad(), Tensor::get_valence(), Tensor::indices(), mp, Itbl::set(), Tensor_sym::sym_index1(), Tensor_sym::sym_index2(), Tensor::trace(), and triad.

const Tensor & Connection::ricci (  )  const [virtual]

Computes (if not up to date) and returns the Ricci tensor associated with the current connection.

Reimplemented in Connection_flat.

Definition at line 658 of file connection.C.

References assoc_metric, Scalar::dec_dzpuis(), delta, Tensor_sym::derive_cov(), flat_met, mp, p_ricci, Tensor::set(), Scalar::set_etat_zero(), and triad.

void Connection::set_der_0x0 (  )  const [protected]

Sets to 0x0 all the pointers on derived quantities.

Definition at line 209 of file connection.C.

References p_ricci.

void Connection::update ( const Metric met  ) 

Update the connection when it is associated with a metric.

Parameters:
met Metric to which the connection is associated

Definition at line 251 of file connection.C.

References assoc_metric, del_deriv(), fait_delta(), and flat_met.

void Connection::update ( const Tensor_sym delta_i  ) 

Update the connection when it is defined ab initio.

Parameters:
delta_i tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection. $\Delta^i_{\ jk}$ must be symmetric with respect to the indices j and k.

Definition at line 231 of file connection.C.

References assoc_metric, del_deriv(), delta, flat_met, Tensor::get_index_type(), Tensor::get_valence(), Tensor_sym::sym_index1(), and Tensor_sym::sym_index2().


Member Data Documentation

bool Connection::assoc_metric [protected]

Indicates whether the connection is associated with a metric (in which case the Ricci tensor is symmetric, i.e.

the actual type of p_ricci is a Sym_tensor )

Definition at line 143 of file connection.h.

Tensor $\Delta^i_{\ jk}$ which defines the connection with respect to the flat one: $\Delta^i_{\ jk}$ is the difference between the connection coefficients $\Gamma^i_{\ jk}$ and the connection coefficients ${\bar \Gamma}^i_{\ jk}$ of the flat connection.

The connection coefficients with respect to the triad $(e_i)$ are defined according to the MTW convention:

\[ \Gamma^i_{\ jk} := \langle e^i, \nabla_{e_k} \, e_j \rangle \]

Note that $\Delta^i_{\ jk}$ is symmetric with respect to the indices j and k.

Definition at line 137 of file connection.h.

Flat metric with respect to which $\Delta^i_{\ jk}$ (member delta ) is defined.

Definition at line 152 of file connection.h.

const Map* const Connection::mp [protected]

Reference mapping.

Definition at line 115 of file connection.h.

Tensor* Connection::p_ricci [mutable, protected]

Pointer of the Ricci tensor associated with the connection.

Definition at line 160 of file connection.h.

const Base_vect* const Connection::triad [protected]

Triad $(e_i)$ with respect to which the connection coefficients are defined.

Definition at line 120 of file connection.h.


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

Generated on 7 Oct 2014 for LORENE by  doxygen 1.6.1