| 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 |
|
| 28 |
char 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 |
|
| 73 |
namespace Lorene { |
| 74 |
Tbl* 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 |
|
| 110 |
void Map_et::primr(const Scalar& , Scalar& , bool) const { |
| 111 |
|
| 112 |
cout << "Map_et::primr : not ready yet !" << endl ; |
| 113 |
abort() ; |
| 114 |
} |
| 115 |
} |