23 #include "term_eq.hpp"
25 #include "tensor_impl.hpp"
26 #include "system_of_eqs.hpp"
27 #include "metric_tensor.hpp"
38 Metric_harmonic::~Metric_harmonic() {
47 bool doder = (
p_met_cov[dd]->der_t==0x0) ?
false :
true ;
129 bool doder = ((der_cov.
der_t==0x0) || (der_con.
der_t==0x0) || (dder_cov.
der_t==0x0)) ? false : true ;
131 Index pos (res_val) ;
139 cmpval += -0.5 * (*
p_met_con[dd]->val_t)(k,l)(dd)*(*dder_cov.
val_t)(k,l, pos(0)+1, pos(1)+1)(dd)
140 - 0.5*(*der_con.
val_t)(pos(1)+1, k,l)(dd)*(*der_cov.
val_t)(k, pos(0)+1, l)(dd)
141 - 0.5*(*der_con.
val_t)(pos(0)+1, k,l)(dd)*(*der_cov.
val_t)(k, pos(1)+1, l)(dd)
142 + 0.5*(*der_con.
val_t)(pos(0)+1, k,l)(dd)*(*der_cov.
val_t)(pos(1)+1, k, l)(dd)
143 + (*
p_christo[dd]->val_t)(pos(0)+1, pos(1)+1, k)(dd)*(*
p_christo[dd]->val_t)(k, l, l)(dd)
144 - (*
p_christo[dd]->val_t)(pos(0)+1, k, l )(dd)*(*
p_christo[dd]->val_t)(pos(1)+1, l, k)(dd) ;
147 cmpval += (*
p_met_cov[dd]->val_t)(m,l)(dd)* (*der_con.
val_t)(k, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, pos(1)+1, m)(dd)
148 - (*
p_met_cov[dd]->val_t)(m,l)(dd) * (*der_con.
val_t)(pos(1)+1, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, k, m)(dd) ;
162 cmpder += -0.5 * (*
p_met_con[dd]->der_t)(k,l)(dd)*(*dder_cov.
val_t)(k,l, pos(0)+1, pos(1)+1)(dd)
163 -0.5 * (*
p_met_con[dd]->val_t)(k,l)(dd)*(*dder_cov.
der_t)(k,l, pos(0)+1, pos(1)+1)(dd)
164 - 0.5*(*der_con.
der_t)(pos(1)+1, k,l)(dd)*(*der_cov.
val_t)(k, pos(0)+1, l)(dd)
165 - 0.5*(*der_con.
val_t)(pos(1)+1, k,l)(dd)*(*der_cov.
der_t)(k, pos(0)+1, l)(dd)
166 - 0.5*(*der_con.
der_t)(pos(0)+1, k,l)(dd)*(*der_cov.
val_t)(k, pos(1)+1, l)(dd)
167 - 0.5*(*der_con.
val_t)(pos(0)+1, k,l)(dd)*(*der_cov.
der_t)(k, pos(1)+1, l)(dd)
168 + 0.5*(*der_con.
der_t)(pos(0)+1, k,l)(dd)*(*der_cov.
val_t)(pos(1)+1, k, l)(dd)
169 + 0.5*(*der_con.
val_t)(pos(0)+1, k,l)(dd)*(*der_cov.
der_t)(pos(1)+1, k, l)(dd)
170 + (*
p_christo[dd]->der_t)(pos(0)+1, pos(1)+1, k)(dd)*(*
p_christo[dd]->val_t)(k, l, l)(dd)
171 + (*
p_christo[dd]->val_t)(pos(0)+1, pos(1)+1, k)(dd)*(*
p_christo[dd]->der_t)(k, l, l)(dd)
172 - (*
p_christo[dd]->der_t)(pos(0)+1, k, l )(dd)*(*
p_christo[dd]->val_t)(pos(1)+1, l, k)(dd) ;
173 - (*
p_christo[dd]->val_t)(pos(0)+1, k, l )(dd)*(*
p_christo[dd]->der_t)(pos(1)+1, l, k)(dd) ;
177 cmpder += (*
p_met_cov[dd]->der_t)(m,l)(dd)* (*der_con.
val_t)(k, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, pos(1)+1, m)(dd)
178 + (*
p_met_cov[dd]->val_t)(m,l)(dd)* (*der_con.
der_t)(k, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, pos(1)+1, m)(dd)
179 + (*
p_met_cov[dd]->val_t)(m,l)(dd)* (*der_con.
val_t)(k, k,l)(dd) * (*
p_christo[dd]->der_t)(pos(0)+1, pos(1)+1, m)(dd)
180 - (*
p_met_cov[dd]->der_t)(m,l)(dd) * (*der_con.
val_t)(pos(1)+1, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, k, m)(dd)
181 - (*
p_met_cov[dd]->val_t)(m,l)(dd) * (*der_con.
der_t)(pos(1)+1, k,l)(dd) * (*
p_christo[dd]->val_t)(pos(0)+1, k, m)(dd)
182 - (*
p_met_cov[dd]->val_t)(m,l)(dd) * (*der_con.
val_t)(pos(1)+1, k,l)(dd) * (*
p_christo[dd]->der_t)(pos(0)+1, k, m)(dd) ;
Class that gives the position inside a multi-dimensional Array.
bool inc(int increm, int var=0)
Increments the position of the Index.
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Class to deal with arbitrary type of metric.
virtual void compute_dirac(int) const
Computes the Dirac gauge term, in a given Domain.
Metric_flat fmet
Associated flat metric.
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
const Base_tensor & basis
The tensorial basis used.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Class to deal with a metric in the spatial harmonic gauge.
virtual void compute_det_cov(int) const
Computes the determinant of the covariant representation, in a given Domain.
Metric_harmonic(Metric_tensor &)
Constructor from a Metric_tensor.
virtual void compute_ricci_scalar(int) const
Computes the Ricci scalar, in a given Domain.
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Particular type of Tensor, dedicated to the desription of metrics.
int type_tensor
States if one works in the CON or COV representation.
MMPtr_array< Term_eq > p_ricci_tensor
Array of pointers on various Term_eq.
const Space & espace
The associated Space.
MMPtr_array< Term_eq > p_met_cov
Array of pointers on various Term_eq.
MMPtr_array< Term_eq > p_met_con
Array of pointers on various Term_eq.
MMPtr_array< Term_eq > p_dirac
Array of pointers on various Term_eq.
MMPtr_array< Term_eq > p_christo
Array of pointers on various Term_eq.
MMPtr_array< Term_eq > p_ricci_scalar
Array of pointers on various Term_eq.
MMPtr_array< Term_eq > p_det_cov
Array of pointers on various Term_eq.
The class Scalar does not really implements scalars in the mathematical sense but rather tensorial co...
Val_domain & set_domain(int)
Read/write of a particular Val_domain.
const Domain * get_domain(int i) const
returns a pointer on the domain.
int get_ndim() const
Returns the number of dimensions.
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
This class is intended to describe the manage objects appearing in the equations.
Tensor * der_t
Pointer on the variation, if the Term_eq is a Tensor.
Tensor * val_t
Pointer on the value, if the Term_eq is a Tensor.
Class for storing the basis of decompositions of a field and its values on both the configuration and...