23 #include "term_eq.hpp"
25 #include "tensor_impl.hpp"
26 #include "system_of_eqs.hpp"
27 #include "metric_tensor.hpp"
28 #include "name_tools.hpp"
38 Metric_dirac_const::~Metric_dirac_const() {
46 cerr <<
"Metric already set for the system" << endl ;
57 trim_spaces (ss.
name_met, name_met) ;
66 cerr <<
"Function only implemented for dimension 3" << endl ;
88 cmpval = (*
syst->
cst[place]->val_t)(2,2)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd)
89 -(*
syst->
cst[place]->val_t)(2,3)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd) ;
91 res[0] =
new Term_eq (dd, val) ;
95 cmpval = (*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd)
96 -(*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd) ;
98 res[1] =
new Term_eq (dd, val) ;
101 cmpval = (*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd)
102 -(*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(2,2)(dd) ;
104 res[2] =
new Term_eq (dd, val) ;
108 cmpval = (*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd)
109 -(*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(1,3)(dd) ;
111 res[3] =
new Term_eq (dd, val) ;
114 cmpval = (*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(1,2)(dd)
115 -(*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd) ;
117 res[4] =
new Term_eq (dd, val) ;
121 cmpval = (*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(2,2)(dd)
122 -(*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(1,2)(dd) ;
124 res[5] =
new Term_eq (dd, val) ;
137 for (
int i=1 ; i<=3 ; i++)
138 for (
int j=i ; j<=3 ; j++)
155 cerr <<
"Function only implemented for dimension 3" << endl ;
178 cmpval = (*
syst->
cst[place]->val_t)(2,2)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd)
179 -(*
syst->
cst[place]->val_t)(2,3)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd) ;
181 res[0] =
new Term_eq (dd, val) ;
184 cmpval = (*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd)
185 -(*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd) ;
187 res[1] =
new Term_eq (dd, val) ;
190 cmpval = (*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd)
191 -(*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(2,2)(dd) ;
193 res[2] =
new Term_eq (dd, val) ;
196 cmpval = (*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(3,3)(dd)
197 -(*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(1,3)(dd) ;
199 res[3] =
new Term_eq (dd, val) ;
202 cmpval = (*
syst->
cst[place]->val_t)(1,3)(dd)*(*
syst->
cst[place]->val_t)(1,2)(dd)
203 -(*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(2,3)(dd) ;
205 res[4] =
new Term_eq (dd, val) ;
208 cmpval = (*
syst->
cst[place]->val_t)(1,1)(dd)*(*
syst->
cst[place]->val_t)(2,2)(dd)
209 -(*
syst->
cst[place]->val_t)(1,2)(dd)*(*
syst->
cst[place]->val_t)(1,2)(dd) ;
211 res[5] =
new Term_eq (dd, val) ;
223 for (
int i=1 ; i<=3 ; i++)
224 for (
int j=i ; j<=3 ; j++)
Metric_tensor * p_met
Pointer on the Metric_tensor describing the metric.
const Base_tensor & basis
The tensorial basis used.
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
Class to deal with a conformal metric in the Dirac gauge.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Metric_dirac_const(Metric_tensor &)
Constructor from a Metric_tensor.
Class to deal with a conformal metric in the Dirac gauge.
Particular type of Tensor, dedicated to the desription of metrics.
int type_tensor
States if one works in the CON or COV representation.
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.
const System_of_eqs * syst
Pointer of the system of equations where the metric is used (only one for now).
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.
Class used to describe and solve a system of equations.
virtual void add_cst(const char *name, double cst)
Addition of a constant (number case)
int ndom
Number of domains used.
MMPtr_array< Term_eq > cst
Pointers on the Term_eq coming from the constants passed by the user.
char * name_met
Name by which the metric is recognized.
int ncst
Number of constants passed by the user.
int dom_min
Smallest domain number.
Metric * met
Pointer on the associated Metric, if defined.
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
int get_n_comp() const
Returns the number of stored components.
This class is intended to describe the manage objects appearing in the equations.
Tensor const & get_val_t() const
Class for storing the basis of decompositions of a field and its values on both the configuration and...