LORENE
map_poisson_vect.C
1 /*
2  * Copyright (c) 2000-2001 Philippe Grandclement
3  *
4  * This file is part of LORENE.
5  *
6  * LORENE is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * LORENE is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with LORENE; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */
21 
22 
23 
24 
25 /*
26  * $Id: map_poisson_vect.C,v 1.6 2016/12/05 16:17:58 j_novak Exp $
27  * $Log: map_poisson_vect.C,v $
28  * Revision 1.6 2016/12/05 16:17:58 j_novak
29  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
30  *
31  * Revision 1.5 2014/10/13 08:53:06 j_novak
32  * Lorene classes and functions now belong to the namespace Lorene.
33  *
34  * Revision 1.4 2003/12/19 16:21:43 j_novak
35  * Shadow hunt
36  *
37  * Revision 1.3 2002/07/09 16:46:23 p_grandclement
38  * The Param in the case of an affine mapping is now 0x0 and not deleted
39  * (I wonder why it was working before)
40  *
41  * Revision 1.2 2002/05/07 07:10:45 e_gourgoulhon
42  * Compatibilty with xlC compiler on IBM SP2:
43  * suppressed the parenthesis around argument of instruction new:
44  * e.g. aa = new (Tbl*[nzone]) ---> aa = new Tbl*[nzone]
45  * result = new (Param) ---> result = new Param
46  *
47  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
48  * LORENE
49  *
50  * Revision 2.3 2000/03/07 16:53:51 eric
51  * niter est desormais passe en parametres.
52  *
53  * Revision 2.2 2000/02/15 10:25:49 phil
54  * suppression des fonctions poisson_vect et poisson_vect_oohara
55  *
56  * Revision 2.1 2000/02/09 10:01:46 phil
57  * ajout version oohara
58  *
59  * Revision 2.0 2000/01/21 12:59:10 phil
60  * *** empty log message ***
61  *
62  *
63  * $Header: /cvsroot/Lorene/C++/Source/Map/map_poisson_vect.C,v 1.6 2016/12/05 16:17:58 j_novak Exp $
64  *
65  */
66 
67 
68 #include "map.h"
69 #include "tenseur.h"
70 #include "param.h"
71 
72 namespace Lorene {
74  return 0x0 ;
75 }
76 
77 
79  assert ((i>=0) && (i<4)) ;
80 
81  Param* result ;
82  result = new Param ;
83  result->add_int(para.get_int()) ; //nbre max iterations
84  result->add_double(para.get_double(0), 0) ; // relaxation
85  result->add_double(para.get_double(1), 1) ; // precision
86 
87  if (i!=3)
88  result->add_cmp_mod(para.get_tenseur_mod().set(i)) ; //source au pas precedent.
89  else
90  result->add_cmp_mod(para.get_cmp_mod()) ; //la scalaire...
91 
92 
93  result->add_int_mod(para.get_int_mod()) ;
94  return result ;
95 }
96 }
Tenseur & get_tenseur_mod(int position=0) const
Returns the reference of a modifiable Tenseur stored in the list.
Definition: param.C:1190
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition: param.C:249
Lorene prototypes.
Definition: app_hor.h:67
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Definition: param.C:1052
virtual Param * donne_para_poisson_vect(Param &para, int i) const
Internal function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara ...
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:840
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
Definition: param.C:295
Parameter storage.
Definition: param.h:125
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Definition: param.C:433
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition: param.C:318
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
Definition: param.C:364
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
Definition: param.C:1007
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition: param.C:388
virtual Param * donne_para_poisson_vect(Param &par, int i) const
Internal function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara ...