LORENE
sym_tensor_tt.C
1/*
2 * Methods of class Sym_tensor_tt
3 *
4 * (see file sym_tensor.h for documentation)
5 *
6 */
7
8/*
9 * Copyright (c) 2003-2004 Eric Gourgoulhon & Jerome Novak
10 *
11 * This file is part of LORENE.
12 *
13 * LORENE is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * LORENE is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with LORENE; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 */
28
29
30char sym_tensor_tt_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tensor/sym_tensor_tt.C,v 1.7 2014/10/13 08:53:43 j_novak Exp $" ;
31
32/*
33 * $Id: sym_tensor_tt.C,v 1.7 2014/10/13 08:53:43 j_novak Exp $
34 * $Log: sym_tensor_tt.C,v $
35 * Revision 1.7 2014/10/13 08:53:43 j_novak
36 * Lorene classes and functions now belong to the namespace Lorene.
37 *
38 * Revision 1.6 2014/10/06 15:13:19 j_novak
39 * Modified #include directives to use c++ syntax.
40 *
41 * Revision 1.5 2005/04/01 14:28:32 j_novak
42 * Members p_eta and p_mu are now defined in class Sym_tensor.
43 *
44 * Revision 1.4 2004/03/30 14:01:19 j_novak
45 * Copy constructors and operator= now copy the "derived" members.
46 *
47 * Revision 1.3 2004/03/03 13:16:21 j_novak
48 * New potential khi (p_khi) and the functions manipulating it.
49 *
50 * Revision 1.2 2004/01/04 20:52:45 e_gourgoulhon
51 * Added assignement (operator=) to a Tensor_sym.
52 *
53 * Revision 1.1 2003/10/27 10:50:54 e_gourgoulhon
54 * First version.
55 *
56 *
57 *
58 * $Header: /cvsroot/Lorene/C++/Source/Tensor/sym_tensor_tt.C,v 1.7 2014/10/13 08:53:43 j_novak Exp $
59 *
60 */
61
62// Headers C
63#include <cstdlib>
64
65// Headers Lorene
66#include "tensor.h"
67
68 //--------------//
69 // Constructors //
70 //--------------//
71
72// Standard constructor
73// --------------------
74namespace Lorene {
76 const Metric& met)
77 : Sym_tensor_trans(map, triad_i, met ) {
78
79 set_der_0x0() ;
80
81}
82
83// Copy constructor
84// ----------------
87
88 set_der_0x0() ;
89
90 if (source.p_khi != 0x0) p_khi = new Scalar( *(source.p_khi) ) ;
91
92}
93
94
95// Constructor from a file
96// -----------------------
103
104 //--------------//
105 // Destructor //
106 //--------------//
107
109
110 Sym_tensor_tt::del_deriv() ; // in order not to follow the virtual aspect
111 // of del_deriv()
112
113}
114
115
116
117 //-------------------//
118 // Memory managment //
119 //-------------------//
120
122
123 if (p_khi != 0x0) delete p_khi ;
124
125 set_der_0x0() ;
126
128
129}
130
132
133 p_khi = 0x0 ;
134}
135
136
137 //--------------//
138 // Assignment //
139 //--------------//
140
142
143 // Assignment of quantities common to all derived classes of Sym_tensor_trans
145
146 del_deriv() ;
147
148 if (source.p_khi != 0x0) p_khi = new Scalar( *(source.p_khi) ) ;
149
150}
151
152
154
155 // Assignment of quantities common to all derived classes of Sym_tensor_trans
157
158 del_deriv() ;
159}
160
161
162
164
165 // Assignment of quantities common to all derived classes of Sym_tensor_trans
167
168 del_deriv() ;
169}
170
171
173
174 // Assignment of quantities common to all derived classes of Sym_tensor_trans
176
177 del_deriv() ;
178}
179
180
182
183 // Assignment of quantities common to all derived classes of Sym_tensor_trans
185
186 del_deriv() ;
187}
188
189
190
191
192}
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition base_vect.h:105
Time evolution with partial storage (*** under development ***).
Definition evolution.h:371
Base class for coordinate mappings.
Definition map.h:670
Metric for tensor calculation.
Definition metric.h:90
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
virtual void operator=(const Sym_tensor_trans &a)
Assignment to another Sym_tensor_trans.
virtual void del_deriv() const
Deletes the derived quantities.
Transverse and traceless symmetric tensors of rank 2.
Definition sym_tensor.h:938
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.
virtual void del_deriv() const
Deletes the derived quantities.
virtual void operator=(const Sym_tensor_tt &a)
Assignment to another Sym_tensor_tt.
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:223
Symmetric tensors (with respect to two of their arguments).
Definition tensor.h:1037
Tensor handling.
Definition tensor.h:288
Lorene prototypes.
Definition app_hor.h:64