LORENE
cmp_r_manip.C
1 /*
2  * Member functions of the class Cmp for various r manipulations
3  */
4 
5 /*
6  * Copyright (c) 1999-2001 Eric Gourgoulhon
7  * Copyright (c) 1999-2001 Philippe Grandclement
8  * Copyright (c) 2001 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 as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
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 /*
32  * $Id: cmp_r_manip.C,v 1.5 2016/12/05 16:17:49 j_novak Exp $
33  * $Log: cmp_r_manip.C,v $
34  * Revision 1.5 2016/12/05 16:17:49 j_novak
35  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36  *
37  * Revision 1.4 2014/10/13 08:52:48 j_novak
38  * Lorene classes and functions now belong to the namespace Lorene.
39  *
40  * Revision 1.3 2012/08/12 17:35:36 p_cerda
41  * Magnetstar: adding new member to class Cmp
42  *
43  * Revision 1.2 2004/10/11 15:09:01 j_novak
44  * The radial manipulation functions take Scalar as arguments, instead of Cmp.
45  * Added a conversion operator from Scalar to Cmp.
46  * The Cmp radial manipulation function make conversion to Scalar, call to the
47  * Map_radial version with a Scalar argument and back.
48  *
49  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
50  * LORENE
51  *
52  * Revision 1.5 2001/10/29 15:37:06 novak
53  * Ajout de Cmp::div_r()
54  *
55  * Revision 1.4 2000/08/31 13:04:46 eric
56  * Ajout des fonctions mult_rsint et div_rsint.
57  *
58  * Revision 1.3 2000/05/22 14:39:52 phil
59  * ajout de inc_dzpuis et dec_dzpuis
60  *
61  * Revision 1.2 1999/12/10 16:33:48 eric
62  * Appel de del_deriv().
63  *
64  * Revision 1.1 1999/11/30 14:22:54 eric
65  * Initial revision
66  *
67  *
68  * $Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_r_manip.C,v 1.5 2016/12/05 16:17:49 j_novak Exp $
69  *
70  */
71 
72 #include "cmp.h"
73 #include "scalar.h"
74 
75 
76  //---------------------------//
77  // div_r //
78  //---------------------------//
79 
80 namespace Lorene {
81 void Cmp::div_r() {
82 
83  Scalar resu(*this) ;
84  mp->div_r(resu) ; // Call to the Scalar version
85  operator=(Cmp(resu)) ;
86 
87  del_deriv() ; // Delete the derived members
88 
89 }
90  //---------------------------//
91  // mult_r //
92  //---------------------------//
93 
94 void Cmp::mult_r() {
95 
96  mp->mult_r(*this) ; // Call of the appropriate routine of the mapping
97 
98  del_deriv() ; // Delete the derived members
99 
100 }
101 
102  //---------------------------//
103  // mult_r_zec //
104  //---------------------------//
105 
107 
108  Scalar resu(*this) ;
109  mp->mult_r_zec(resu) ; // Call of the appropriate routine of the mapping
110  operator=(resu) ;
111  del_deriv() ; // Delete the derived members
112 
113 }
114 
115  //---------------------------//
116  // mult_rsint //
117  //---------------------------//
118 
120 
121  Scalar resu(*this) ;
122  mp->mult_rsint(resu) ; // Call of the appropriate routine of the mapping
123  operator=(resu) ;
124  del_deriv() ; // Delete the derived members
125 
126 }
127  //---------------------------//
128  // mult_rcost //
129  //---------------------------//
130 
132 
133  Scalar resu(*this) ;
134  mp->mult_cost(resu) ; // Call of the appropriate routine of the mapping
135  operator=(resu) ;
136  del_deriv() ; // Delete the derived members
137 
138 }
139 
140  //---------------------------//
141  // div_rsint //
142  //---------------------------//
143 
144 void Cmp::div_rsint() {
145 
146  Scalar resu(*this) ;
147  mp->div_rsint(resu) ; // Call of the appropriate routine of the mapping
148  operator=(resu) ;
149  del_deriv() ; // Delete the derived members
150 
151 }
152 
153  //---------------------------//
154  // dec_dzpuis //
155  //---------------------------//
156 
158 
159  Scalar resu(*this) ;
160  mp->dec_dzpuis(resu) ; // Call of the appropriate routine of the mapping
161  operator=(resu) ;
162 
163 }
164 
165  //---------------------------//
166  // inc_dzpuis //
167  //---------------------------//
168 
170 
171  Scalar resu(*this) ;
172  mp->inc_dzpuis(resu) ; // Call of the appropriate routine of the mapping
173  operator=(resu) ;
174 
175 }
176 
177 
178 
179  //---------------------------//
180  // dec2_dzpuis //
181  //---------------------------//
182 
184 
185  Scalar resu(*this) ;
186  mp->dec2_dzpuis(resu) ; // Call of the appropriate routine of the mapping
187  operator=(resu) ;
188 
189 }
190 
191  //---------------------------//
192  // inc2_dzpuis //
193  //---------------------------//
194 
196 
197  Scalar resu(*this) ;
198  mp->inc2_dzpuis(resu) ; // Call of the appropriate routine of the mapping
199  operator=(resu) ;
200 
201 }
202 
203 
204 }
void operator=(const Cmp &a)
Assignment to another Cmp defined on the same mapping.
Definition: cmp.C:401
void dec_dzpuis()
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:157
Lorene prototypes.
Definition: app_hor.h:67
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC)
Definition: cmp_r_manip.C:106
void del_deriv()
Logical destructor of the derivatives.
Definition: cmp.C:268
virtual void inc_dzpuis(Scalar &) const =0
Increases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void mult_rsint(Scalar &) const =0
Multiplication by of a Scalar.
void div_r()
Division by r everywhere.
Definition: cmp_r_manip.C:81
virtual void dec2_dzpuis(Scalar &) const =0
Decreases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
void inc_dzpuis()
Increases by the value of dzpuis and changes accordingly the values of the Cmp in the external compac...
Definition: cmp_r_manip.C:169
void mult_r()
Multiplication by r everywhere.
Definition: cmp_r_manip.C:94
virtual void div_rsint(Scalar &) const =0
Division by of a Scalar.
void mult_rsint()
Multiplication by .
Definition: cmp_r_manip.C:119
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:183
virtual void mult_cost(Scalar &) const =0
Multiplication by of a Scalar.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:195
virtual void mult_r(Scalar &uu) const =0
Multiplication by r of a Scalar , the dzpuis of uu is not changed.
virtual void inc2_dzpuis(Scalar &) const =0
Increases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
void mult_cost()
Multiplication by $.
Definition: cmp_r_manip.C:131
const Map * mp
Reference mapping.
Definition: cmp.h:451
Cmp(const Map &map)
Constructor from mapping.
Definition: cmp.C:211
virtual void mult_r_zec(Scalar &) const =0
Multiplication by r (in the compactified external domain only) of a Scalar.
virtual void dec_dzpuis(Scalar &) const =0
Decreases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void div_r(Scalar &) const =0
Division by r of a Scalar.