map_poisson_vect.C
/*
* Copyright (c) 2000-2001 Philippe Grandclement
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
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 $" ;
/*
* $Id: map_poisson_vect.C,v 1.5 2014/10/13 08:53:06 j_novak Exp $
* $Log: map_poisson_vect.C,v $
* Revision 1.5 2014/10/13 08:53:06 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.4 2003/12/19 16:21:43 j_novak
* Shadow hunt
*
* Revision 1.3 2002/07/09 16:46:23 p_grandclement
* The Param in the case of an affine mapping is now 0x0 and not deleted
* (I wonder why it was working before)
*
* Revision 1.2 2002/05/07 07:10:45 e_gourgoulhon
* Compatibilty with xlC compiler on IBM SP2:
* suppressed the parenthesis around argument of instruction new:
* e.g. aa = new (Tbl*[nzone]) ---> aa = new Tbl*[nzone]
* result = new (Param) ---> result = new Param
*
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
* LORENE
*
* Revision 2.3 2000/03/07 16:53:51 eric
* niter est desormais passe en parametres.
*
* Revision 2.2 2000/02/15 10:25:49 phil
* suppression des fonctions poisson_vect et poisson_vect_oohara
*
* Revision 2.1 2000/02/09 10:01:46 phil
* ajout version oohara
*
* Revision 2.0 2000/01/21 12:59:10 phil
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Source/Map/map_poisson_vect.C,v 1.5 2014/10/13 08:53:06 j_novak Exp $
*
*/
#include "map.h"
#include "tenseur.h"
#include "param.h"
namespace Lorene {
Param* Map_af::donne_para_poisson_vect(Param&, int) const {
return 0x0 ;
}
Param* Map_et::donne_para_poisson_vect(Param& para, int i) const {
assert ((i>=0) && (i<4)) ;
Param* result ;
result = new Param ;
result->add_int(para.get_int()) ; //nbre max iterations
result->add_double(para.get_double(0), 0) ; // relaxation
result->add_double(para.get_double(1), 1) ; // precision
if (i!=3)
result->add_cmp_mod(para.get_tenseur_mod().set(i)) ; //source au pas precedent.
else
result->add_cmp_mod(para.get_cmp_mod()) ; //la scalaire...
result->add_int_mod(para.get_int_mod()) ;
return result ;
}
}
Lorene::Map_af::donne_para_poisson_vect
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 .
Definition map_poisson_vect.C:70
Lorene::Map_et::donne_para_poisson_vect
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 .
Definition map_poisson_vect.C:75
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Param::add_double
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition param.C:315
Lorene::Param::get_cmp_mod
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Definition param.C:1049
Lorene::Param::get_int
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
Definition param.C:292
Lorene::Param::get_double
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
Definition param.C:361
Lorene::Param::add_cmp_mod
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
Definition param.C:1004
Lorene::Param::get_tenseur_mod
Tenseur & get_tenseur_mod(int position=0) const
Returns the reference of a modifiable Tenseur stored in the list.
Definition param.C:1187
Lorene::Param::add_int_mod
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition param.C:385
Lorene::Param::get_int_mod
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Definition param.C:430
Lorene::Param::add_int
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition param.C:246
Lorene::Tenseur::set
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition tenseur.C:824
Lorene
Lorene prototypes.
Definition app_hor.h:64