LORENE
sym_tensor.h
1 /*
2  * Definition of Lorene class Sym_tensor,
3  * as well as derived classes Sym_tensor_trans and Sym_tensor_tt
4  *
5  */
6 
7 /*
8  * Copyright (c) 2003-2004 Eric Gourgoulhon & Jerome Novak
9  *
10  * This file is part of LORENE.
11  *
12  * LORENE is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2
14  * as published by the Free Software Foundation.
15  *
16  * LORENE is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with LORENE; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24  *
25  */
26 
27 #ifndef __SYM_TENSOR_H_
28 #define __SYM_TENSOR_H_
29 
30 /*
31  * $Id: sym_tensor.h,v 1.49 2014/10/13 08:52:36 j_novak Exp $
32  * $Log: sym_tensor.h,v $
33  * Revision 1.49 2014/10/13 08:52:36 j_novak
34  * Lorene classes and functions now belong to the namespace Lorene.
35  *
36  * Revision 1.48 2010/10/11 10:23:03 j_novak
37  * Removed methods Sym_tensor_trans::solve_hrr() and Sym_tensor_trans::set_WX_det_one(), as they are no longer relevant.
38  *
39  * Revision 1.47 2008/12/05 08:46:19 j_novak
40  * New method Sym_tensor_trans_aux::set_tt_part_det_one.
41  *
42  * Revision 1.46 2008/12/03 10:18:56 j_novak
43  * Method 6 is now the default for calls to vector Poisson solver.
44  *
45  * Revision 1.45 2008/08/20 14:39:53 n_vasset
46  * New Dirac solvers handling degenerate elliptic operators on excised spacetimes.
47  *
48  * Revision 1.44 2007/12/21 16:06:16 j_novak
49  * Methods to filter Tensor, Vector and Sym_tensor objects.
50  *
51  * Revision 1.43 2007/11/27 15:48:52 n_vasset
52  * New member p_tilde_c for class Sym_tensor
53  *
54  * Revision 1.42 2007/05/04 16:43:50 n_vasset
55  * adding of functions sol_Dirac_BC2 and sol_Dirac_A2
56  *
57  * Revision 1.41 2006/10/24 13:03:17 j_novak
58  * New methods for the solution of the tensor wave equation. Perhaps, first
59  * operational version...
60  *
61  * Revision 1.40 2006/08/31 12:13:21 j_novak
62  * Added an argument of type Param to Sym_tensor_trans::sol_ rac_A().
63  *
64  * Revision 1.39 2006/06/20 12:07:13 j_novak
65  * Improved execution speed for sol_Dirac_tildeB...
66  *
67  * Revision 1.38 2006/06/14 10:04:19 j_novak
68  * New methods sol_Dirac_l01, set_AtB_det_one and set_AtB_trace_zero.
69  *
70  * Revision 1.37 2006/06/13 13:30:12 j_novak
71  * New members sol_Dirac_A and sol_Dirac_tildeB (see documentation).
72  *
73  * Revision 1.36 2006/06/12 13:37:23 j_novak
74  * Added bounds in l (multipolar momentum) for Sym_tensor_trans::solve_hrr.
75  *
76  * Revision 1.35 2006/06/12 07:42:28 j_novak
77  * Fields A and tilde{B} are defined only for l>1.
78  *
79  * Revision 1.34 2006/06/12 07:27:18 j_novak
80  * New members concerning A and tilde{B}, dealing with the transverse part of the
81  * Sym_tensor.
82  *
83  * Revision 1.33 2005/11/28 14:45:14 j_novak
84  * Improved solution of the Poisson tensor equation in the case of a transverse
85  * tensor.
86  *
87  * Revision 1.32 2005/09/16 13:58:10 j_novak
88  * New Poisson solver for a Sym_tensor_trans.
89  *
90  * Revision 1.31 2005/09/07 16:47:42 j_novak
91  * Removed method Sym_tensor_trans::T_from_det_one
92  * Modified Sym_tensor::set_auxiliary, so that it takes eta/r and mu/r as
93  * arguments.
94  * Modified Sym_tensor_trans::set_hrr_mu.
95  * Added new protected method Sym_tensor_trans::solve_hrr
96  *
97  * Revision 1.30 2005/04/08 08:22:04 j_novak
98  * New methods set_hrr_mu_det_one() and set_WX_det_one(). Not tested yet...
99  *
100  * Revision 1.29 2005/04/06 15:43:58 j_novak
101  * New method Sym_tensor_trans::T_from_det_one(...).
102  *
103  * Revision 1.28 2005/04/04 15:25:22 j_novak
104  * Added new members www, xxx, ttt and the associated methods.
105  *
106  * Revision 1.27 2005/04/01 14:28:31 j_novak
107  * Members p_eta and p_mu are now defined in class Sym_tensor.
108  *
109  * Revision 1.26 2005/01/03 08:34:58 f_limousin
110  * Come back to the previous version.
111  *
112  * Revision 1.25 2005/01/03 08:15:39 f_limousin
113  * The first argument of the function trace_from_det_one(...) is now
114  * a Sym_tensor_trans instead of a Sym_tensor_tt (because of a
115  * compilation error with some compilators).
116  *
117  * Revision 1.24 2004/12/28 14:21:46 j_novak
118  * Added the method Sym_tensor_trans::trace_from_det_one
119  *
120  * Revision 1.23 2004/12/28 10:37:22 j_novak
121  * Better way of enforcing zero divergence.
122  *
123  * Revision 1.22 2004/06/14 20:44:44 e_gourgoulhon
124  * Added argument method_poisson to Sym_tensor::longit_pot and
125  * Sym_tensor::transverse.
126  *
127  * Revision 1.21 2004/05/25 14:57:20 f_limousin
128  * Add parameters in argument of functions transverse, longit_pot,
129  * set_tt_trace, tt_part and set_khi_mu for the case of a Map_et.
130  *
131  * Revision 1.20 2004/05/24 13:44:54 e_gourgoulhon
132  * Added parameter dzp to method Sym_tensor_tt::update.
133  *
134  * Revision 1.19 2004/04/08 16:37:54 e_gourgoulhon
135  * Sym_tensor_tt::set_khi_mu: added argument dzp (dzpuis of resulting h^{ij}).
136  *
137  * Revision 1.18 2004/03/30 14:01:19 j_novak
138  * Copy constructors and operator= now copy the "derived" members.
139  *
140  * Revision 1.17 2004/03/29 16:13:06 j_novak
141  * New methods set_longit_trans and set_tt_trace .
142  *
143  * Revision 1.16 2004/03/22 13:12:43 j_novak
144  * Modification of comments to use doxygen instead of doc++
145  *
146  * Revision 1.15 2004/03/03 13:54:16 j_novak
147  * Error in comments corrected.
148  *
149  * Revision 1.14 2004/03/03 13:16:20 j_novak
150  * New potential khi (p_khi) and the functions manipulating it.
151  *
152  * Revision 1.13 2004/02/26 22:45:13 e_gourgoulhon
153  * Added method derive_lie.
154  *
155  * Revision 1.12 2004/02/18 18:43:22 e_gourgoulhon
156  * Method trace() renamed the_trace() in order to avoid
157  * any confusion with new method Tensor::trace().
158  *
159  * Revision 1.11 2004/01/04 20:49:06 e_gourgoulhon
160  * Sym_tensor is now a derived class of Tensor_sym.
161  * Suppressed methods Sym_tensor::indices and Sym_tensor::position:
162  * they are now implemented at the Tensor_sym level.
163  *
164  * Revision 1.10 2003/11/27 16:05:11 e_gourgoulhon
165  * Changed return value of methods transverse( ) and longit_pot( ).
166  *
167  * Revision 1.9 2003/11/26 21:56:21 e_gourgoulhon
168  * Class Sym_tensor: added the members p_transverse and p_longit_pot,
169  * and the associated methods transverse( ), longit_pot( ),
170  * del_deriv_met( ) and set_der_met_0x0( ).
171  *
172  * Revision 1.8 2003/11/07 16:54:23 e_gourgoulhon
173  * Added method Sym_tensor_tt::poisson().
174  *
175  * Revision 1.7 2003/11/06 14:43:37 e_gourgoulhon
176  * Gave a name to const arguments in certain method prototypes (e.g.
177  * constructors) to correct a bug of DOC++.
178  *
179  * Revision 1.6 2003/11/05 15:26:31 e_gourgoulhon
180  * Modif documentation.
181  *
182  * Revision 1.5 2003/11/04 22:57:26 e_gourgoulhon
183  * Class Sym_tensor_tt: method set_eta_mu renamed set_rr_eta_mu
184  * method update_tp() renamed update()
185  * added method set_rr_mu.
186  *
187  * Revision 1.4 2003/11/03 22:29:54 e_gourgoulhon
188  * Class Sym_tensor_tt: added functions set_eta_mu and update_tp.
189  *
190  * Revision 1.3 2003/11/03 17:09:30 e_gourgoulhon
191  * Class Sym_tensor_tt: added the methods eta() and mu().
192  *
193  * Revision 1.2 2003/10/28 21:22:51 e_gourgoulhon
194  * Class Sym_tensor_trans: added methods trace() and tt_part().
195  *
196  * Revision 1.1 2003/10/27 10:45:19 e_gourgoulhon
197  * New derived classes Sym_tensor_trans and Sym_tensor_tt.
198  *
199  *
200  * $Header: /cvsroot/Lorene/C++/Include/sym_tensor.h,v 1.49 2014/10/13 08:52:36 j_novak Exp $
201  *
202  */
203 
204 namespace Lorene {
205 class Sym_tensor_trans ;
206 class Sym_tensor_tt ;
207 
208 
209 
210 
211  //---------------------------------//
212  // class Sym_tensor //
213  //---------------------------------//
214 
223 class Sym_tensor : public Tensor_sym {
224 
225  // Derived data :
226  // ------------
227  protected:
239  mutable Sym_tensor_trans* p_transverse[N_MET_MAX] ;
240 
246  mutable Vector* p_longit_pot[N_MET_MAX] ;
247 
260  mutable Scalar* p_eta ;
261 
274  mutable Scalar* p_mu ;
275 
293  mutable Scalar* p_www ;
294 
312  mutable Scalar* p_xxx ;
313 
315  mutable Scalar* p_ttt ;
316 
322  mutable Scalar* p_aaa ;
323 
334  mutable Scalar* p_tilde_b ;
335 
346  mutable Scalar* p_tilde_c ;
347 
348 
349 
350 
351 
352 
353  // Constructors - Destructor :
354  // -------------------------
355 
356  public:
370  Sym_tensor(const Map& map, const Itbl& tipe, const Base_vect& triad_i) ;
371 
380  Sym_tensor(const Map& map, int tipe, const Base_vect& triad_i) ;
381 
382  Sym_tensor(const Sym_tensor& a) ;
383 
387  Sym_tensor(const Tensor& a) ;
388 
399  Sym_tensor(const Map& map, const Base_vect& triad_i, FILE* fich) ;
400 
401  virtual ~Sym_tensor() ;
402 
403 
404 
405  // Memory management
406  // -----------------
407  protected:
408  virtual void del_deriv() const;
409 
411  void set_der_0x0() const ;
412 
417  virtual void del_derive_met(int i) const ;
418 
422  void set_der_met_0x0(int i) const ;
423 
424 
425  // Mutators / assignment
426  // ---------------------
427  public:
429  virtual void operator=(const Sym_tensor& a) ;
430 
432  virtual void operator=(const Tensor_sym& a) ;
433 
439  virtual void operator=(const Tensor& a) ;
440 
446  void set_longit_trans( const Vector& v, const Sym_tensor_trans& a) ;
447 
454  void set_auxiliary( const Scalar& trr, const Scalar& eta_over_r, const
455  Scalar& mu_over_r, const Scalar& www, const Scalar&
456  xxx, const Scalar& ttt ) ;
457 
463  virtual void exponential_filter_r(int lzmin, int lzmax, int p,
464  double alpha= -16.) ;
465 
471  virtual void exponential_filter_ylm(int lzmin, int lzmax, int p,
472  double alpha= -16.) ;
473 
474  // Computation of derived members
475  // ------------------------------
476  public:
477 
478 
482  const Vector& divergence(const Metric&) const ;
483 
487  Sym_tensor derive_lie(const Vector& v) const ;
488 
506  const Sym_tensor_trans& transverse(const Metric& gam, Param* par = 0x0,
507  int method_poisson = 6) const ;
508 
519  const Vector& longit_pot(const Metric& gam, Param* par = 0x0,
520  int method_poisson = 6) const ;
521 
523  virtual const Scalar& eta(Param* par = 0x0) const ;
524 
526  const Scalar& mu(Param* par = 0x0) const ;
527 
529  const Scalar& www() const ;
530 
532  const Scalar& xxx() const ;
533 
535  const Scalar& ttt() const ;
536 
542  const Scalar& compute_A(bool output_ylm = true, Param* par = 0x0) const ;
543 
549  const Scalar& compute_tilde_B(bool output_ylm = true, Param* par = 0x0) const ;
550 
557  Scalar compute_tilde_B_tt(bool output_ylm = true, Param* par = 0x0) const ;
558 
564  const Scalar& compute_tilde_C(bool output_ylm = true, Param* par = 0x0) const ;
565 
566 
567 
568 
569 
570  protected:
574  Scalar get_tilde_B_from_TT_trace(const Scalar& tilde_B_tt_in, const Scalar&
575  trace) const ;
576 
577  // Mathematical operators
578  // ----------------------
579  protected:
584  Sym_tensor* inverse() const ;
585 
586  // Friend classes
587  //-----------------
588  friend class Metric ;
589 
590 } ;
591 
592 
593  //---------------------------------//
594  // class Sym_tensor_trans //
595  //---------------------------------//
596 
597 
609 
610  // Data :
611  // -----
612  protected:
614  const Metric* const met_div ;
615 
617  mutable Scalar* p_trace ;
618 
620  mutable Sym_tensor_tt* p_tt ;
621 
622  // Constructors - Destructor
623  // -------------------------
624  public:
632  Sym_tensor_trans(const Map& map, const Base_vect& triad_i,
633  const Metric& met) ;
634 
636 
648  Sym_tensor_trans(const Map& map, const Base_vect& triad_i,
649  const Metric& met, FILE* fich) ;
650 
651  virtual ~Sym_tensor_trans() ;
652 
653 
654  // Memory management
655  // -----------------
656  protected:
657  virtual void del_deriv() const;
658 
660  void set_der_0x0() const ;
661 
662 
663  // Accessors
664  // ---------
665  public:
669  const Metric& get_met_div() const {return *met_div ; } ;
670 
671  // Mutators / assignment
672  // ---------------------
673 
674  public:
676  virtual void operator=(const Sym_tensor_trans& a) ;
677 
679  virtual void operator=(const Sym_tensor& a) ;
680 
682  virtual void operator=(const Tensor_sym& a) ;
683 
685  virtual void operator=(const Tensor& a) ;
686 
692  void set_tt_trace(const Sym_tensor_tt& a, const Scalar& h,
693  Param* par = 0x0) ;
694 
695  // Computational methods
696  // ---------------------
698  const Scalar& the_trace() const ;
699 
704  const Sym_tensor_tt& tt_part(Param* par = 0x0) const ;
705 
706  protected:
722  void sol_Dirac_A(const Scalar& aaa, Scalar& tilde_mu, Scalar& xxx,
723  const Param* par_bc = 0x0) const ;
724 
725 
752  void sol_Dirac_tilde_B(const Scalar& tilde_b, const Scalar& hh, Scalar& hrr,
753  Scalar& tilde_eta, Scalar& www, Param* par_bc=0x0,
754  Param* par_mat=0x0) const ;
755 
760  void sol_Dirac_l01(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta,
761  Param* par_mat) const ;
762 
763 
764 
765  public:
766 
767 
768 
774  void sol_Dirac_Abound(const Scalar& aaa, Scalar& tilde_mu, Scalar& x_new,
775  Scalar bound_mu, const Param* par_bc);
776 
777 
784  void sol_Dirac_A2(const Scalar& aaa, Scalar& tilde_mu, Scalar& x_new,
785  Scalar bound_mu, const Param* par_bc);
786 
792  void sol_Dirac_BC2(const Scalar& bb, const Scalar& cc, const Scalar& hh,
793  Scalar& hrr, Scalar& tilde_eta, Scalar& ww, Scalar bound_eta,double dir, double neum, double rhor, Param* par_bc, Param* par_mat);
794 
795 
801  void sol_Dirac_BC3(const Scalar& bb, const Scalar& hh,
802  Scalar& hrr, Scalar& tilde_eta, Scalar& ww, Scalar bound_hrr, Scalar bound_eta, Param* par_bc, Param* par_mat);
803 
804 
805 
806  // Solving the electric system for l=0 and l=1 only (simpler case), with boundary conditions imposed by the degenerate elliptic system.
807 
808  void sol_Dirac_l01_bound(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta, Scalar& bound_hrr, Scalar& bound_eta, Param* par_mat) ;
809 
810  // Provisory: just for compilation, to be removed
811  void sol_Dirac_l01_2(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta, Param* par_mat) ;
812 
813 
818  void sol_elliptic_ABC(Sym_tensor& source, Scalar aaa, Scalar bbb, Scalar ccc) ;
819 
820 
821 
835  void trace_from_det_one(const Sym_tensor_tt& htt,
836  double precis = 1.e-14, int it_max = 100) ;
837 
852  void set_hrr_mu_det_one(const Scalar& hrr, const Scalar& mu_in,
853  double precis = 1.e-14, int it_max = 100) ;
854 
869  void set_tt_part_det_one(const Sym_tensor_tt& hijtt, const
870  Scalar* h_prev = 0x0, Param* par_mat = 0x0,
871  double precis = 1.e-14, int it_max = 100) ;
872 
891  void set_AtBtt_det_one(const Scalar& a_in, const Scalar& tbtt_in,
892  const Scalar* h_prev = 0x0, Param* par_bc = 0x0,
893  Param* par_mat = 0x0, double precis = 1.e-14,
894  int it_max = 100) ;
895 
903  void set_AtB_trace(const Scalar& a_in, const Scalar& tb_in, const
904  Scalar& trace, Param* par_bc = 0x0, Param* par_mat = 0x0) ;
905 
919  Sym_tensor_trans poisson(const Scalar* h_guess = 0x0) const ;
920 } ;
921 
922 
923  //------------------------------//
924  // class Sym_tensor_tt //
925  //------------------------------//
926 
927 
939 
940  // Data :
941  // -----
942 
943  protected:
946  mutable Scalar* p_khi ;
947 
948 
949  // Constructors - Destructor
950  // -------------------------
951  public:
959  Sym_tensor_tt(const Map& map, const Base_vect& triad_i,
960  const Metric& met) ;
961 
962  Sym_tensor_tt(const Sym_tensor_tt& ) ;
963 
975  Sym_tensor_tt(const Map& map, const Base_vect& triad_i,
976  const Metric& met, FILE* fich) ;
977 
978  virtual ~Sym_tensor_tt() ;
979 
980 
981  // Memory management
982  // -----------------
983  protected:
984  virtual void del_deriv() const;
985 
987  void set_der_0x0() const ;
988 
989 
990  // Mutators / assignment
991  // ---------------------
992 
993  public:
995  virtual void operator=(const Sym_tensor_tt& a) ;
996 
998  virtual void operator=(const Sym_tensor_trans& a) ;
999 
1001  virtual void operator=(const Sym_tensor& a) ;
1002 
1004  virtual void operator=(const Tensor_sym& a) ;
1005 
1007  virtual void operator=(const Tensor& a) ;
1008 
1020  void set_rr_eta_mu(const Scalar& hrr, const Scalar& eta_i,
1021  const Scalar& mu_i) ;
1022 
1034  void set_rr_mu(const Scalar& hrr, const Scalar& mu_i) ;
1035 
1036 
1048  void set_khi_eta_mu(const Scalar& khi_i, const Scalar& eta_i,
1049  const Scalar& mu_i) ;
1050 
1064  void set_khi_mu(const Scalar& khi_i, const Scalar& mu_i, int dzp = 0,
1065  Param* par1 = 0x0, Param* par2 = 0x0,
1066  Param* par3 = 0x0) ;
1067 
1075  void set_A_tildeB(const Scalar& a_in, const Scalar& tb_in, Param* par_bc = 0x0,
1076  Param* par_mat = 0x0) ;
1077 
1078  // Computational methods
1079  // ---------------------
1080 
1081  public:
1085  const Scalar& khi() const ;
1086 
1088  virtual const Scalar& eta(Param* par = 0x0) const ;
1089 
1090  protected:
1097  void update(int dzp, Param* par1 = 0x0, Param* par2 = 0x0) ;
1098 
1099  public:
1111  Sym_tensor_tt poisson(int dzfin = 2) const ;
1112 
1113 
1114 
1115 } ;
1116 
1117 
1118 
1119 
1120 }
1121 #endif
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition: base_vect.h:105
Basic integer array class.
Definition: itbl.h:122
Base class for coordinate mappings.
Definition: map.h:670
Metric for tensor calculation.
Definition: metric.h:90
Parameter storage.
Definition: param.h:125
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:387
Transverse symmetric tensors of rank 2.
Definition: sym_tensor.h:608
Sym_tensor_tt * p_tt
Traceless part with respect to the metric *met_div
Definition: sym_tensor.h:620
const Metric & get_met_div() const
Returns the metric with respect to which the divergence and the trace are defined.
Definition: sym_tensor.h:669
void set_AtBtt_det_one(const Scalar &a_in, const Scalar &tbtt_in, const Scalar *h_prev=0x0, Param *par_bc=0x0, Param *par_mat=0x0, double precis=1.e-14, int it_max=100)
Assigns the derived member A and computes from its TT-part (see Sym_tensor::compute_tilde_B_tt() ).
void sol_Dirac_BC2(const Scalar &bb, const Scalar &cc, const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Scalar &ww, Scalar bound_eta, double dir, double neum, double rhor, Param *par_bc, Param *par_mat)
Same resolution as sol_Dirac_tilde_B, but with inner boundary conditions added.
void sol_Dirac_tilde_B(const Scalar &tilde_b, const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Scalar &www, Param *par_bc=0x0, Param *par_mat=0x0) const
Solves a system of three coupled first-order PDEs obtained from divergence-free conditions (Dirac gau...
void sol_Dirac_A2(const Scalar &aaa, Scalar &tilde_mu, Scalar &x_new, Scalar bound_mu, const Param *par_bc)
Same resolution as sol_Dirac_Abound, but here the boundary conditions are the degenerate elliptic con...
Sym_tensor_trans(const Map &map, const Base_vect &triad_i, const Metric &met)
Standard constructor.
void trace_from_det_one(const Sym_tensor_tt &htt, double precis=1.e-14, int it_max=100)
Assigns the derived member p_tt and computes the trace so that *this + the flat metric has a determin...
Sym_tensor_trans poisson(const Scalar *h_guess=0x0) const
Computes the solution of a tensorial transverse Poisson equation with *this as a source:
const Metric *const met_div
Metric with respect to which the divergence and the trace are defined.
Definition: sym_tensor.h:614
Scalar * p_trace
Trace with respect to the metric *met_div
Definition: sym_tensor.h:617
void sol_Dirac_BC3(const Scalar &bb, const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Scalar &ww, Scalar bound_hrr, Scalar bound_eta, Param *par_bc, Param *par_mat)
Same resolution as sol_Dirac_Abound, but here the boundary conditions are the degenerate elliptic con...
void sol_elliptic_ABC(Sym_tensor &source, Scalar aaa, Scalar bbb, Scalar ccc)
Finds spectral potentials A, B, C of solution of an tensorial TT elliptic equation,...
void set_AtB_trace(const Scalar &a_in, const Scalar &tb_in, const Scalar &trace, Param *par_bc=0x0, Param *par_mat=0x0)
Assigns the derived members A , and the trace.
const Scalar & the_trace() const
Returns the trace of the tensor with respect to metric *met_div.
void set_der_0x0() const
Sets the pointers on derived quantities to 0x0.
void sol_Dirac_Abound(const Scalar &aaa, Scalar &tilde_mu, Scalar &x_new, Scalar bound_mu, const Param *par_bc)
Same resolution as sol_Dirac_A, but with inner boundary conditions added.
void set_tt_part_det_one(const Sym_tensor_tt &hijtt, const Scalar *h_prev=0x0, Param *par_mat=0x0, double precis=1.e-14, int it_max=100)
Assignes the TT-part of the tensor.
const Sym_tensor_tt & tt_part(Param *par=0x0) const
Returns the transverse traceless part of the tensor, the trace being defined with respect to metric *...
void sol_Dirac_A(const Scalar &aaa, Scalar &tilde_mu, Scalar &xxx, const Param *par_bc=0x0) const
Solves a system of two coupled first-order PDEs obtained from the divergence-free condition (Dirac ga...
virtual ~Sym_tensor_trans()
Destructor.
void set_tt_trace(const Sym_tensor_tt &a, const Scalar &h, Param *par=0x0)
Assigns the derived members p_tt and p_trace and updates the components accordingly.
virtual void operator=(const Sym_tensor_trans &a)
Assignment to another Sym_tensor_trans.
virtual void del_deriv() const
Deletes the derived quantities.
void set_hrr_mu_det_one(const Scalar &hrr, const Scalar &mu_in, double precis=1.e-14, int it_max=100)
Assigns the rr component and the derived member .
void sol_Dirac_l01(const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Param *par_mat) const
Solves the same system as Sym_tensor_trans::sol_Dirac_tilde_B but only for .
Transverse and traceless symmetric tensors of rank 2.
Definition: sym_tensor.h:938
void set_khi_mu(const Scalar &khi_i, const Scalar &mu_i, int dzp=0, Param *par1=0x0, Param *par2=0x0, Param *par3=0x0)
Sets the component , as well as the angular potential (see member p_khi and p_mu ).
void set_rr_mu(const Scalar &hrr, const Scalar &mu_i)
Sets the component , as well as the angular potential (see member p_mu ).
void set_A_tildeB(const Scalar &a_in, const Scalar &tb_in, Param *par_bc=0x0, Param *par_mat=0x0)
Assigns the derived members A and .
void set_der_0x0() const
Sets the pointers on derived quantities to 0x0.
Scalar * p_khi
Field such that the component .
Definition: sym_tensor.h:946
virtual ~Sym_tensor_tt()
Destructor.
void set_khi_eta_mu(const Scalar &khi_i, const Scalar &eta_i, const Scalar &mu_i)
Sets the component , as well as the angular potentials and (see members p_khi , p_eta and p_mu ).
void update(int dzp, Param *par1=0x0, Param *par2=0x0)
Computes the components , , , and , from and the potentials and .
virtual void del_deriv() const
Deletes the derived quantities.
virtual const Scalar & eta(Param *par=0x0) const
Gives the field (see member p_eta ).
virtual void operator=(const Sym_tensor_tt &a)
Assignment to another Sym_tensor_tt.
Sym_tensor_tt poisson(int dzfin=2) const
Computes the solution of a tensorial TT Poisson equation with *this as a source:
void set_rr_eta_mu(const Scalar &hrr, const Scalar &eta_i, const Scalar &mu_i)
Sets the component , as well as the angular potentials and (see members p_eta and p_mu ).
const Scalar & khi() const
Gives the field such that the component .
Sym_tensor_tt(const Map &map, const Base_vect &triad_i, const Metric &met)
Standard constructor.
Definition: sym_tensor_tt.C:75
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:223
const Scalar & xxx() const
Gives the field X (see member p_xxx ).
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_ylm ).
Definition: sym_tensor.C:471
virtual void del_derive_met(int i) const
Logical destructor of the derivatives depending on the i-th element of met_depend specific to the cla...
Definition: sym_tensor.C:320
Sym_tensor * inverse() const
Returns a pointer on the inverse of the Sym_tensor (seen as a matrix).
Definition: sym_tensor.C:372
const Scalar & compute_tilde_C(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_c ).
virtual void operator=(const Sym_tensor &a)
Assignment to another Sym_tensor.
Definition: sym_tensor.C:234
void set_longit_trans(const Vector &v, const Sym_tensor_trans &a)
Assigns the derived members p_longit_pot and p_transverse and updates the components accordingly.
Scalar * p_ttt
Field T defined as .
Definition: sym_tensor.h:315
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for ).
Definition: sym_tensor.h:322
const Scalar & compute_A(bool output_ylm=true, Param *par=0x0) const
Gives the field A (see member p_aaa ).
void set_der_met_0x0(int i) const
Sets all the i-th components of met_depend specific to the class Sym_tensor (p_transverse ,...
Definition: sym_tensor.C:335
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
Definition: sym_tensor.h:334
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
Definition: sym_tensor.h:274
const Sym_tensor_trans & transverse(const Metric &gam, Param *par=0x0, int method_poisson=6) const
Computes the transverse part of the tensor with respect to a given metric, transverse meaning diverg...
Scalar * p_tilde_c
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
Definition: sym_tensor.h:346
const Scalar & ttt() const
Gives the field T (see member p_ttt ).
virtual const Scalar & eta(Param *par=0x0) const
Gives the field (see member p_eta ).
const Vector & longit_pot(const Metric &gam, Param *par=0x0, int method_poisson=6) const
Computes the vector potential of longitudinal part of the tensor (see documentation of method transv...
const Scalar & www() const
Gives the field W (see member p_www ).
Sym_tensor_trans * p_transverse[N_MET_MAX]
Array of the transverse part of the tensor with respect to various metrics, transverse meaning diver...
Definition: sym_tensor.h:239
Scalar get_tilde_B_from_TT_trace(const Scalar &tilde_B_tt_in, const Scalar &trace) const
Computes (see Sym_tensor::p_tilde_b ) from its transverse-traceless part and the trace.
const Scalar & mu(Param *par=0x0) const
Gives the field (see member p_mu ).
virtual void del_deriv() const
Deletes the derived quantities.
Definition: sym_tensor.C:286
Scalar compute_tilde_B_tt(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_b ) associated with the TT-part of the Sym_tensor .
Scalar * p_eta
Field such that the components of the tensor are written (has only meaning with spherical component...
Definition: sym_tensor.h:260
Scalar * p_xxx
Field X such that the components and of the tensor are written (has only meaning with spherical com...
Definition: sym_tensor.h:312
Sym_tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
Definition: sym_tensor.C:360
void set_auxiliary(const Scalar &trr, const Scalar &eta_over_r, const Scalar &mu_over_r, const Scalar &www, const Scalar &xxx, const Scalar &ttt)
Assigns the component and the derived members p_eta , p_mu , p_www, p_xxx and p_ttt ,...
void set_der_0x0() const
Sets the pointers on derived quantities to 0x0.
Definition: sym_tensor.C:305
Scalar * p_www
Field W such that the components and of the tensor are written (has only meaning with spherical com...
Definition: sym_tensor.h:293
const Scalar & compute_tilde_B(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_b ).
virtual ~Sym_tensor()
Destructor.
Definition: sym_tensor.C:222
Vector * p_longit_pot[N_MET_MAX]
Array of the vector potential of the longitudinal part of the tensor with respect to various metrics ...
Definition: sym_tensor.h:246
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
Definition: sym_tensor.C:349
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_r ).
Definition: sym_tensor.C:446
Symmetric tensors (with respect to two of their arguments).
Definition: tensor.h:1037
Tensor handling.
Definition: tensor.h:288
Tensor field of valence 1.
Definition: vector.h:188
Scalar trace() const
Trace on two different type indices for a valence 2 tensor.
Lorene prototypes.
Definition: app_hor.h:64