LORENE
map_et_integ.C
1/*
2 * Method of the class Map_et for computing the integral of a Cmp over
3 * all space.
4 */
5
6/*
7 * Copyright (c) 2000-2001 Eric Gourgoulhon
8 *
9 * This file is part of LORENE.
10 *
11 * LORENE is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * LORENE is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with LORENE; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27
28char map_et_integ_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_et_integ.C,v 1.5 2014/10/13 08:53:05 j_novak Exp $" ;
29
30/*
31 * $Id: map_et_integ.C,v 1.5 2014/10/13 08:53:05 j_novak Exp $
32 * $Log: map_et_integ.C,v $
33 * Revision 1.5 2014/10/13 08:53:05 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.4 2014/10/06 15:13:13 j_novak
37 * Modified #include directives to use c++ syntax.
38 *
39 * Revision 1.3 2004/07/26 16:02:23 j_novak
40 * Added a flag to specify whether the primitive should be zero either at r=0
41 * or at r going to infinity.
42 *
43 * Revision 1.2 2004/06/14 15:27:35 e_gourgoulhon
44 * Added method primr (not ready yet !).
45 *
46 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
47 * LORENE
48 *
49 * Revision 2.2 2000/08/16 12:12:12 eric
50 * Ajout de ciaff.set_dzpuis( ci.get_dzpuis() ) pour tenir compte de
51 * la suppression de Mtbl::dzpuis.
52 *
53 * Revision 2.1 2000/01/17 12:40:32 eric
54 * *** empty log message ***
55 *
56 * Revision 2.0 2000/01/17 11:17:06 eric
57 * *** empty log message ***
58 *
59 *
60 * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_integ.C,v 1.5 2014/10/13 08:53:05 j_novak Exp $
61 *
62 */
63
64
65// Headers C
66#include <cstdlib>
67
68
69// Headers Lorene
70#include "map.h"
71#include "cmp.h"
72
73namespace Lorene {
74Tbl* Map_et::integrale(const Cmp& ci) const {
75
76 assert(ci.get_etat() != ETATNONDEF) ;
77
78 int nz = mg->get_nzone() ;
79
80 if (ci.get_etat() == ETATZERO) {
81 Tbl* resu = new Tbl(nz) ;
82 resu->annule_hard() ;
83 return resu ;
84 }
85
86 assert( ci.get_etat() == ETATQCQ ) ;
87
88 // Construction of an affine mapping to call Map_af::integrale
89 Map_af mpaff(*this) ;
90
91 Cmp ciaff(mpaff) ;
92
93 // Multiplication by the reducted Jacobian of the mapping
94
95 Base_val sauve_base = (ci.va).base ;
96
97 ciaff = (ci.va) * rsx2drdx ;
98
99 (ciaff.va).set_base(sauve_base) ;
100
101 ciaff.set_dzpuis( ci.get_dzpuis() ) ;
102
103 // Call to the Map_af version :
104
105 return mpaff.integrale(ciaff) ;
106
107}
108
109
110void Map_et::primr(const Scalar& , Scalar& , bool) const {
111
112 cout << "Map_et::primr : not ready yet !" << endl ;
113 abort() ;
114}
115}
Bases of the spectral expansions.
Definition base_val.h:322
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
int get_etat() const
Returns the logical state.
Definition cmp.h:899
Valeur va
The numerical value of the Cmp
Definition cmp.h:464
int get_dzpuis() const
Returns dzpuis.
Definition cmp.h:903
void set_dzpuis(int)
Set a value to dzpuis.
Definition cmp.C:654
Affine radial mapping.
Definition map.h:2027
virtual Tbl * integrale(const Cmp &) const
Computes the integral over all space of a Cmp.
Coord rsx2drdx
in the nucleus and the shells; \ in the outermost compactified domain.
Definition map.h:2841
virtual Tbl * integrale(const Cmp &) const
Computes the integral over all space of a Cmp.
virtual void primr(const Scalar &uu, Scalar &resu, bool null_infty) const
Computes the radial primitive which vanishes for .
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
Definition map.h:676
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Basic array class.
Definition tbl.h:161
void annule_hard()
Sets the Tbl to zero in a hard way.
Definition tbl.C:372
Lorene prototypes.
Definition app_hor.h:64