00001 /* 00002 * Method of the class Map_af for the resolution of the scalar pseudo_1d 00003 * equation 00004 */ 00005 00006 /* 00007 * Copyright (c) 2004 Philippe Grandclement 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_af_elliptic_pseudo_1d_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_af_elliptic_pseudo_1d.C,v 1.1 2004/08/24 09:14:42 p_grandclement Exp $" ; 00029 00030 /* 00031 * $Id: map_af_elliptic_pseudo_1d.C,v 1.1 2004/08/24 09:14:42 p_grandclement Exp $ 00032 * $Log: map_af_elliptic_pseudo_1d.C,v $ 00033 * Revision 1.1 2004/08/24 09:14:42 p_grandclement 00034 * Addition of some new operators, like Poisson in 2d... It now requieres the 00035 * GSL library to work. 00036 * 00037 * Also, the way a variable change is stored by a Param_elliptic is changed and 00038 * no longer uses Change_var but rather 2 Scalars. The codes using that feature 00039 * will requiere some modification. (It should concern only the ones about monopoles) 00040 * 00041 * 00042 * $Header: /cvsroot/Lorene/C++/Source/Map/map_af_elliptic_pseudo_1d.C,v 1.1 2004/08/24 09:14:42 p_grandclement Exp $ 00043 * 00044 */ 00045 00046 // Header Lorene: 00047 #include "valeur.h" 00048 #include "map.h" 00049 #include "scalar.h" 00050 #include "param_elliptic.h" 00051 00052 //***************************************************************************** 00053 00054 void Map_af::sol_elliptic_pseudo_1d (Param_elliptic& ope_var, 00055 const Scalar& source, Scalar& pot) const { 00056 00057 assert(source.get_etat() != ETATNONDEF) ; 00058 assert(source.get_mp().get_mg() == mg) ; 00059 assert(pot.get_mp().get_mg() == mg) ; 00060 00061 assert( source.check_dzpuis(2)) ; 00062 00063 // Spherical harmonic expansion of the source 00064 // ------------------------------------------ 00065 00066 const Valeur& sourva = source.get_spectral_va() ; 00067 00068 if (sourva.get_etat() == ETATZERO) { 00069 pot.set_etat_zero() ; 00070 return ; 00071 } 00072 00073 // Spectral coefficients of the source 00074 assert(sourva.get_etat() == ETATQCQ) ; 00075 00076 Valeur rho(sourva.get_mg()) ; 00077 sourva.coef() ; 00078 rho = *(sourva.c_cf) ; // copy of the coefficients of the source 00079 rho.val_propre_1d() ; 00080 00081 // On calcule les coefs radiaux de F et G 00082 ope_var.var_F.set_spectral_va().coef() ; 00083 ope_var.var_F.set_spectral_va().val_propre_1d() ; 00084 ope_var.var_G.set_spectral_va().coef() ; 00085 00086 00087 // Call to the Mtbl_cf version 00088 // --------------------------- 00089 Mtbl_cf resu = elliptic_solver (ope_var, *(rho.c_cf)) ; 00090 00091 pot.set_etat_zero() ; 00092 pot.set_etat_qcq() ; 00093 pot.set_spectral_va() = resu ; 00094 pot.set_spectral_va().val_propre_1d_i() ; 00095 pot.set_dzpuis(0) ; 00096 00097 } 00098 00099
1.4.6