KADATH
metric_nophi.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_nophi_HPP_
21 #define __METRIC_nophi_HPP_
22 #include "metric.hpp"
23 #include "scalar.hpp"
24 #include "vector.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_flat_nophi : public Metric {
40 
41  protected:
42  const Base_tensor& basis ;
43 
44  public:
50  Metric_flat_nophi (const Space& sp, const Base_tensor& bb) ;
52 
53  protected:
54  virtual void compute_con (int) const ;
55  virtual void compute_cov (int) const ;
56  virtual void compute_christo (int) const ;
57 
58  private:
69  Term_eq derive_partial_spher (int tder, char indder, const Term_eq& so) const ;
70 
79  Term_eq derive_spher (int tder, char indder, const Term_eq& so) const ;
80 
91  Term_eq derive_with_other_spher (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
92 
93  public:
94  virtual ~Metric_flat_nophi() ;
95  virtual void update() ;
96  virtual void update(int) ;
97  virtual void manipulate_ind (Term_eq&, int) const ;
98  virtual Term_eq derive_partial (int, char, const Term_eq&) const ;
99  virtual Term_eq derive (int, char, const Term_eq&) const ;
100 
111  Term_eq derive_with_other (int tder, char indder, const Term_eq& so, const Metric* othermet) const ;
112 
118  virtual void set_system (System_of_eqs& syst, const char* name) ;
119 
120  virtual int give_type (int) const ;
121 } ;
122 
127 class Metric_nophi : public Metric {
128 
129  protected:
131  const Base_tensor& basis ;
133  int place_syst ;
134 
135  public:
137  Metric_nophi (const Metric_nophi& ) ;
138 
139  protected:
140  virtual void compute_con (int) const ;
141  virtual void compute_cov (int) const ;
142  virtual void compute_christo (int) const ;
143  virtual void compute_riemann (int) const ;
144  virtual void compute_ricci_tensor (int) const ;
145 
146  public:
147  virtual ~Metric_nophi() ;
148  virtual Term_eq derive (int, char, const Term_eq&) const ;
154  virtual void set_system (System_of_eqs& syst, const char* name) ;
155  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
156 
157  virtual int give_type (int) const ;
158 } ;
159 
165 
166  public:
169 
170  protected:
171  virtual void compute_con (int) const ;
172  virtual void compute_cov (int) const ;
173 
174 
175  public:
176  virtual ~Metric_nophi_const() ;
177 
183  virtual void set_system (System_of_eqs& syst, const char* name) ;
184 } ;
185 
194 class Metric_nophi_AADS : public Metric {
195 
196  protected:
198  const Base_tensor& basis ;
202  int place_syst ;
203 
204  public:
205  Metric_nophi_AADS (Metric_tensor&, const Scalar& conf) ;
207 
208  protected:
209  virtual void compute_con (int) const ;
210  virtual void compute_cov (int) const ;
211  virtual void compute_christo (int) const ;
212  virtual void compute_riemann (int) const ;
213  virtual void compute_ricci_tensor (int) const ;
214 
215  public:
216  virtual ~Metric_nophi_AADS() ;
217  virtual Term_eq derive (int, char, const Term_eq&) const ;
223  virtual void set_system (System_of_eqs& syst, const char* name) ;
224  virtual Term_eq derive_flat (int, char, const Term_eq&) const ;
225 
226  virtual int give_type (int) const ;
227 } ;
228 
234 
235  public:
238 
239  protected:
240  virtual void compute_con (int) const ;
241  virtual void compute_cov (int) const ;
242 
243 
244  public:
245  virtual ~Metric_nophi_AADS_const() ;
246 
252  virtual void set_system (System_of_eqs& syst, const char* name) ;
253 } ;
254 
255 }
256 #endif
Describes the tensorial basis used by the various tensors.
Definition: base_tensor.hpp:49
Class that deals with flat metric assuming a axisymmetric setting (nothing depends on ).
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...
const Base_tensor & basis
The tensorial basis used.
virtual void manipulate_ind(Term_eq &, int) const
Uses the Metric to manipulate one of the index of a Term_eq (i.e.
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.
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Term_eq derive_spher(int tder, char indder, const Term_eq &so) const
Computes the flat covariant derivative, in orthonormal spherical coordinates.
virtual void update()
Updates the derived quantities (Christoffels etc..) This is done only for the ones that are needed,...
virtual void compute_cov(int) const
Computes the covariant representation, 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 Term_eq derive_partial(int, char, const Term_eq &) const
Computes the partial derivative of a Term_eq (assumes Cartesian basis of decomposition).
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.
Term_eq derive_with_other(int tder, char indder, const Term_eq &so, const Metric *othermet) const
Computes the flat covariant derivative.
Metric_flat_nophi(const Space &sp, const Base_tensor &bb)
Standard constructor.
Class to deal with a metric independant of with a conformal decomposition and constant.
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_nophi_AADS_const(Metric_tensor &, const Scalar &)
Constructor from a Metric_tensor.
virtual void compute_cov(int) const
Computes the covariant representation, in a given Domain.
Class to deal with a metric independant of with a conformal decomposition (mainly used for AADS spac...
Metric_nophi_AADS(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.
Metric_flat_nophi fmet
Associated flat metric.
virtual void compute_christo(int) const
Computes the Christoffel symbols, in a given Domain.
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, 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 Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
Scalar der_conf
Radial derivative of the conformal factor.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
const Base_tensor & basis
The tensorial basis used.
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.
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_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.
Scalar conformal
The conformal factor (must be a purely radial function)
Class to deal with a metric independant of and constant.
Metric_nophi_const(Metric_tensor &)
Constructor from a Metric_tensor.
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.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
Class to deal with a metric independant of .
virtual Term_eq derive_flat(int, char, const Term_eq &) const
Computes the covariant flat derivative of a Term_eq.
Metric_nophi(Metric_tensor &)
Constructor from a Metric_tensor.
virtual void set_system(System_of_eqs &syst, const char *name)
Associate the metric to a given system of equations.
Metric_tensor * p_met
Pointer on the Metric_tensor describing the metric.
virtual void compute_ricci_tensor(int) const
Computes the Ricci tensor, in a given Domain.
virtual void compute_riemann(int) const
Computes the Riemann tensor, 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 compute_cov(int) const
Computes the covariant representation, in a given Domain.
Metric_flat_nophi fmet
Associated flat metric.
const Base_tensor & basis
The tensorial basis used.
virtual void compute_con(int) const
Computes the contravariant representation, in a given Domain.
int place_syst
Gives the location of the metric amongst the various unknowns of the associated System_of_eqs.
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_christo(int) const
Computes the Christoffel symbols, in a given Domain.
Particular type of Tensor, dedicated to the desription of metrics.
Purely abstract class for metric handling.
Definition: metric.hpp:39
const System_of_eqs * syst
Pointer of the system of equations where the metric is used (only one for now).
Definition: metric.hpp:44
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