| 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 |
char map_poisson_vect_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_poisson_vect.C,v 1.5 2014/10/13 08:53:06 j_novak Exp $" ; |
| 24 |
|
| 25 |
/* |
| 26 |
* $Id: map_poisson_vect.C,v 1.5 2014/10/13 08:53:06 j_novak Exp $ |
| 27 |
* $Log: map_poisson_vect.C,v $ |
| 28 |
* Revision 1.5 2014/10/13 08:53:06 j_novak |
| 29 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 30 |
* |
| 31 |
* Revision 1.4 2003/12/19 16:21:43 j_novak |
| 32 |
* Shadow hunt |
| 33 |
* |
| 34 |
* Revision 1.3 2002/07/09 16:46:23 p_grandclement |
| 35 |
* The Param in the case of an affine mapping is now 0x0 and not deleted |
| 36 |
* (I wonder why it was working before) |
| 37 |
* |
| 38 |
* Revision 1.2 2002/05/07 07:10:45 e_gourgoulhon |
| 39 |
* Compatibilty with xlC compiler on IBM SP2: |
| 40 |
* suppressed the parenthesis around argument of instruction new: |
| 41 |
* e.g. aa = new (Tbl*[nzone]) ---> aa = new Tbl*[nzone] |
| 42 |
* result = new (Param) ---> result = new Param |
| 43 |
* |
| 44 |
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon |
| 45 |
* LORENE |
| 46 |
* |
| 47 |
* Revision 2.3 2000/03/07 16:53:51 eric |
| 48 |
* niter est desormais passe en parametres. |
| 49 |
* |
| 50 |
* Revision 2.2 2000/02/15 10:25:49 phil |
| 51 |
* suppression des fonctions poisson_vect et poisson_vect_oohara |
| 52 |
* |
| 53 |
* Revision 2.1 2000/02/09 10:01:46 phil |
| 54 |
* ajout version oohara |
| 55 |
* |
| 56 |
* Revision 2.0 2000/01/21 12:59:10 phil |
| 57 |
* *** empty log message *** |
| 58 |
* |
| 59 |
* |
| 60 |
* $Header: /cvsroot/Lorene/C++/Source/Map/map_poisson_vect.C,v 1.5 2014/10/13 08:53:06 j_novak Exp $ |
| 61 |
* |
| 62 |
*/ |
| 63 |
|
| 64 |
|
| 65 |
#include "map.h" |
| 66 |
#include "tenseur.h" |
| 67 |
#include "param.h" |
| 68 |
|
| 69 |
namespace Lorene { |
| 70 |
Param* Map_af::donne_para_poisson_vect(Param&, int) const { |
| 71 |
return 0x0 ; |
| 72 |
} |
| 73 |
|
| 74 |
|
| 75 |
Param* Map_et::donne_para_poisson_vect(Param& para, int i) const { |
| 76 |
assert ((i>=0) && (i<4)) ; |
| 77 |
|
| 78 |
Param* result ; |
| 79 |
result = new Param ; |
| 80 |
result->add_int(para.get_int()) ; //nbre max iterations |
| 81 |
result->add_double(para.get_double(0), 0) ; // relaxation |
| 82 |
result->add_double(para.get_double(1), 1) ; // precision |
| 83 |
|
| 84 |
if (i!=3) |
| 85 |
result->add_cmp_mod(para.get_tenseur_mod().set(i)) ; //source au pas precedent. |
| 86 |
else |
| 87 |
result->add_cmp_mod(para.get_cmp_mod()) ; //la scalaire... |
| 88 |
|
| 89 |
|
| 90 |
result->add_int_mod(para.get_int_mod()) ; |
| 91 |
return result ; |
| 92 |
} |
| 93 |
} |