Debian Codegraph @

C++/Source/Connection/connection_flat.C

raw
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 {
77 Connection_flat::Connection_flat(const Map& mpi, const Base_vect& bi)
78 : Connection(mpi, bi) {
79
80 assoc_metric = true ;
81
82 delta.set_etat_zero() ;
83
84 }
85
86 // Copy constructor
87 Connection_flat::Connection_flat(const Connection_flat& ci)
88 : Connection(ci) {
89
90 }
91
92
93 //------------------------//
94 // Destructor //
95 //------------------------//
96
97 Connection_flat::~Connection_flat(){
98
99 }
100
101
102
103 //-----------------------------//
104 // Mutators / assignment //
105 //-----------------------------//
106
107 void Connection_flat::operator=(const Connection_flat& ) {
108
109 cout << "Connection_flat::operator= : not implemented yet !" << endl ;
110 abort() ;
111
112 }
113
114
115
116 //-----------------------------//
117 // Computational methods //
118 //-----------------------------//
119
120
121 const Tensor& Connection_flat::ricci() const {
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 }