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 char connection_flat_C[] = "$Header: /cvsroot/Lorene/C++/Source/Connection/connection_flat.C,v 1.6 2014/10/13 08:52:50 j_novak Exp $" ;
29 
30 /*
31  * $Id: connection_flat.C,v 1.6 2014/10/13 08:52:50 j_novak Exp $
32  * $Log: connection_flat.C,v $
33  * Revision 1.6 2014/10/13 08:52:50 j_novak
34  * Lorene classes and functions now belong to the namespace Lorene.
35  *
36  * Revision 1.5 2014/10/06 15:13:04 j_novak
37  * Modified #include directives to use c++ syntax.
38  *
39  * Revision 1.4 2003/12/30 22:59:35 e_gourgoulhon
40  * Suppressed method fait_ricci() (the computation of the Ricci is
41  * now devoted to the virtual method ricci()).
42  *
43  * Revision 1.3 2003/10/11 14:39:50 e_gourgoulhon
44  * Suppressed declaration of unusued arguments in some methods.
45  *
46  * Revision 1.2 2003/10/01 15:42:49 e_gourgoulhon
47  * still ongoing...
48  *
49  * Revision 1.1 2003/09/29 21:13:08 e_gourgoulhon
50  * First version --- not ready yet.
51  *
52  *
53  *
54  *
55  * $Header: /cvsroot/Lorene/C++/Source/Connection/connection_flat.C,v 1.6 2014/10/13 08:52:50 j_novak Exp $
56  *
57  */
58 
59 // C++ headers
60 #include "headcpp.h"
61 
62 // C headers
63 #include <cstdlib>
64 
65 // Lorene headers
66 #include "connection.h"
67 
68 
69  //---------------------------//
70  // Constructors //
71  //---------------------------//
72 
73 
74 // Constructor for derived classes
75 
76 namespace Lorene {
78  : Connection(mpi, bi) {
79 
80  assoc_metric = true ;
81 
82  delta.set_etat_zero() ;
83 
84 }
85 
86 // Copy constructor
88  : Connection(ci) {
89 
90 }
91 
92 
93  //------------------------//
94  // Destructor //
95  //------------------------//
96 
98 
99 }
100 
101 
102 
103  //-----------------------------//
104  // Mutators / assignment //
105  //-----------------------------//
106 
108 
109  cout << "Connection_flat::operator= : not implemented yet !" << endl ;
110  abort() ;
111 
112 }
113 
114 
115 
116  //-----------------------------//
117  // Computational methods //
118  //-----------------------------//
119 
120 
122 
123  if (p_ricci == 0x0) { // a new computation is necessary
124 
125  p_ricci = new Sym_tensor(*mp, COV, *triad) ;
126  p_ricci->set_etat_zero() ;
127  }
128 
129  return *p_ricci ;
130 
131 }
132 
133 
134 
135 
136 
137 
138 
139 
140 }
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:64
Base class for coordinate mappings.
Definition: map.h:670
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:288
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Definition: tensor.C:497
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:223
virtual const Tensor & ricci() const
Computes (if not up to date) and returns the Ricci tensor associated with the current connection...