LORENE
connection_flat.C
1 /*
2  * Methods of class Connection_flat.
3  *
4  * (see file connection.h for documentation)
5  *
6  */
7 
8 /*
9  * Copyright (c) 2003 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 version 2
15  * as published by the Free Software Foundation.
16  *
17  * LORENE is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with LORENE; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 
29 
30 /*
31  * $Id: connection_flat.C,v 1.7 2016/12/05 16:17:50 j_novak Exp $
32  * $Log: connection_flat.C,v $
33  * Revision 1.7 2016/12/05 16:17:50 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.6 2014/10/13 08:52:50 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.5 2014/10/06 15:13:04 j_novak
40  * Modified #include directives to use c++ syntax.
41  *
42  * Revision 1.4 2003/12/30 22:59:35 e_gourgoulhon
43  * Suppressed method fait_ricci() (the computation of the Ricci is
44  * now devoted to the virtual method ricci()).
45  *
46  * Revision 1.3 2003/10/11 14:39:50 e_gourgoulhon
47  * Suppressed declaration of unusued arguments in some methods.
48  *
49  * Revision 1.2 2003/10/01 15:42:49 e_gourgoulhon
50  * still ongoing...
51  *
52  * Revision 1.1 2003/09/29 21:13:08 e_gourgoulhon
53  * First version --- not ready yet.
54  *
55  *
56  *
57  *
58  * $Header: /cvsroot/Lorene/C++/Source/Connection/connection_flat.C,v 1.7 2016/12/05 16:17:50 j_novak Exp $
59  *
60  */
61 
62 // C++ headers
63 #include "headcpp.h"
64 
65 // C headers
66 #include <cstdlib>
67 
68 // Lorene headers
69 #include "connection.h"
70 
71 
72  //---------------------------//
73  // Constructors //
74  //---------------------------//
75 
76 
77 // Constructor for derived classes
78 
79 namespace Lorene {
81  : Connection(mpi, bi) {
82 
83  assoc_metric = true ;
84 
85  delta.set_etat_zero() ;
86 
87 }
88 
89 // Copy constructor
91  : Connection(ci) {
92 
93 }
94 
95 
96  //------------------------//
97  // Destructor //
98  //------------------------//
99 
101 
102 }
103 
104 
105 
106  //-----------------------------//
107  // Mutators / assignment //
108  //-----------------------------//
109 
111 
112  cout << "Connection_flat::operator= : not implemented yet !" << endl ;
113  abort() ;
114 
115 }
116 
117 
118 
119  //-----------------------------//
120  // Computational methods //
121  //-----------------------------//
122 
123 
125 
126  if (p_ricci == 0x0) { // a new computation is necessary
127 
128  p_ricci = new Sym_tensor(*mp, COV, *triad) ;
129  p_ricci->set_etat_zero() ;
130  }
131 
132  return *p_ricci ;
133 
134 }
135 
136 
137 
138 
139 
140 
141 
142 
143 }
const Map *const mp
Reference mapping.
Definition: connection.h:119
Class Connection_flat.
Definition: connection.h:354
bool assoc_metric
Indicates whether the connection is associated with a metric (in which case the Ricci tensor is symme...
Definition: connection.h:147
Lorene prototypes.
Definition: app_hor.h:67
Base class for coordinate mappings.
Definition: map.h:688
Tensor_sym delta
Tensor which defines the connection with respect to the flat one: is the difference between the con...
Definition: connection.h:141
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition: base_vect.h:105
virtual ~Connection_flat()
destructor
void operator=(const Connection_flat &)
Assignment to another Connection_flat.
Class Connection.
Definition: connection.h:113
Connection_flat(const Map &, const Base_vect &)
Contructor from a triad, has to be defined in the derived classes.
Tensor handling.
Definition: tensor.h:294
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Definition: tensor.C:506
Tensor * p_ricci
Pointer of the Ricci tensor associated with the connection.
Definition: connection.h:164
const Base_vect *const triad
Triad with respect to which the connection coefficients are defined.
Definition: connection.h:124
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226
virtual const Tensor & ricci() const
Computes (if not up to date) and returns the Ricci tensor associated with the current connection...