00001 /* 00002 * Resolution of the angular Poisson equation. 00003 * 00004 * (see file map.h for documentation) 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2003-2005 Eric Gourgoulhon & Jerome Novak 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License version 2 00015 * as published by the Free Software Foundation. 00016 * 00017 * LORENE is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with LORENE; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 char map_af_poisson_angu_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_af_poisson_angu.C,v 1.3 2005/04/04 21:31:31 e_gourgoulhon Exp $" ; 00029 00030 /* 00031 * $Id: map_af_poisson_angu.C,v 1.3 2005/04/04 21:31:31 e_gourgoulhon Exp $ 00032 * $Log: map_af_poisson_angu.C,v $ 00033 * Revision 1.3 2005/04/04 21:31:31 e_gourgoulhon 00034 * Added argument lambda to method poisson_angu 00035 * to deal with the generalized angular Poisson equation: 00036 * Lap_ang u + lambda u = source. 00037 * 00038 * Revision 1.2 2003/10/16 08:49:23 j_novak 00039 * Added a flag to decide wether the output is in the Ylm or in the standard base. 00040 * 00041 * Revision 1.1 2003/10/15 21:11:26 e_gourgoulhon 00042 * Added method poisson_angu. 00043 * 00044 * 00045 * 00046 * $Header: /cvsroot/Lorene/C++/Source/Map/map_af_poisson_angu.C,v 1.3 2005/04/04 21:31:31 e_gourgoulhon Exp $ 00047 * 00048 */ 00049 00050 // Lorene headers 00051 #include "tensor.h" 00052 #include "param.h" 00053 00054 void Map_af::poisson_angu(const Scalar& source, Param& par, Scalar& uu, 00055 double lambda) const { 00056 00057 assert(source.get_etat() != ETATNONDEF) ; 00058 00059 assert(&(source.get_mp()) == this ) ; 00060 assert(&(uu.get_mp()) == this ) ; 00061 00062 // Spherical harmonic expansion of the source 00063 // ------------------------------------------ 00064 00065 const Valeur& sourva = source.get_spectral_va() ; 00066 00067 if (sourva.get_etat() == ETATZERO) { 00068 uu.set_etat_zero() ; 00069 return ; 00070 } 00071 00072 // Spectral coefficients of the source 00073 assert(sourva.get_etat() == ETATQCQ) ; 00074 sourva.coef() ; 00075 00076 Valeur resu(mg) ; 00077 resu = *(sourva.c_cf) ; // copy of the coefficients of the source 00078 00079 resu.ylm() ; // spherical harmonic transform 00080 00081 // Call to the Mtbl_cf version 00082 // --------------------------- 00083 (resu.c_cf)->poisson_angu(lambda) ; 00084 00085 if (par.get_n_int() == 0) resu.ylm_i() ; // Back to standard bases 00086 //in the case of no flag present 00087 // in the Param 00088 00089 // Final result returned as a Scalar 00090 // --------------------------------- 00091 00092 uu = resu ; 00093 00094 uu.set_dzpuis( source.get_dzpuis() ) ; // dzpuis unchanged 00095 } 00096
1.4.6