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.50 2019/08/16 08:47:36 j_novak Exp $
32 * $Log: sym_tensor.h,v $
33 * Revision 1.50 2019/08/16 08:47:36 j_novak
34 * *** empty log message ***
35 *
36 * Revision 1.49 2014/10/13 08:52:36 j_novak
37 * Lorene classes and functions now belong to the namespace Lorene.
38 *
39 * Revision 1.48 2010/10/11 10:23:03 j_novak
40 * Removed methods Sym_tensor_trans::solve_hrr() and Sym_tensor_trans::set_WX_det_one(), as they are no longer relevant.
41 *
42 * Revision 1.47 2008/12/05 08:46:19 j_novak
43 * New method Sym_tensor_trans_aux::set_tt_part_det_one.
44 *
45 * Revision 1.46 2008/12/03 10:18:56 j_novak
46 * Method 6 is now the default for calls to vector Poisson solver.
47 *
48 * Revision 1.45 2008/08/20 14:39:53 n_vasset
49 * New Dirac solvers handling degenerate elliptic operators on excised spacetimes.
50 *
51 * Revision 1.44 2007/12/21 16:06:16 j_novak
52 * Methods to filter Tensor, Vector and Sym_tensor objects.
53 *
54 * Revision 1.43 2007/11/27 15:48:52 n_vasset
55 * New member p_tilde_c for class Sym_tensor
56 *
57 * Revision 1.42 2007/05/04 16:43:50 n_vasset
58 * adding of functions sol_Dirac_BC2 and sol_Dirac_A2
59 *
60 * Revision 1.41 2006/10/24 13:03:17 j_novak
61 * New methods for the solution of the tensor wave equation. Perhaps, first
62 * operational version...
63 *
64 * Revision 1.40 2006/08/31 12:13:21 j_novak
65 * Added an argument of type Param to Sym_tensor_trans::sol_ rac_A().
66 *
67 * Revision 1.39 2006/06/20 12:07:13 j_novak
68 * Improved execution speed for sol_Dirac_tildeB...
69 *
70 * Revision 1.38 2006/06/14 10:04:19 j_novak
71 * New methods sol_Dirac_l01, set_AtB_det_one and set_AtB_trace_zero.
72 *
73 * Revision 1.37 2006/06/13 13:30:12 j_novak
74 * New members sol_Dirac_A and sol_Dirac_tildeB (see documentation).
75 *
76 * Revision 1.36 2006/06/12 13:37:23 j_novak
77 * Added bounds in l (multipolar momentum) for Sym_tensor_trans::solve_hrr.
78 *
79 * Revision 1.35 2006/06/12 07:42:28 j_novak
80 * Fields A and tilde{B} are defined only for l>1.
81 *
82 * Revision 1.34 2006/06/12 07:27:18 j_novak
83 * New members concerning A and tilde{B}, dealing with the transverse part of the
84 * Sym_tensor.
85 *
86 * Revision 1.33 2005/11/28 14:45:14 j_novak
87 * Improved solution of the Poisson tensor equation in the case of a transverse
88 * tensor.
89 *
90 * Revision 1.32 2005/09/16 13:58:10 j_novak
91 * New Poisson solver for a Sym_tensor_trans.
92 *
93 * Revision 1.31 2005/09/07 16:47:42 j_novak
94 * Removed method Sym_tensor_trans::T_from_det_one
95 * Modified Sym_tensor::set_auxiliary, so that it takes eta/r and mu/r as
96 * arguments.
97 * Modified Sym_tensor_trans::set_hrr_mu.
98 * Added new protected method Sym_tensor_trans::solve_hrr
99 *
100 * Revision 1.30 2005/04/08 08:22:04 j_novak
101 * New methods set_hrr_mu_det_one() and set_WX_det_one(). Not tested yet...
102 *
103 * Revision 1.29 2005/04/06 15:43:58 j_novak
104 * New method Sym_tensor_trans::T_from_det_one(...).
105 *
106 * Revision 1.28 2005/04/04 15:25:22 j_novak
107 * Added new members www, xxx, ttt and the associated methods.
108 *
109 * Revision 1.27 2005/04/01 14:28:31 j_novak
110 * Members p_eta and p_mu are now defined in class Sym_tensor.
111 *
112 * Revision 1.26 2005/01/03 08:34:58 f_limousin
113 * Come back to the previous version.
114 *
115 * Revision 1.25 2005/01/03 08:15:39 f_limousin
116 * The first argument of the function trace_from_det_one(...) is now
117 * a Sym_tensor_trans instead of a Sym_tensor_tt (because of a
118 * compilation error with some compilators).
119 *
120 * Revision 1.24 2004/12/28 14:21:46 j_novak
121 * Added the method Sym_tensor_trans::trace_from_det_one
122 *
123 * Revision 1.23 2004/12/28 10:37:22 j_novak
124 * Better way of enforcing zero divergence.
125 *
126 * Revision 1.22 2004/06/14 20:44:44 e_gourgoulhon
127 * Added argument method_poisson to Sym_tensor::longit_pot and
128 * Sym_tensor::transverse.
129 *
130 * Revision 1.21 2004/05/25 14:57:20 f_limousin
131 * Add parameters in argument of functions transverse, longit_pot,
132 * set_tt_trace, tt_part and set_khi_mu for the case of a Map_et.
133 *
134 * Revision 1.20 2004/05/24 13:44:54 e_gourgoulhon
135 * Added parameter dzp to method Sym_tensor_tt::update.
136 *
137 * Revision 1.19 2004/04/08 16:37:54 e_gourgoulhon
138 * Sym_tensor_tt::set_khi_mu: added argument dzp (dzpuis of resulting h^{ij}).
139 *
140 * Revision 1.18 2004/03/30 14:01:19 j_novak
141 * Copy constructors and operator= now copy the "derived" members.
142 *
143 * Revision 1.17 2004/03/29 16:13:06 j_novak
144 * New methods set_longit_trans and set_tt_trace .
145 *
146 * Revision 1.16 2004/03/22 13:12:43 j_novak
147 * Modification of comments to use doxygen instead of doc++
148 *
149 * Revision 1.15 2004/03/03 13:54:16 j_novak
150 * Error in comments corrected.
151 *
152 * Revision 1.14 2004/03/03 13:16:20 j_novak
153 * New potential khi (p_khi) and the functions manipulating it.
154 *
155 * Revision 1.13 2004/02/26 22:45:13 e_gourgoulhon
156 * Added method derive_lie.
157 *
158 * Revision 1.12 2004/02/18 18:43:22 e_gourgoulhon
159 * Method trace() renamed the_trace() in order to avoid
160 * any confusion with new method Tensor::trace().
161 *
162 * Revision 1.11 2004/01/04 20:49:06 e_gourgoulhon
163 * Sym_tensor is now a derived class of Tensor_sym.
164 * Suppressed methods Sym_tensor::indices and Sym_tensor::position:
165 * they are now implemented at the Tensor_sym level.
166 *
167 * Revision 1.10 2003/11/27 16:05:11 e_gourgoulhon
168 * Changed return value of methods transverse( ) and longit_pot( ).
169 *
170 * Revision 1.9 2003/11/26 21:56:21 e_gourgoulhon
171 * Class Sym_tensor: added the members p_transverse and p_longit_pot,
172 * and the associated methods transverse( ), longit_pot( ),
173 * del_deriv_met( ) and set_der_met_0x0( ).
174 *
175 * Revision 1.8 2003/11/07 16:54:23 e_gourgoulhon
176 * Added method Sym_tensor_tt::poisson().
177 *
178 * Revision 1.7 2003/11/06 14:43:37 e_gourgoulhon
179 * Gave a name to const arguments in certain method prototypes (e.g.
180 * constructors) to correct a bug of DOC++.
181 *
182 * Revision 1.6 2003/11/05 15:26:31 e_gourgoulhon
183 * Modif documentation.
184 *
185 * Revision 1.5 2003/11/04 22:57:26 e_gourgoulhon
186 * Class Sym_tensor_tt: method set_eta_mu renamed set_rr_eta_mu
187 * method update_tp() renamed update()
188 * added method set_rr_mu.
189 *
190 * Revision 1.4 2003/11/03 22:29:54 e_gourgoulhon
191 * Class Sym_tensor_tt: added functions set_eta_mu and update_tp.
192 *
193 * Revision 1.3 2003/11/03 17:09:30 e_gourgoulhon
194 * Class Sym_tensor_tt: added the methods eta() and mu().
195 *
196 * Revision 1.2 2003/10/28 21:22:51 e_gourgoulhon
197 * Class Sym_tensor_trans: added methods trace() and tt_part().
198 *
199 * Revision 1.1 2003/10/27 10:45:19 e_gourgoulhon
200 * New derived classes Sym_tensor_trans and Sym_tensor_tt.
201 *
202 *
203 * $Header: /cvsroot/Lorene/C++/Include/sym_tensor.h,v 1.50 2019/08/16 08:47:36 j_novak Exp $
204 *
205 */
206
207namespace Lorene {
208class Sym_tensor_trans ;
209class Sym_tensor_tt ;
210
211
212
213
214 //---------------------------------//
215 // class Sym_tensor //
216 //---------------------------------//
217
226class Sym_tensor : public Tensor_sym {
227
228 // Derived data :
229 // ------------
230 protected:
242 mutable Sym_tensor_trans* p_transverse[N_MET_MAX] ;
243
249 mutable Vector* p_longit_pot[N_MET_MAX] ;
250
263 mutable Scalar* p_eta ;
264
277 mutable Scalar* p_mu ;
278
296 mutable Scalar* p_www ;
297
315 mutable Scalar* p_xxx ;
316
318 mutable Scalar* p_ttt ;
319
325 mutable Scalar* p_aaa ;
326
337 mutable Scalar* p_tilde_b ;
338
349 mutable Scalar* p_tilde_c ;
350
351
352
353
354
355
356 // Constructors - Destructor :
357 // -------------------------
358
359 public:
373 Sym_tensor(const Map& map, const Itbl& tipe, const Base_vect& triad_i) ;
374
383 Sym_tensor(const Map& map, int tipe, const Base_vect& triad_i) ;
384
385 Sym_tensor(const Sym_tensor& a) ;
386
390 Sym_tensor(const Tensor& a) ;
391
402 Sym_tensor(const Map& map, const Base_vect& triad_i, FILE* fich) ;
403
404 virtual ~Sym_tensor() ;
405
406
407
408 // Memory management
409 // -----------------
410 protected:
411 virtual void del_deriv() const;
412
414 void set_der_0x0() const ;
415
420 virtual void del_derive_met(int i) const ;
421
425 void set_der_met_0x0(int i) const ;
426
427
428 // Mutators / assignment
429 // ---------------------
430 public:
432 virtual void operator=(const Sym_tensor& a) ;
433
435 virtual void operator=(const Tensor_sym& a) ;
436
442 virtual void operator=(const Tensor& a) ;
443
449 void set_longit_trans( const Vector& v, const Sym_tensor_trans& a) ;
450
457 void set_auxiliary( const Scalar& trr, const Scalar& eta_over_r, const
458 Scalar& mu_over_r, const Scalar& www, const Scalar&
459 xxx, const Scalar& ttt ) ;
460
466 virtual void exponential_filter_r(int lzmin, int lzmax, int p,
467 double alpha= -16.) ;
468
474 virtual void exponential_filter_ylm(int lzmin, int lzmax, int p,
475 double alpha= -16.) ;
476
477 // Computation of derived members
478 // ------------------------------
479 public:
480
481
485 const Vector& divergence(const Metric&) const ;
486
490 Sym_tensor derive_lie(const Vector& v) const ;
491
509 const Sym_tensor_trans& transverse(const Metric& gam, Param* par = 0x0,
510 int method_poisson = 6) const ;
511
522 const Vector& longit_pot(const Metric& gam, Param* par = 0x0,
523 int method_poisson = 6) const ;
524
526 virtual const Scalar& eta(Param* par = 0x0) const ;
527
529 const Scalar& mu(Param* par = 0x0) const ;
530
532 const Scalar& www() const ;
533
535 const Scalar& xxx() const ;
536
538 const Scalar& ttt() const ;
539
545 const Scalar& compute_A(bool output_ylm = true, Param* par = 0x0) const ;
546
552 const Scalar& compute_tilde_B(bool output_ylm = true, Param* par = 0x0) const ;
553
560 Scalar compute_tilde_B_tt(bool output_ylm = true, Param* par = 0x0) const ;
561
567 const Scalar& compute_tilde_C(bool output_ylm = true, Param* par = 0x0) const ;
568
569
570
571
572
573 protected:
577 Scalar get_tilde_B_from_TT_trace(const Scalar& tilde_B_tt_in, const Scalar&
578 trace) const ;
579
580 // Mathematical operators
581 // ----------------------
582 protected:
587 Sym_tensor* inverse() const ;
588
589 // Friend classes
590 //-----------------
591 friend class Metric ;
592
593} ;
594
595
596 //---------------------------------//
597 // class Sym_tensor_trans //
598 //---------------------------------//
599
600
612
613 // Data :
614 // -----
615 protected:
617 const Metric* const met_div ;
618
620 mutable Scalar* p_trace ;
621
624
625 // Constructors - Destructor
626 // -------------------------
627 public:
635 Sym_tensor_trans(const Map& map, const Base_vect& triad_i,
636 const Metric& met) ;
637
639
651 Sym_tensor_trans(const Map& map, const Base_vect& triad_i,
652 const Metric& met, FILE* fich) ;
653
654 virtual ~Sym_tensor_trans() ;
655
656
657 // Memory management
658 // -----------------
659 protected:
660 virtual void del_deriv() const;
661
663 void set_der_0x0() const ;
664
665
666 // Accessors
667 // ---------
668 public:
672 const Metric& get_met_div() const {return *met_div ; } ;
673
674 // Mutators / assignment
675 // ---------------------
676
677 public:
679 virtual void operator=(const Sym_tensor_trans& a) ;
680
682 virtual void operator=(const Sym_tensor& a) ;
683
685 virtual void operator=(const Tensor_sym& a) ;
686
688 virtual void operator=(const Tensor& a) ;
689
695 void set_tt_trace(const Sym_tensor_tt& a, const Scalar& h,
696 Param* par = 0x0) ;
697
698 // Computational methods
699 // ---------------------
701 const Scalar& the_trace() const ;
702
707 const Sym_tensor_tt& tt_part(Param* par = 0x0) const ;
708
709 protected:
725 void sol_Dirac_A(const Scalar& aaa, Scalar& tilde_mu, Scalar& xxx,
726 const Param* par_bc = 0x0) const ;
727
728
755 void sol_Dirac_tilde_B(const Scalar& tilde_b, const Scalar& hh, Scalar& hrr,
756 Scalar& tilde_eta, Scalar& www, Param* par_bc=0x0,
757 Param* par_mat=0x0) const ;
758
763 void sol_Dirac_l01(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta,
764 Param* par_mat) const ;
765
766
767
768 public:
769
770
771
775
776
777 void sol_Dirac_Abound(const Scalar& aaa, Scalar& tilde_mu, Scalar& x_new,
778 Scalar bound_mu, const Param* par_bc);
779
780
785
786
787 void sol_Dirac_A2(const Scalar& aaa, Scalar& tilde_mu, Scalar& x_new,
788 Scalar bound_mu, const Param* par_bc);
789
794
795 void sol_Dirac_BC2(const Scalar& bb, const Scalar& cc, const Scalar& hh,
796 Scalar& hrr, Scalar& tilde_eta, Scalar& ww, Scalar bound_eta,double dir, double neum, double rhor, Param* par_bc, Param* par_mat);
797
798
803
804 void sol_Dirac_BC3(const Scalar& bb, const Scalar& hh,
805 Scalar& hrr, Scalar& tilde_eta, Scalar& ww, Scalar bound_hrr, Scalar bound_eta, Param* par_bc, Param* par_mat);
806
807
808
809 // Solving the electric system for l=0 and l=1 only (simpler case), with boundary conditions imposed by the degenerate elliptic system.
810
811 void sol_Dirac_l01_bound(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta, Scalar& bound_hrr, Scalar& bound_eta, Param* par_mat) ;
812
813 // Provisory: just for compilation, to be removed
814 void sol_Dirac_l01_2(const Scalar& hh, Scalar& hrr, Scalar& tilde_eta, Param* par_mat) ;
815
816
830 void trace_from_det_one(const Sym_tensor_tt& htt,
831 double precis = 1.e-14, int it_max = 100) ;
832
847 void set_hrr_mu_det_one(const Scalar& hrr, const Scalar& mu_in,
848 double precis = 1.e-14, int it_max = 100) ;
849
864 void set_tt_part_det_one(const Sym_tensor_tt& hijtt, const
865 Scalar* h_prev = 0x0, Param* par_mat = 0x0,
866 double precis = 1.e-14, int it_max = 100) ;
867
886 void set_AtBtt_det_one(const Scalar& a_in, const Scalar& tbtt_in,
887 const Scalar* h_prev = 0x0, Param* par_bc = 0x0,
888 Param* par_mat = 0x0, double precis = 1.e-14,
889 int it_max = 100) ;
890
898 void set_AtB_trace(const Scalar& a_in, const Scalar& tb_in, const
899 Scalar& trace, Param* par_bc = 0x0, Param* par_mat = 0x0) ;
900
914 Sym_tensor_trans poisson(const Scalar* h_guess = 0x0) const ;
915} ;
916
917
918 //------------------------------//
919 // class Sym_tensor_tt //
920 //------------------------------//
921
922
934
935 // Data :
936 // -----
937
938 protected:
941 mutable Scalar* p_khi ;
942
943
944 // Constructors - Destructor
945 // -------------------------
946 public:
954 Sym_tensor_tt(const Map& map, const Base_vect& triad_i,
955 const Metric& met) ;
956
957 Sym_tensor_tt(const Sym_tensor_tt& ) ;
958
970 Sym_tensor_tt(const Map& map, const Base_vect& triad_i,
971 const Metric& met, FILE* fich) ;
972
973 virtual ~Sym_tensor_tt() ;
974
975
976 // Memory management
977 // -----------------
978 protected:
979 virtual void del_deriv() const;
980
982 void set_der_0x0() const ;
983
984
985 // Mutators / assignment
986 // ---------------------
987
988 public:
990 virtual void operator=(const Sym_tensor_tt& a) ;
991
993 virtual void operator=(const Sym_tensor_trans& a) ;
994
996 virtual void operator=(const Sym_tensor& a) ;
997
999 virtual void operator=(const Tensor_sym& a) ;
1000
1002 virtual void operator=(const Tensor& a) ;
1003
1015 void set_rr_eta_mu(const Scalar& hrr, const Scalar& eta_i,
1016 const Scalar& mu_i) ;
1017
1029 void set_rr_mu(const Scalar& hrr, const Scalar& mu_i) ;
1030
1031
1043 void set_khi_eta_mu(const Scalar& khi_i, const Scalar& eta_i,
1044 const Scalar& mu_i) ;
1045
1059 void set_khi_mu(const Scalar& khi_i, const Scalar& mu_i, int dzp = 0,
1060 Param* par1 = 0x0, Param* par2 = 0x0,
1061 Param* par3 = 0x0) ;
1062
1070 void set_A_tildeB(const Scalar& a_in, const Scalar& tb_in, Param* par_bc = 0x0,
1071 Param* par_mat = 0x0) ;
1072
1073 // Computational methods
1074 // ---------------------
1075
1076 public:
1080 const Scalar& khi() const ;
1081
1083 virtual const Scalar& eta(Param* par = 0x0) const ;
1084
1085 protected:
1092 void update(int dzp, Param* par1 = 0x0, Param* par2 = 0x0) ;
1093
1094 public:
1106 Sym_tensor_tt poisson(int dzfin = 2) const ;
1107
1108
1109
1110} ;
1111
1112
1113
1114
1115}
1116#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
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:393
Transverse symmetric tensors of rank 2.
Definition sym_tensor.h:611
Sym_tensor_tt * p_tt
Traceless part with respect to the metric *met_div.
Definition sym_tensor.h:623
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:617
Scalar * p_trace
Trace with respect to the metric *met_div.
Definition sym_tensor.h:620
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 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.
const Metric & get_met_div() const
Returns the metric with respect to which the divergence and the trace are defined.
Definition sym_tensor.h:672
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:933
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:941
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.
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:226
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:474
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:323
Sym_tensor * inverse() const
Returns a pointer on the inverse of the Sym_tensor (seen as a matrix).
Definition sym_tensor.C:375
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:237
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:318
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for ).
Definition sym_tensor.h:325
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:338
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
Definition sym_tensor.h:337
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
Definition sym_tensor.h:277
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:349
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:242
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:289
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:263
Scalar * p_xxx
Field X such that the components and of the tensor are written (has only meaning with spherical co...
Definition sym_tensor.h:315
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:363
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 ,...
Sym_tensor(const Map &map, const Itbl &tipe, const Base_vect &triad_i)
Standard constructor.
Definition sym_tensor.C:145
void set_der_0x0() const
Sets the pointers on derived quantities to 0x0.
Definition sym_tensor.C:308
Scalar * p_www
Field W such that the components and of the tensor are written (has only meaning with spherical co...
Definition sym_tensor.h:296
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:225
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:249
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
Definition sym_tensor.C:352
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:449
Symmetric tensors (with respect to two of their arguments).
Definition tensor.h:1050
Tensor handling.
Definition tensor.h:294
Tensor field of valence 1.
Definition vector.h:188
Scalar trace() const
Trace on two different type indices for a valence 2 tensor.
Tensor_sym(const Map &map, int val, const Itbl &tipe, const Base_vect &triad_i, int index_sym1, int index_sym2)
Standard constructor.
Definition tensor_sym.C:72
Tensor trace(int ind1, int ind2) const
Trace on two different type indices.
Lorene prototypes.
Definition app_hor.h:67
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:142