00001 /* 00002 * Method of the class Map_et for computing the integral of a Cmp over 00003 * all space. 00004 */ 00005 00006 /* 00007 * Copyright (c) 2000-2001 Eric Gourgoulhon 00008 * 00009 * This file is part of LORENE. 00010 * 00011 * LORENE is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * LORENE is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with LORENE; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 * 00025 */ 00026 00027 00028 char map_et_integ_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_et_integ.C,v 1.3 2004/07/26 16:02:23 j_novak Exp $" ; 00029 00030 /* 00031 * $Id: map_et_integ.C,v 1.3 2004/07/26 16:02:23 j_novak Exp $ 00032 * $Log: map_et_integ.C,v $ 00033 * Revision 1.3 2004/07/26 16:02:23 j_novak 00034 * Added a flag to specify whether the primitive should be zero either at r=0 00035 * or at r going to infinity. 00036 * 00037 * Revision 1.2 2004/06/14 15:27:35 e_gourgoulhon 00038 * Added method primr (not ready yet !). 00039 * 00040 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon 00041 * LORENE 00042 * 00043 * Revision 2.2 2000/08/16 12:12:12 eric 00044 * Ajout de ciaff.set_dzpuis( ci.get_dzpuis() ) pour tenir compte de 00045 * la suppression de Mtbl::dzpuis. 00046 * 00047 * Revision 2.1 2000/01/17 12:40:32 eric 00048 * *** empty log message *** 00049 * 00050 * Revision 2.0 2000/01/17 11:17:06 eric 00051 * *** empty log message *** 00052 * 00053 * 00054 * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_integ.C,v 1.3 2004/07/26 16:02:23 j_novak Exp $ 00055 * 00056 */ 00057 00058 00059 // Headers C 00060 #include <stdlib.h> 00061 00062 00063 // Headers Lorene 00064 #include "map.h" 00065 #include "cmp.h" 00066 00067 Tbl* Map_et::integrale(const Cmp& ci) const { 00068 00069 assert(ci.get_etat() != ETATNONDEF) ; 00070 00071 int nz = mg->get_nzone() ; 00072 00073 if (ci.get_etat() == ETATZERO) { 00074 Tbl* resu = new Tbl(nz) ; 00075 resu->annule_hard() ; 00076 return resu ; 00077 } 00078 00079 assert( ci.get_etat() == ETATQCQ ) ; 00080 00081 // Construction of an affine mapping to call Map_af::integrale 00082 Map_af mpaff(*this) ; 00083 00084 Cmp ciaff(mpaff) ; 00085 00086 // Multiplication by the reducted Jacobian of the mapping 00087 00088 Base_val sauve_base = (ci.va).base ; 00089 00090 ciaff = (ci.va) * rsx2drdx ; 00091 00092 (ciaff.va).set_base(sauve_base) ; 00093 00094 ciaff.set_dzpuis( ci.get_dzpuis() ) ; 00095 00096 // Call to the Map_af version : 00097 00098 return mpaff.integrale(ciaff) ; 00099 00100 } 00101 00102 00103 void Map_et::primr(const Scalar& , Scalar& , bool) const { 00104 00105 cout << "Map_et::primr : not ready yet !" << endl ; 00106 abort() ; 00107 }
1.4.6