LORENE
cmp_pde.C
1 /*
2  * Methods of the class Cmp for various partial differential equations
3  */
4 
5 /*
6  * Copyright (c) 1999-2001 Eric Gourgoulhon
7  * Copyright (c) 1999-2001 Philippe Grandclement
8  * Copyright (c) 2000-2001 Jerome Novak
9  *
10  * This file is part of LORENE.
11  *
12  * LORENE is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * LORENE is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with LORENE; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  */
27 
28 
29 
30 
31 /*
32  * $Id: cmp_pde.C,v 1.6 2016/12/05 16:17:49 j_novak Exp $
33  * $Log: cmp_pde.C,v $
34  * Revision 1.6 2016/12/05 16:17:49 j_novak
35  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36  *
37  * Revision 1.5 2014/10/13 08:52:47 j_novak
38  * Lorene classes and functions now belong to the namespace Lorene.
39  *
40  * Revision 1.4 2005/08/30 08:35:12 p_grandclement
41  * Addition of the Tau version of the vectorial Poisson equation for the Tensors
42  *
43  * Revision 1.3 2004/03/01 09:54:59 j_novak
44  * Suppression of the Cmp version of avance_dalembert (now only with Scalar's)
45  *
46  * Revision 1.2 2002/01/03 15:30:27 j_novak
47  * Some comments modified.
48  *
49  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
50  * LORENE
51  *
52  * Revision 1.8 2001/10/16 09:59:00 novak
53  * deletion of source(t=jm1) from the argument list of d'Alembert solvers
54  *
55  * Revision 1.7 2001/07/19 14:04:07 novak
56  * new argument list for Cmp::avance_dalembert
57  *
58  * Revision 1.6 2000/12/04 15:07:55 novak
59  * *** empty log message ***
60  *
61  * Revision 1.5 2000/10/19 14:16:43 novak
62  * Ajout de Cmp::avance_dalembert (etat experimental)
63  *
64  * Revision 1.4 1999/12/21 14:47:30 eric
65  * *** empty log message ***
66  *
67  * Revision 1.3 1999/12/21 13:04:00 eric
68  * Changement de prototype de la routine poisson avec Param& : la solution est
69  * desormais passee en argument (et non plus en valeur de retour)
70  * pour permettre l'initialisation de methodes de resolution iteratives.
71  *
72  * Revision 1.2 1999/12/21 10:07:25 eric
73  * Il y a desormais deux versions de poisson: une sans Param et une
74  * avec Param.
75  *
76  * Revision 1.1 1999/12/02 14:30:13 eric
77  * Initial revision
78  *
79  *
80  * $Header: /cvsroot/Lorene/C++/Source/Cmp/cmp_pde.C,v 1.6 2016/12/05 16:17:49 j_novak Exp $
81  *
82  */
83 
84 // Header Lorene:
85 #include "map.h"
86 #include "cmp.h"
87 #include "param.h"
88 
89  //-----------------------------------//
90  // Scalar Poisson equation //
91  //-----------------------------------//
92 
93 // Version without parameters
94 // --------------------------
95 
96 namespace Lorene {
97 Cmp Cmp::poisson() const {
98 
99  Param bidon ;
100  Cmp resu(*mp) ;
101 
102  mp->poisson(*this, bidon, resu) ;
103 
104  return resu ;
105 }
106 
107 // Version with parameters
108 // -----------------------
109 
110 void Cmp::poisson(Param& par, Cmp& uu) const {
111 
112  mp->poisson(*this, par, uu) ;
113 
114 }
115 
116  //--------------------------------------------------//
117  // Scalar Poisson equation with a Tau method //
118  //--------------------------------------------------//
119 
120 // Version without parameters
121 // --------------------------
122 
124 
125  Param bidon ;
126  Cmp resu(*mp) ;
127 
128  mp->poisson_tau(*this, bidon, resu) ;
129 
130  return resu ;
131 }
132 
133 // Version with parameters
134 // -----------------------
135 
136 void Cmp::poisson_tau(Param& par, Cmp& uu) const {
137 
138  mp->poisson_tau(*this, par, uu) ;
139 
140 }
141 
142 }
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:446
Lorene prototypes.
Definition: app_hor.h:67
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equationwith a Tau method.
Cmp poisson_tau() const
Same as Poisson with a Tau method.
Definition: cmp_pde.C:123
Parameter storage.
Definition: param.h:125
Cmp poisson() const
Solves the scalar Poisson equation with *this as a source.
Definition: cmp_pde.C:97
const Map * mp
Reference mapping.
Definition: cmp.h:451
virtual void poisson(const Cmp &source, Param &par, Cmp &uu) const =0
Computes the solution of a scalar Poisson equation.