param_elliptic.h
/*
* Definition of Lorene class Param_elliptic
*
*/
/*
* Copyright (c) 2003 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 version 2
* as published by the Free Software Foundation.
*
* 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
*
*/
#ifndef __PARAM_ELLIPTIC_H_
#define __PARAM_ELLIPTIC_H_
/*
* $Id: param_elliptic.h,v 1.21 2014/10/13 08:52:36 j_novak Exp $
* $Log: param_elliptic.h,v $
* Revision 1.21 2014/10/13 08:52:36 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.20 2007/05/06 10:48:08 p_grandclement
* Modification of a few operators for the vorton project
*
* Revision 1.19 2007/04/24 09:04:11 p_grandclement
* Addition of an operator for the vortons
*
* Revision 1.18 2007/01/16 15:05:59 n_vasset
* New constructor (taking a Scalar in mono-domain angular grid for
* boundary) for function sol_elliptic_boundary
*
* Revision 1.17 2005/11/30 11:09:03 p_grandclement
* Changes for the Bin_ns_bh project
*
* Revision 1.16 2005/08/26 14:02:38 p_grandclement
* Modification of the elliptic solver that matches with an oscillatory exterior solution
* small correction in Poisson tau also...
*
* Revision 1.15 2005/06/09 07:56:25 f_limousin
* Implement a new function sol_elliptic_boundary() and
* Vector::poisson_boundary(...) which solve the vectorial poisson
* equation (method 6) with an inner boundary condition.
*
* Revision 1.14 2005/02/15 15:43:16 j_novak
* First version of the block inversion for the vector Poisson equation (method 6).
*
* Revision 1.13 2004/12/23 16:30:14 j_novak
* New files and class for the solution of the rr component of the tensor Poisson
* equation.
*
* Revision 1.12 2004/08/24 09:14:40 p_grandclement
* Addition of some new operators, like Poisson in 2d... It now requieres the
* GSL library to work.
*
* Also, the way a variable change is stored by a Param_elliptic is changed and
* no longer uses Change_var but rather 2 Scalars. The codes using that feature
* will requiere some modification. (It should concern only the ones about monopoles)
*
* Revision 1.11 2004/06/22 08:49:57 p_grandclement
* Addition of everything needed for using the logarithmic mapping
*
* Revision 1.10 2004/06/14 15:23:07 j_novak
* Modif. comments.
*
* Revision 1.9 2004/06/14 15:07:10 j_novak
* New methods for the construction of the elliptic operator appearing in
* the vector Poisson equation (acting on eta).
*
* Revision 1.8 2004/05/14 08:51:00 p_grandclement
* *** empty log message ***
*
* Revision 1.7 2004/05/10 15:28:21 j_novak
* First version of functions for the solution of the r-component of the
* vector Poisson equation.
*
* Revision 1.6 2004/03/23 14:54:45 j_novak
* More documentation
*
* Revision 1.5 2004/03/17 15:58:47 p_grandclement
* Slight modification of sol_elliptic_no_zec
*
* Revision 1.4 2004/03/05 09:18:48 p_grandclement
* Addition of operator sec_order_r2
*
* Revision 1.3 2004/02/11 09:47:44 p_grandclement
* Addition of a new elliptic solver, matching with the homogeneous solution
* at the outer shell and not solving in the external domain (more details
* coming soon ; check your local Lorene dealer...)
*
* Revision 1.2 2004/01/28 16:46:22 p_grandclement
* Addition of the sol_elliptic_fixe_der_zero stuff
*
* Revision 1.1 2003/12/11 14:57:00 p_grandclement
* I had forgotten the .h (sorry folks...)
*
* Revision 1.2 2001/12/11 06:44:41 e_gourgoulhon
*
* $Header: /cvsroot/Lorene/C++/Include/param_elliptic.h,v 1.21 2014/10/13 08:52:36 j_novak Exp $
*
*/
#include "map.h"
#include "ope_elementary.h"
#include "scalar.h"
#define MAP_AFF 0
#define MAP_LOG 1
namespace Lorene {
class Param_elliptic {
protected:
int type_map ;
const Map_af* mp_af ;
const Map_log* mp_log ;
Ope_elementary** operateurs ;
Scalar var_F ;
Scalar var_G ;
mutable Itbl done_F ;
mutable Itbl done_G ;
mutable Tbl val_F_plus ;
mutable Tbl val_F_minus ;
mutable Tbl val_dF_plus ;
mutable Tbl val_dF_minus ;
mutable Tbl val_G_plus ;
mutable Tbl val_G_minus ;
mutable Tbl val_dG_plus ;
mutable Tbl val_dG_minus ;
private:
void compute_val_F(int, int, int) const ;
void compute_val_G(int) const ;
public:
Param_elliptic (const Scalar&) ;
~Param_elliptic() ;
const Map_radial& get_mp() const ;
double get_alpha (int) const ;
double get_beta (int) const ;
int get_type (int) const ;
public:
void set_helmholtz_minus (int zone, double mas, Scalar& so) ;
void set_poisson_pseudo_1d (Scalar& so) ;
void set_helmholtz_minus_pseudo_1d (int zone, double mas, Scalar& so) ;
void set_helmholtz_plus (int zone, double mas, Scalar& so) ;
void set_poisson_2d (const Scalar &, bool indic = false) ;
void set_helmholtz_minus_2d (int zone, double mas, const Scalar&) ;
void set_sec_order_r2 (int zone, double a, double b, double c) ;
void set_sec_order (int zone, double a, double b, double c) ;
void set_ope_vorton (int zone, Scalar& so) ;
void set_poisson_vect_r(int zone, bool only_l_zero = false) ;
void set_poisson_vect_eta(int zone) ;
void set_poisson_tens_rr(int zone) ;
void inc_l_quant (int zone) ;
void set_variable_F (const Scalar&) ;
void set_variable_G (const Scalar&) ;
double F_plus (int zone, int k, int j) const ;
double F_minus (int zone, int k, int j) const ;
double dF_plus (int zone, int k, int j) const ;
double dF_minus (int zone, int k, int j) const ;
double G_plus (int zone) const ;
double G_minus (int zone) const ;
double dG_plus (int zone) const ;
double dG_minus (int zone) const ;
// A lot of friend functions... Possiblement pas toutes utiles...
friend Mtbl_cf elliptic_solver (const Param_elliptic&, const Mtbl_cf&) ;
friend Mtbl_cf elliptic_solver_boundary (const Param_elliptic&, const Mtbl_cf&, const Mtbl_cf& bound, double fact_dir, double fact_neu ) ;
friend Mtbl_cf elliptic_solver_no_zec
(const Param_elliptic&, const Mtbl_cf&, double) ;
friend Mtbl_cf elliptic_solver_only_zec
(const Param_elliptic&, const Mtbl_cf&, double) ;
friend Mtbl_cf elliptic_solver_sin_zec
(const Param_elliptic&, const Mtbl_cf&, double*, double*) ;
friend Mtbl_cf elliptic_solver_fixe_der_zero
(double, const Param_elliptic&, const Mtbl_cf&) ;
friend void Map_af::sol_elliptic(Param_elliptic&, const Scalar&, Scalar&) const ;
friend void Map_af::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Mtbl_cf& ,
double , double ) const ;
friend void Map_af::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Scalar& ,
double , double ) const ;
friend void Map_af::sol_elliptic_no_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
friend void Map_af::sol_elliptic_only_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
friend void Map_af::sol_elliptic_sin_zec(Param_elliptic&, const Scalar&, Scalar&, double*, double*) const ;
friend void Map_af::sol_elliptic_fixe_der_zero(double, Param_elliptic&, const Scalar&, Scalar&) const ;
friend void Map_af::sol_elliptic_2d(Param_elliptic&, const Scalar&, Scalar&) const ;
friend void Map_af::sol_elliptic_pseudo_1d(Param_elliptic&, const Scalar&, Scalar&) const ;
friend void Map_log::sol_elliptic(Param_elliptic&, const Scalar&, Scalar&) const ;
friend void Map_log::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Mtbl_cf&,
double, double) const ;
friend void Map_log::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Scalar&,
double, double) const ;
friend void Map_log::sol_elliptic_no_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
} ;
}
#endif
Lorene::Itbl
Basic integer array class.
Definition itbl.h:122
Lorene::Map_af
Affine radial mapping.
Definition map.h:2027
Lorene::Map_af::sol_elliptic_boundary
void sol_elliptic_boundary(Param_elliptic &params, const Scalar &so, Scalar &uu, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
General elliptic solver including inner boundary conditions.
Definition map_af_elliptic.C:159
Lorene::Map_af::sol_elliptic
void sol_elliptic(Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver.
Definition map_af_elliptic.C:100
Lorene::Map_af::sol_elliptic_sin_zec
void sol_elliptic_sin_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double *coefs, double *) const
General elliptic solver.
Definition map_af_elliptic.C:426
Lorene::Map_af::sol_elliptic_fixe_der_zero
void sol_elliptic_fixe_der_zero(double val, Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver fixing the derivative at the origin and relaxing the continuity of the first ...
Definition map_af_elliptic.C:483
Lorene::Map_af::sol_elliptic_2d
void sol_elliptic_2d(Param_elliptic &, const Scalar &, Scalar &) const
General elliptic solver in a 2D case.
Definition map_af_elliptic_2d.C:58
Lorene::Map_af::sol_elliptic_pseudo_1d
void sol_elliptic_pseudo_1d(Param_elliptic &, const Scalar &, Scalar &) const
General elliptic solver in a pseudo 1d case.
Definition map_af_elliptic_pseudo_1d.C:59
Lorene::Map_af::sol_elliptic_only_zec
void sol_elliptic_only_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
Definition map_af_elliptic.C:368
Lorene::Map_af::sol_elliptic_no_zec
void sol_elliptic_no_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double val) const
General elliptic solver.
Definition map_af_elliptic.C:312
Lorene::Map_log
Logarithmic radial mapping.
Definition map.h:3583
Lorene::Map_log::sol_elliptic_boundary
void sol_elliptic_boundary(Param_elliptic &params, const Scalar &so, Scalar &uu, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
General elliptic solver including inner boundary conditions.
Definition map_log_elliptic.C:132
Lorene::Map_log::sol_elliptic
void sol_elliptic(Param_elliptic &params, const Scalar &so, Scalar &uu) const
General elliptic solver.
Definition map_log_elliptic.C:75
Lorene::Map_log::sol_elliptic_no_zec
void sol_elliptic_no_zec(Param_elliptic &params, const Scalar &so, Scalar &uu, double) const
General elliptic solver.
Definition map_log_elliptic.C:275
Lorene::Map_radial
Base class for pure radial mappings.
Definition map.h:1536
Lorene::Mtbl_cf
Coefficients storage for the multi-domain spectral method.
Definition mtbl_cf.h:186
Lorene::Ope_elementary
Basic class for elementary elliptic operators.
Definition ope_elementary.h:102
Lorene::Param_elliptic::var_G
Scalar var_G
Multiplicative variable change that must be sphericaly symetric !
Definition param_elliptic.h:145
Lorene::Param_elliptic::done_F
Itbl done_F
Stores what has been computed for F.
Definition param_elliptic.h:147
Lorene::Param_elliptic::G_plus
double G_plus(int zone) const
Returns the value of G, for a given angular point, at the outer boundary of the domain zone ;.
Definition param_elliptic_val_lim.C:88
Lorene::Param_elliptic::compute_val_F
void compute_val_F(int, int, int) const
Computes the various values of F.
Definition param_elliptic_val_lim.C:121
Lorene::Param_elliptic::val_dG_minus
Tbl val_dG_minus
Values of the derivative of G at the inner boundaries of the various domains.
Definition param_elliptic.h:156
Lorene::Param_elliptic::set_sec_order_r2
void set_sec_order_r2(int zone, double a, double b, double c)
Set the operator to in one domain (only in the shells).
Definition param_elliptic.C:602
Lorene::Param_elliptic::inc_l_quant
void inc_l_quant(int zone)
Increases the quantum number l in the domain zone .
Definition param_elliptic.C:323
Lorene::Param_elliptic::set_helmholtz_minus
void set_helmholtz_minus(int zone, double mas, Scalar &so)
Set the operator to in one domain (not in the nucleus).
Definition param_elliptic.C:343
Lorene::Param_elliptic::dG_minus
double dG_minus(int zone) const
Returns the value of the radial derivative of G, for a given angular point, at the inner boundary of ...
Definition param_elliptic_val_lim.C:112
Lorene::Param_elliptic::val_dF_minus
Tbl val_dF_minus
Values of the derivative of F at the inner boundaries of the various domains.
Definition param_elliptic.h:152
Lorene::Param_elliptic::dG_plus
double dG_plus(int zone) const
Returns the value of the radial derivative of G, for a given angular point, at the outer boundary of ...
Definition param_elliptic_val_lim.C:104
Lorene::Param_elliptic::set_poisson_vect_eta
void set_poisson_vect_eta(int zone)
Sets the operator to be a regular elliptic operator to solve for the component of the vector Poisson...
Definition param_elliptic.C:533
Lorene::Param_elliptic::mp_log
const Map_log * mp_log
The mapping if log type.
Definition param_elliptic.h:140
Lorene::Param_elliptic::Param_elliptic
Param_elliptic(const Scalar &)
Standard constructor from a Scalar.
Definition param_elliptic.C:183
Lorene::Param_elliptic::F_minus
double F_minus(int zone, int k, int j) const
Returns the value of F, for a given angular point, at the inner boundary of the domain zone ;.
Definition param_elliptic_val_lim.C:63
Lorene::Param_elliptic::get_mp
const Map_radial & get_mp() const
Returns the mapping.
Definition param_elliptic.C:118
Lorene::Param_elliptic::val_F_minus
Tbl val_F_minus
Values of F at the inner boundaries of the various domains.
Definition param_elliptic.h:150
Lorene::Param_elliptic::val_F_plus
Tbl val_F_plus
Values of F at the outer boundaries of the various domains.
Definition param_elliptic.h:149
Lorene::Param_elliptic::F_plus
double F_plus(int zone, int k, int j) const
Returns the value of F, for a given angular point, at the outer boundary of the domain zone ;.
Definition param_elliptic_val_lim.C:55
Lorene::Param_elliptic::~Param_elliptic
~Param_elliptic()
Destructor.
Definition param_elliptic.C:310
Lorene::Param_elliptic::set_sec_order
void set_sec_order(int zone, double a, double b, double c)
Set the operator to in one domain (only in the shells).
Definition param_elliptic.C:669
Lorene::Param_elliptic::val_G_minus
Tbl val_G_minus
Values of G at the inner boundaries of the various domains.
Definition param_elliptic.h:154
Lorene::Param_elliptic::val_dG_plus
Tbl val_dG_plus
Values of the derivative of G at the outer boundaries of the various domains.
Definition param_elliptic.h:155
Lorene::Param_elliptic::set_poisson_pseudo_1d
void set_poisson_pseudo_1d(Scalar &so)
Set the operator to everywhere but in the compactified domain.
Definition param_elliptic_pseudo_1d.C:59
Lorene::Param_elliptic::set_helmholtz_minus_pseudo_1d
void set_helmholtz_minus_pseudo_1d(int zone, double mas, Scalar &so)
Set the operator to in one domain.
Definition param_elliptic_pseudo_1d.C:95
Lorene::Param_elliptic::operateurs
Ope_elementary ** operateurs
Array on the elementary operators.
Definition param_elliptic.h:142
Lorene::Param_elliptic::set_poisson_2d
void set_poisson_2d(const Scalar &, bool indic=false)
Set everything to do a 2d-Poisson, with or without l=0 (not put by default...).
Definition param_elliptic_2d.C:59
Lorene::Param_elliptic::dF_plus
double dF_plus(int zone, int k, int j) const
Returns the value of the radial derivative of F, for a given angular point, at the outer boundary of ...
Definition param_elliptic_val_lim.C:71
Lorene::Param_elliptic::dF_minus
double dF_minus(int zone, int k, int j) const
Returns the value of the radial derivative of F, for a given angular point, at the inner boundary of ...
Definition param_elliptic_val_lim.C:79
Lorene::Param_elliptic::set_poisson_vect_r
void set_poisson_vect_r(int zone, bool only_l_zero=false)
Sets the operator to in all domains, for ; and to in all domains otherwise.
Definition param_elliptic.C:487
Lorene::Param_elliptic::mp_af
const Map_af * mp_af
The mapping, if affine.
Definition param_elliptic.h:139
Lorene::Param_elliptic::set_poisson_tens_rr
void set_poisson_tens_rr(int zone)
Sets the operator to in all domains, for only.
Definition param_elliptic.C:560
Lorene::Param_elliptic::set_variable_F
void set_variable_F(const Scalar &)
Changes the variable function F.
Definition param_elliptic.C:774
Lorene::Param_elliptic::set_helmholtz_plus
void set_helmholtz_plus(int zone, double mas, Scalar &so)
Set the operator to in one domain (only in the shells).
Definition param_elliptic.C:411
Lorene::Param_elliptic::set_variable_G
void set_variable_G(const Scalar &)
Changes the variable function G.
Definition param_elliptic.C:783
Lorene::Param_elliptic::type_map
int type_map
Type of mapping either MAP_AFF or MAP_LOG.
Definition param_elliptic.h:138
Lorene::Param_elliptic::compute_val_G
void compute_val_G(int) const
Computes the various values of G.
Definition param_elliptic_val_lim.C:160
Lorene::Param_elliptic::val_dF_plus
Tbl val_dF_plus
Values of the derivative of F at the outer boundaries of the various domains.
Definition param_elliptic.h:151
Lorene::Param_elliptic::val_G_plus
Tbl val_G_plus
Values of G at the outer boundaries of the various domains.
Definition param_elliptic.h:153
Lorene::Param_elliptic::set_ope_vorton
void set_ope_vorton(int zone, Scalar &so)
Set the operator to in one domain (not implemented in the nucleus).
Definition param_elliptic.C:705
Lorene::Param_elliptic::G_minus
double G_minus(int zone) const
Returns the value of G, for a given angular point, at the inner boundary of the domain zone ;.
Definition param_elliptic_val_lim.C:96
Lorene::Param_elliptic::done_G
Itbl done_G
Stores what has been computed for G.
Definition param_elliptic.h:148
Lorene::Param_elliptic::set_helmholtz_minus_2d
void set_helmholtz_minus_2d(int zone, double mas, const Scalar &)
Set the 2D Helmholtz operator (with minus sign).
Definition param_elliptic_2d.C:100
Lorene::Param_elliptic::var_F
Scalar var_F
Additive variable change function.
Definition param_elliptic.h:144
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene
Lorene prototypes.
Definition app_hor.h:64