KADATH
metric.hpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef __METRIC_HPP_
21 #define __METRIC_HPP_
22 #include "metric_tensor.hpp"
23 #include "vector.hpp"
24 #include "scalar.hpp"
25 
26 namespace Kadath {
27 class Space ;
28 class Tensor ;
29 class Term_eq ;
30 class Metric_tensor ;
31 class System_of_eqs ;
32 class Base_tensor ;
33 
34 
39 class Metric : public Memory_mapped {
40 
41  protected:
42  const Space& espace ;
43 
44  const System_of_eqs* syst ;
45 
50  mutable MMPtr_array<Term_eq> p_met_cov ;
55  mutable MMPtr_array<Term_eq> p_met_con ;
60  mutable MMPtr_array<Term_eq> p_christo ;
65  mutable MMPtr_array<Term_eq> p_riemann ;
70  mutable MMPtr_array<Term_eq> p_ricci_tensor ;
75  mutable MMPtr_array<Term_eq> p_ricci_scalar ;
80  mutable MMPtr_array<Term_eq> p_dirac ;
85  mutable MMPtr_array<Term_eq> p_det_cov ;
86  int type_tensor ;
87 
88  protected:
89  Metric (const Space&) ;
90  virtual void compute_con (int) const ;
91  virtual void compute_cov (int) const ;
92  virtual void compute_christo (int) const ;
93  virtual void compute_riemann (int) const ;
94  virtual void compute_ricci_tensor (int) const ;
95  virtual void compute_ricci_scalar (int) const ;
96  virtual void compute_dirac (int) const ;
97  virtual void compute_det_cov (int) const ;
98 
99  public:
100  Metric (const Metric&) ;
101 
102  virtual ~Metric() ;
106  virtual void update() ;
111  virtual void update(int dd) ;
112 
118  virtual void manipulate_ind (Term_eq& so, int ind) const ;
119 
129  virtual Term_eq derive_partial (int typeder, char nameder, const Term_eq& so) const ;
139  virtual Term_eq derive (int typeder, char nameder, const Term_eq& so) const ;
140 
150  virtual Term_eq derive_flat (int typeder, char nameder, const Term_eq& so) const ;
151 
152  virtual const Metric* get_background() const ;
153 
154  virtual int give_type (int) const ;
155 
156  // Extraction :
163  const Term_eq* give_term (int typemet, int dd) const ;
169  const Term_eq* give_christo (int dd) const ;
175  const Term_eq* give_riemann (int dd) const ;
181  const Term_eq* give_ricci_tensor (int dd) const ;
187  const Term_eq* give_ricci_scalar (int dd) const ;
193  const Term_eq* give_dirac (int dd) const ;
199  const Term_eq* give_det_cov (int dd) const ;
200 
201  friend class System_of_eqs ;
202  friend class Metric_flat ;
203  friend class Metric_dirac ;
204  friend class Metric_conf ;
205  friend class Domain_nucleus ;
206  friend class Domain_shell ;
207  friend class Domain_compact ;
208  friend class Domain_bispheric_rect ;
209  friend class Domain_bispheric_chi_first ;
210  friend class Domain_bispheric_eta_first ;
211  friend class Domain_shell_outer_adapted ;
212  friend class Domain_shell_inner_adapted ;
213  friend class Domain_nucleus_symphi ;
214  friend class Domain_shell_symphi ;
215  friend class Domain_compact_symphi ;
216 } ;
217 
222 class Metric_flat : public Metric {
223 
224  protected:
225  const Base_tensor& basis ;
226 
227  public:
233  Metric_flat (const Space& sp, const Base_tensor& bb) ;
234  Metric_flat (const Metric_flat& ) ;
235 
236  protected:
237  virtual void compute_con (int) const ;
238  virtual void compute_cov (int) const ;
239  virtual void compute_christo (int) const ;
240  virtual void compute_ricci_tensor (int) const ;
241  virtual void compute_ricci_scalar (int) const ;
242 
243  private:
253  Term_eq derive_partial_spher (int tder, char indder, const Term_eq& so) const ;
262  Term_eq derive_partial_cart (int tder, char indder, const Term_eq& so) const ;
263 
274  Term_eq derive_partial_mtz (int tder, char indder, const Term_eq& so) const ;
275 
284  Term_eq derive_spher (int tder, char indder, const Term_eq& so) const ;
285 
286 
295  Term_eq derive_cart (int tder, char indder, const Term_eq& so) const ;
296 
306  Term_eq derive_mtz (int tder, char indder, const Term_eq& so) const ;
307 
308 
319  Term_eq derive_with_other_spher (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
320 
332  Term_eq derive_with_other_mtz (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
333 
344  Term_eq derive_with_other_cart (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
345 
346  public:
347  virtual void update() ;
348  virtual void update(int) ;
349  virtual void manipulate_ind (Term_eq&, int) const ;
350  virtual Term_eq derive_partial (int, char, const Term_eq&) const ;
351  virtual Term_eq derive (int, char, const Term_eq&) const ;
352 
363  Term_eq derive_with_other (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
364 
370  virtual void set_system (System_of_eqs& syst, const char* name) ;
371 
372  virtual int give_type (int) const ;
373 } ;
374 
379 class Metric_general : public Metric {
380 
381  protected:
383  const Base_tensor& basis ;
385  int place_syst ;
386 
387  public:
389  Metric_general (const Metric_general& ) ;
390 
391  protected:
392  virtual void compute_con (int) const ;
393  virtual void compute_cov (int) const ;
394  virtual void compute_christo (int) const ;
395  virtual void compute_riemann (int) const ;
396  virtual void compute_ricci_tensor (int) const ;
397  virtual void compute_dirac (int) const ;
398 
399  public:
400  virtual ~Metric_general() ;
401  virtual Term_eq derive (int, char, const Term_eq&) const ;
407  virtual void set_system (System_of_eqs& syst, const char* name) ;
408  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
409 
410  virtual int give_type (int) const ;
411 } ;
416 class Metric_const : public Metric_general {
417 
418  public:
420  Metric_const (const Metric_const& ) ;
421 
422  protected:
423  virtual void compute_con (int) const ;
424  virtual void compute_cov (int) const ;
425 
426 
427  public:
428  virtual ~Metric_const() ;
429 
435  virtual void set_system (System_of_eqs& syst, const char* name) ;
436 } ;
437 
443 class Metric_conf : public Metric {
444 
445  protected:
447  const Base_tensor& basis ;
449  int place_syst ;
450 
451 
452 
453  public:
455  Metric_conf (const Metric_conf& ) ;
456 
457  protected:
458  virtual void compute_con (int) const ;
459  virtual void compute_cov (int) const ;
460  virtual void compute_christo (int) const ;
461  virtual void compute_riemann (int) const ;
462  virtual void compute_ricci_tensor (int) const ;
463  virtual void compute_dirac (int) const ;
464 
465  public:
466  virtual ~Metric_conf() ;
467  virtual Term_eq derive (int, char, const Term_eq&) const ;
473  virtual void set_system (System_of_eqs& syst, const char* name) ;
474  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
475 
476  virtual int give_type (int) const ;
477 } ;
478 
485  class Metric_dirac : public Metric_conf {
486 
487  public:
489  Metric_dirac (const Metric_dirac& ) ;
493  const Metric_flat& get_fmet () const {return fmet;} ;
494 
495  protected:
496  virtual void compute_ricci_tensor (int) const ;
497  virtual void compute_ricci_scalar (int) const ;
498 
499 
500  public:
501  virtual ~Metric_dirac() ;
502 } ;
503 
511 
512  public:
515 
516  protected:
517  virtual void compute_con (int) const ;
518  virtual void compute_cov (int) const ;
519 
520  public:
521  virtual ~Metric_dirac_const() ;
527  virtual void set_system (System_of_eqs& syst, const char* name) ;
528 } ;
536 
537  public:
539  Metric_harmonic (const Metric_harmonic& ) ;
543  const Metric_flat& get_fmet () const {return fmet;} ;
544 
545  protected:
546  virtual void compute_ricci_tensor (int) const ;
547  virtual void compute_ricci_scalar (int) const ;
548  virtual void compute_det_cov (int) const ;
549 
550  public:
551  virtual ~Metric_harmonic() ;
552 } ;
553 
562 class Metric_conf_factor : public Metric {
563 
564  protected:
566  const Base_tensor& basis ;
570  int place_syst ;
571 
572  public:
573  Metric_conf_factor (Metric_tensor&, const Scalar& conf) ;
575 
576  protected:
577  virtual void compute_con (int) const ;
578  virtual void compute_cov (int) const ;
579  virtual void compute_christo (int) const ;
580  virtual void compute_riemann (int) const ;
581  virtual void compute_ricci_tensor (int) const ;
582 
583  public:
584  virtual ~Metric_conf_factor() ;
585  virtual Term_eq derive (int, char, const Term_eq&) const ;
591  virtual void set_system (System_of_eqs& syst, const char* name) ;
592  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
593 
594  virtual int give_type (int) const ;
595 } ;
596 
607 
608  public:
611 
612  protected:
613  virtual void compute_con (int) const ;
614  virtual void compute_cov (int) const ;
615 
616 
617  public:
618  virtual ~Metric_conf_factor_const() ;
619 
625  virtual void set_system (System_of_eqs& syst, const char* name) ;
626 } ;
627 
632 class Metric_cfc : public Metric {
633 
634  protected:
636  const Base_tensor& basis ;
638  int place_syst ;
639 
640  public:
641  Metric_cfc (Scalar&, const Base_tensor&) ;
642  Metric_cfc (const Metric_cfc& ) ;
643 
644  protected:
645  virtual void compute_con (int) const ;
646  virtual void compute_cov (int) const ;
647  virtual void compute_christo (int) const ;
648  virtual void compute_riemann (int) const ;
649  virtual void compute_ricci_tensor (int) const ;
650 
651  public:
652  virtual ~Metric_cfc() ;
653 
659  virtual void set_system (System_of_eqs& syst, const char* name) ;
660 
661  virtual Term_eq derive (int, char, const Term_eq&) const ;
662  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
663 
664  virtual int give_type (int) const ;
665 } ;
666 
667 
668 }
669 #endif
Describes the tensorial basis used by the various tensors.
Definition: base_tensor.hpp:49
Class for bispherical coordinates with a symmetry with respect to the plane .
Definition: bispheric.hpp:460
Class for bispherical coordinates with a symmetry with respect to the plane .
Definition: bispheric.hpp:878
Class for bispherical coordinates with a symmetry with respect to the plane .
Definition: bispheric.hpp:64
Class for a spherical compactified domain and a symmetry with respect to the plane and a quadrant sy...
Class for a spherical compactified domain and a symmetry with respect to the plane .
Definition: spheric.hpp:1007
Class for a spherical domain containing the origin a symmetry with respect to the plane and an quadr...
Class for a spherical domain containing the origin and a symmetry with respect to the plane .
Definition: spheric.hpp:66
Class for a spherical-like domain, having a symmetry with respect to the plane .
Definition: adapted.hpp:51
Class for a spherical-like domain, having a symmetry with respect to the plane .
Definition: adapted.hpp:367
Class for a spherical shell and a symmetry with respect to the plane and an quadrant symmetry wrt .
Class for a spherical shell and a symmetry with respect to the plane .
Definition: spheric.hpp:555
Class to deal with a metric with a conformaly flat metric.
Definition: metric.hpp:632
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
Definition: metric.hpp:638
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Definition: metric_cfc.cpp:163
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
Definition: metric_cfc.cpp:482
const Base_tensor & basis
The tensorial basis used.
Definition: metric.hpp:636
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Definition: metric_cfc.cpp:284
Scalar * p_conf
Pointer on the Scalar being the conformal factor.
Definition: metric.hpp:635
Metric_flat fmet
Associated flat metric.
Definition: metric.hpp:637
virtual void compute_riemann(int) const
Computes the Riemann tensor, in a given Domain.
Definition: metric_cfc.cpp:228
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Definition: metric_cfc.cpp:49
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
Definition: metric_cfc.cpp:44
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Definition: metric_cfc.cpp:105
Metric_cfc(Scalar &, const Base_tensor &)
Constructor from a Metric_tensor.
Definition: metric_cfc.cpp:31
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Definition: metric_cfc.cpp:367
virtual Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
Definition: metric_cfc.cpp:352
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Metric_conf_factor_const(Metric_tensor &, const Scalar &conf)
Constructor from a Metric_tensor and a conformal factor.
Class to deal with a metric with a conformal decomposition (mainly used for AADS spacetimes) The true...
Definition: metric.hpp:562
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Metric_flat fmet
Associated flat metric.
Definition: metric.hpp:567
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Vector grad_conf
flat gradient of the conformal factor
Definition: metric.hpp:569
Metric_conf_factor(Metric_tensor &, const Scalar &conf)
Constructor from a Metric_tensor and a conformal factor.
Metric_tensor * p_met
Pointer on the Metric_tensor describing the coformal metric.
Definition: metric.hpp:565
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
Definition: metric.hpp:570
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
virtual void compute_riemann(int) const
Computes the Riemann tensor, in a given Domain.
virtual Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Scalar conformal
The conformal factor (must be a purely radial function)
Definition: metric.hpp:568
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
const Base_tensor & basis
The tensorial basis used.
Definition: metric.hpp:566
Class to deal with a metric which determinant is 1.
Definition: metric.hpp:443
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
Definition: metric_conf.cpp:43
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
virtual Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
Metric_flat fmet
Associated flat metric.
Definition: metric.hpp:448
virtual void compute_riemann(int) const
Computes the Riemann tensor, in a given Domain.
Metric_tensor * p_met
Pointer on the Metric_tensor describing the metric.
Definition: metric.hpp:446
virtual void compute_dirac(int) const
Computes the Dirac gauge term, in a given Domain.
const Base_tensor & basis
The tensorial basis used.
Definition: metric.hpp:447
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
Definition: metric.hpp:449
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Definition: metric_conf.cpp:49
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Class to deal with arbitrary type of metric but that is constant.
Definition: metric.hpp:416
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
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.
Metric_const(Metric_tensor &)
Constructor from a Metric_tensor.
Class to deal with a conformal metric in the Dirac gauge.
Definition: metric.hpp:510
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.
Definition: metric.hpp:485
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
virtual void compute_ricci_scalar(int) const
Computes the Ricci scalar, in a given Domain.
const Metric_flat & get_fmet() const
Definition: metric.hpp:493
Class that deals with flat metric.
Definition: metric.hpp:222
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Definition: metric_flat.cpp:44
virtual Term_eq derive_partial(int, char, const Term_eq &) const
Computes the partial derivative of a Term_eq (assumes Cartesian basis of decomposition).
Term_eq derive_partial_cart(int tder, char indder, const Term_eq &so) const
Computes the partial derivative part of the covariant derivative, in Cartesian coordinates.
Term_eq derive_partial_spher(int tder, char indder, const Term_eq &so) const
Computes the partial derivative part of the covariant derivative, in orthonormal spherical coordinate...
Term_eq derive_spher(int tder, char indder, const Term_eq &so) const
Computes the flat covariant derivative, in orthonormal spherical coordinates.
Term_eq derive_with_other(int tder, char indder, const Term_eq &so, const Metric *othermet) const
Computes the flat covariant derivative.
Term_eq derive_mtz(int tder, char indder, const Term_eq &so) const
Computes the flat covariant derivative, in orthonormal coordinates where the constant radii sections ...
const Base_tensor & basis
The tensorial basis used.
Definition: metric.hpp:225
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
Definition: metric_flat.cpp:59
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Definition: metric_flat.cpp:82
Term_eq derive_with_other_cart(int tder, char indder, const Term_eq &so, const Metric *othermet) const
Computes the flat covariant derivative, in Cartesian coordinates.
virtual void update()
Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed,...
Definition: metric_flat.cpp:36
Term_eq derive_partial_mtz(int tder, char indder, const Term_eq &so) const
Computes the partial derivative part of the covariant derivative, in orthonormal coordinates where th...
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
virtual void manipulate_ind(Term_eq &, int) const
Uses the Metric to manipulate one of the index of a Term_eq (i.e.
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Definition: metric_flat.cpp:77
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Term_eq derive_with_other_mtz(int tder, char indder, const Term_eq &so, const Metric *othermet) const
Computes the flat covariant derivative, in orthonormal coordinates where the constant radii sections ...
Term_eq derive_cart(int tder, char indder, const Term_eq &so) const
Computes the flat covariant derivative, in Cartesian coordinates.
virtual void compute_ricci_scalar(int) const
Computes the Ricci scalar, in a given Domain.
Term_eq derive_with_other_spher(int tder, char indder, const Term_eq &so, const Metric *othermet) const
Computes the flat covariant derivative, in orthonormal spherical coordinates.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Definition: metric_flat.cpp:63
Class to deal with arbitrary type of metric.
Definition: metric.hpp:379
virtual void compute_dirac(int) const
Computes the Dirac gauge term, in a given Domain.
Metric_tensor * p_met
Pointer on the Metric_tensor describing the metric.
Definition: metric.hpp:382
Metric_general(Metric_tensor &)
Constructor from a Metric_tensor.
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Metric_flat fmet
Associated flat metric.
Definition: metric.hpp:384
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
virtual void compute_riemann(int) const
Computes the Riemann tensor, in a given Domain.
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
Definition: metric.hpp:385
const Base_tensor & basis
The tensorial basis used.
Definition: metric.hpp:383
virtual Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
virtual Term_eq derive(int, char, const Term_eq &) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
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.
Definition: metric.hpp:535
const Metric_flat & get_fmet() const
Definition: metric.hpp:543
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.
Purely abstract class for metric handling.
Definition: metric.hpp:39
virtual void compute_det_cov(int) const
Computes the determinant of the covariant representation, in a given Domain.
Definition: metric.cpp:750
const Term_eq * give_riemann(int dd) const
Gives the Riemann tensor, in a Domain.
Definition: metric.cpp:131
int type_tensor
States if one works in the CON or COV representation.
Definition: metric.hpp:86
const Term_eq * give_christo(int dd) const
Gives the Christoffel symbols, in a Domain.
Definition: metric.cpp:124
const Term_eq * give_det_cov(int dd) const
Gives the determinant of the covariant metric, in a Domain.
Definition: metric.cpp:159
MMPtr_array< Term_eq > p_ricci_tensor
Array of pointers on various Term_eq.
Definition: metric.hpp:70
const Term_eq * give_term(int typemet, int dd) const
Gives one representation of the metric, in a Domain.
Definition: metric.cpp:103
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).
Definition: metric.cpp:172
const Term_eq * give_dirac(int dd) const
Gives the potential of the Dirac gauge, in a Domain.
Definition: metric.cpp:152
virtual Term_eq derive(int typeder, char nameder, const Term_eq &so) const
Computes the covariant derivative of a Term_eq (assumes Cartesian basis of decomposition).
Definition: metric.cpp:290
virtual void compute_dirac(int) const
Computes the Dirac gauge term, in a given Domain.
Definition: metric.cpp:745
const Term_eq * give_ricci_scalar(int dd) const
Gives the Ricci scalar, in a Domain.
Definition: metric.cpp:145
const Term_eq * give_ricci_tensor(int dd) const
Gives the Ricci tensor, in a Domain.
Definition: metric.cpp:138
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
Definition: metric.cpp:740
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
Definition: metric.cpp:532
virtual void update()
Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed,...
Definition: metric.cpp:99
virtual const Metric * get_background() const
Returns a pointer on the background metric, if it exists.
Definition: metric.cpp:167
const Space & espace
The associated Space.
Definition: metric.hpp:42
MMPtr_array< Term_eq > p_met_cov
Array of pointers on various Term_eq.
Definition: metric.hpp:50
MMPtr_array< Term_eq > p_met_con
Array of pointers on various Term_eq.
Definition: metric.hpp:55
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.
Definition: metric.cpp:645
virtual void compute_ricci_scalar(int) const
Computes the Ricci scalar, in a given Domain.
Definition: metric.cpp:590
MMPtr_array< Term_eq > p_dirac
Array of pointers on various Term_eq.
Definition: metric.hpp:80
MMPtr_array< Term_eq > p_riemann
Array of pointers on various Term_eq.
Definition: metric.hpp:65
MMPtr_array< Term_eq > p_christo
Array of pointers on various Term_eq.
Definition: metric.hpp:60
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Definition: metric.cpp:407
MMPtr_array< Term_eq > p_ricci_scalar
Array of pointers on various Term_eq.
Definition: metric.hpp:75
MMPtr_array< Term_eq > p_det_cov
Array of pointers on various Term_eq.
Definition: metric.hpp:85
virtual ~Metric()
Destructor.
Definition: metric.cpp:69
Metric(const Space &)
Constructor from a Space only (internal use only).
Definition: metric.cpp:29
const System_of_eqs * syst
Pointer of the system of equations where the metric is used (only one for now).
Definition: metric.hpp:44
virtual void compute_riemann(int) const
Computes the Riemann tensor, in a given Domain.
Definition: metric.cpp:476
virtual int give_type(int) const
Returns the type of tensorial basis of the covariant representation, in a given Domain.
Definition: metric.cpp:118
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Definition: metric.cpp:735
virtual Term_eq derive_flat(int typeder, char nameder, const Term_eq &so) const
Computes the covariant flat derivative of a Term_eq.
Definition: metric.cpp:402
The class Scalar does not really implements scalars in the mathematical sense but rather tensorial co...
Definition: scalar.hpp:67
The Space class is an ensemble of domains describing the whole space of the computation.
Definition: space.hpp:1362
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.
Definition: term_eq.hpp:62
A class derived from Tensor to deal specificaly with objects of valence 1 (and so also 1-forms).
Definition: vector.hpp:41