scalar_pde_frontiere.C

00001 /*
00002  * Methods Scalar::poisson_*
00003  */
00004 
00005 /*
00006  *   Copyright (c) 2003 Eric Gourgoulhon & Jerome Novak
00007  *
00008  *   Copyright (c) 2000-2001 Philippe Grandclement (for preceding Cmp version)
00009  *
00010  *   This file is part of LORENE.
00011  *
00012  *   LORENE is free software; you can redistribute it and/or modify
00013  *   it under the terms of the GNU General Public License as published by
00014  *   the Free Software Foundation; either version 2 of the License, or
00015  *   (at your option) any later version.
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 
00029 char scalar_pde_frontiere_C[] = "$Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_pde_frontiere.C,v 1.5 2007/06/21 20:01:32 k_taniguchi Exp $" ;
00030 
00031 /*
00032  * $Id: scalar_pde_frontiere.C,v 1.5 2007/06/21 20:01:32 k_taniguchi Exp $
00033  * $Log: scalar_pde_frontiere.C,v $
00034  * Revision 1.5  2007/06/21 20:01:32  k_taniguchi
00035  * Modification of the method to convert Scalar to Cmp.
00036  *
00037  * Revision 1.4  2004/11/23 12:46:57  f_limousin
00038  * Intoduce function poisson_dir_neu(...) to solve a scalar poisson
00039  * equation with a mixed boundary condition (Dirichlet + Neumann).
00040  *
00041  * Revision 1.3  2003/10/03 15:58:52  j_novak
00042  * Cleaning of some headers
00043  *
00044  * Revision 1.2  2003/09/25 08:57:27  e_gourgoulhon
00045  * modif comments
00046  *
00047  * Revision 1.1  2003/09/25 08:06:56  e_gourgoulhon
00048  * First versions (use Cmp as intermediate quantities).
00049  *
00050  *
00051  * $Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_pde_frontiere.C,v 1.5 2007/06/21 20:01:32 k_taniguchi Exp $
00052  *
00053  */
00054 
00055 // Header Lorene:
00056 #include "tensor.h"
00057 #include "cmp.h"
00058 
00059 
00060 Scalar Scalar::poisson_dirichlet(const Valeur& limite, int num_front) const {
00061     
00062     //    Cmp csource(*this) ; 
00063     Cmp csource(mp) ;
00064     csource = (*this).va ;
00065     csource.set_dzpuis((*this).get_dzpuis()) ;
00066     (csource.va).set_base( ((*this).va).get_base() ) ;
00067 
00068     Cmp cresu(mp) ;
00069     
00070     mp->poisson_frontiere(csource, limite, 1, num_front, cresu) ; 
00071     
00072     Scalar resu(cresu) ; 
00073     return resu ;          
00074 }
00075 
00076 Scalar Scalar::poisson_dir_neu(const Valeur& limite, int num_front, 
00077             double fact_dir, double fact_neu) const {
00078     
00079     //    Cmp csource(*this) ; 
00080     Cmp csource(mp) ;
00081     csource = (*this).va ;
00082     csource.set_dzpuis((*this).get_dzpuis()) ;
00083     (csource.va).set_base( ((*this).va).get_base() ) ;
00084 
00085     Cmp cresu(mp) ;
00086     
00087     mp->poisson_frontiere(csource, limite, 3, num_front, cresu, fact_dir,
00088               fact_neu) ; 
00089     
00090     Scalar resu(cresu) ; 
00091     return resu ;          
00092 }
00093 
00094 Scalar Scalar::poisson_neumann(const Valeur& limite, int num_front) const {
00095     
00096     //    Cmp csource(*this) ; 
00097     Cmp csource(mp) ;
00098     csource = (*this).va ;
00099     csource.set_dzpuis((*this).get_dzpuis()) ;
00100     (csource.va).set_base( ((*this).va).get_base() ) ;
00101 
00102     Cmp cresu(mp) ;
00103 
00104     mp->poisson_frontiere (csource, limite, 2, num_front, cresu) ; 
00105 
00106     Scalar resu(cresu) ; 
00107     return resu ;    
00108 }
00109 
00110 
00111 Scalar Scalar::poisson_frontiere_double (const Valeur& lim_func, 
00112              const Valeur& lim_der, int num_zone) const {
00113     
00114     Cmp csource(*this) ; 
00115     Cmp cresu(mp) ;
00116 
00117     mp->poisson_frontiere_double(csource, lim_func, lim_der, num_zone, cresu) ; 
00118 
00119     Scalar resu(cresu) ; 
00120     return resu ;    
00121 }       
00122 
00123 
00124 

Generated on Tue Feb 7 01:35:19 2012 for LORENE by  doxygen 1.4.6