scalar.h
/*
* Definition of Lorene class Scalar
*
*/
/*
* Copyright (c) 2003-2004 Eric Gourgoulhon & Jerome Novak
*
* Copyright (c) 1999-2000 Jean-Alain Marck (for previous class Cmp)
* Copyright (c) 1999-2002 Eric Gourgoulhon (for previous class Cmp)
* Copyright (c) 1999-2001 Philippe Grandclement (for previous class Cmp)
* Copyright (c) 2000-2002 Jerome Novak (for previous class Cmp)
* Copyright (c) 2000-2001 Keisuke Taniguchi (for previous class Cmp)
*
* 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
*
*/
#ifndef __SCALAR_H_
#define __SCALAR_H_
/*
* $Id: scalar.h,v 1.94 2015/12/18 15:52:51 j_novak Exp $
* $Log: scalar.h,v $
* Revision 1.94 2015/12/18 15:52:51 j_novak
* New method is_nan() for class Scalar.
*
* Revision 1.93 2015/09/10 13:28:05 j_novak
* New methods for the class Hot_Eos
*
* Revision 1.92 2014/10/13 08:52:36 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.91 2013/06/05 15:06:10 j_novak
* Legendre bases are treated as standard bases, when the multi-grid
* (Mg3d) is built with BASE_LEG.
*
* Revision 1.90 2013/01/11 15:44:54 j_novak
* Addition of Legendre bases (part 2).
*
* Revision 1.89 2012/12/19 13:59:56 j_penner
* added a few lines to the documentation for scalar_match_tau function
*
* Revision 1.88 2012/01/17 15:05:46 j_penner
* *** empty log message ***
*
* Revision 1.87 2012/01/17 10:16:27 j_penner
* functions added: sarra_filter_r, sarra_filter_r_all_domains, Heaviside
*
* Revision 1.86 2011/04/08 13:13:09 e_gourgoulhon
* Changed the comment of function val_point to indicate specifically the
* division by r^dzpuis in the compactified external domain.
*
* Revision 1.85 2008/09/29 13:23:51 j_novak
* Implementation of the angular mapping associated with an affine
* mapping. Things must be improved to take into account the domain index.
*
* Revision 1.84 2008/09/22 19:08:01 j_novak
* New methods to deal with boundary conditions
*
* Revision 1.83 2008/05/24 15:05:22 j_novak
* New method Scalar::match_tau to match the output of an explicit time-marching scheme with the tau method.
*
* Revision 1.82 2007/12/21 16:06:16 j_novak
* Methods to filter Tensor, Vector and Sym_tensor objects.
*
* Revision 1.81 2007/10/31 10:33:11 j_novak
* Added exponential filters to smooth Gibbs-type phenomena.
*
* Revision 1.80 2007/06/21 19:56:36 k_taniguchi
* Introduction of another filtre_r.
*
* Revision 1.79 2007/05/06 10:48:08 p_grandclement
* Modification of a few operators for the vorton project
*
* Revision 1.78 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.77 2006/05/26 09:00:09 j_novak
* New members for multiplication or division by cos(theta).
*
* Revision 1.76 2005/11/30 13:48:06 e_gourgoulhon
* Replaced M_PI/2 by 1.57... in argument list of sol_elliptic_sin_zec
* (in order not to require the definition of M_PI).
*
* Revision 1.75 2005/11/30 11:09:03 p_grandclement
* Changes for the Bin_ns_bh project
*
* Revision 1.74 2005/11/17 15:29:46 e_gourgoulhon
* Added arithmetics with Mtbl.
*
* Revision 1.73 2005/10/25 08:56:34 p_grandclement
* addition of std_spectral_base in the case of odd functions near the origin
*
* Revision 1.72 2005/09/07 13:10:47 j_novak
* Added a filter setting to zero all mulitpoles in a given range.
*
* Revision 1.71 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.70 2005/08/25 12:14:07 p_grandclement
* Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
*
* Revision 1.69 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.68 2005/06/08 12:35:18 j_novak
* New method for solving divergence-like ODEs.
*
* Revision 1.67 2005/05/20 14:42:30 j_novak
* Added the method Scalar::get_spectral_base().
*
* Revision 1.66 2005/04/04 21:28:57 e_gourgoulhon
* Added argument lambda to method poisson_angu
* to deal with the generalized angular Poisson equation:
* Lap_ang u + lambda u = source.
*
* Revision 1.65 2004/12/14 09:09:39 f_limousin
* Modif. comments.
*
* Revision 1.64 2004/11/23 12:41:53 f_limousin
* Intoduce function poisson_dir_neu(...) to solve a scalar poisson
* equation with a mixed boundary condition (Dirichlet + Neumann).
*
* Revision 1.63 2004/10/11 15:09:00 j_novak
* The radial manipulation functions take Scalar as arguments, instead of Cmp.
* Added a conversion operator from Scalar to Cmp.
* The Cmp radial manipulation function make conversion to Scalar, call to the
* Map_radial version with a Scalar argument and back.
*
* Revision 1.62 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.61 2004/07/27 08:24:26 j_novak
* Modif. comments
*
* Revision 1.60 2004/07/26 16:02:21 j_novak
* Added a flag to specify whether the primitive should be zero either at r=0
* or at r going to infinity.
*
* Revision 1.59 2004/07/06 13:36:27 j_novak
* Added methods for desaliased product (operator |) only in r direction.
*
* Revision 1.58 2004/06/22 08:49:57 p_grandclement
* Addition of everything needed for using the logarithmic mapping
*
* Revision 1.57 2004/06/14 15:24:23 e_gourgoulhon
* Added method primr (radial primitive).
*
* Revision 1.56 2004/06/11 14:29:56 j_novak
* Scalar::multipole_spectrum() is now a const method.
*
* Revision 1.55 2004/05/24 14:07:31 e_gourgoulhon
* Method set_domain now includes a call to del_deriv() for safety.
*
* Revision 1.54 2004/05/07 11:26:10 f_limousin
* New method filtre_r(int*)
*
* Revision 1.53 2004/03/22 13:12:43 j_novak
* Modification of comments to use doxygen instead of doc++
*
* Revision 1.52 2004/03/17 15:58:47 p_grandclement
* Slight modification of sol_elliptic_no_zec
*
* Revision 1.51 2004/03/11 12:07:30 e_gourgoulhon
* Added method visu_section_anim.
*
* Revision 1.50 2004/03/08 15:45:38 j_novak
* Modif. comment
*
* Revision 1.49 2004/03/05 15:09:40 e_gourgoulhon
* Added method smooth_decay.
*
* Revision 1.48 2004/03/01 09:57:02 j_novak
* the wave equation is solved with Scalars. It now accepts a grid with a
* compactified external domain, which the solver ignores and where it copies
* the values of the field from one time-step to the next.
*
* Revision 1.47 2004/02/27 09:43:58 f_limousin
* New methods filtre_phi(int) and filtre_theta(int).
*
* Revision 1.46 2004/02/26 22:46:26 e_gourgoulhon
* Added methods derive_cov, derive_con and derive_lie.
*
* Revision 1.45 2004/02/21 17:03:49 e_gourgoulhon
* -- Method "point" renamed "val_grid_point".
* -- Method "set_point" renamed "set_grid_point".
*
* Revision 1.44 2004/02/19 22:07:35 e_gourgoulhon
* Added argument "comment" in method spectral_display.
*
* Revision 1.43 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.42 2004/01/28 16:46:22 p_grandclement
* Addition of the sol_elliptic_fixe_der_zero stuff
*
* Revision 1.41 2004/01/28 13:25:40 j_novak
* The ced_mult_r arguments have been suppressed from the Scalar::*dsd* methods.
* In the div/mult _r_dzpuis, there is no more default value.
*
* Revision 1.40 2004/01/28 10:39:17 j_novak
* Comments modified.
*
* Revision 1.39 2004/01/27 15:10:01 j_novak
* New methods Scalar::div_r_dzpuis(int) and Scalar_mult_r_dzpuis(int)
* which replace div_r_inc*. Tried to clean the dzpuis handling.
* WARNING: no testing at this point!!
*
* Revision 1.38 2004/01/23 13:25:44 e_gourgoulhon
* Added methods set_inner_boundary and set_outer_boundary.
* Methods set_val_inf and set_val_hor, which are particular cases of
* the above, have been suppressed.
*
* Revision 1.37 2004/01/22 16:10:09 e_gourgoulhon
* Added (provisory) method div_r_inc().
*
* Revision 1.36 2003/12/16 06:32:20 e_gourgoulhon
* Added method visu_box.
*
* Revision 1.35 2003/12/14 21:46:35 e_gourgoulhon
* Added argument start_dx in visu_section.
*
* Revision 1.34 2003/12/11 16:19:38 e_gourgoulhon
* Added method visu_section for visualization with OpenDX.
*
* Revision 1.33 2003/12/11 14:48:47 p_grandclement
* Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
*
* Revision 1.32 2003/11/13 13:43:53 p_grandclement
* Addition of things needed for Bhole::update_metric (const Etoile_bin&, double, double)
*
* Revision 1.31 2003/11/06 14:43:37 e_gourgoulhon
* Gave a name to const arguments in certain method prototypes (e.g.
* constructors) to correct a bug of DOC++.
*
* Revision 1.30 2003/11/04 22:55:50 e_gourgoulhon
* Added new methods mult_cost(), mult_sint() and div_sint().
*
* Revision 1.29 2003/10/29 13:09:11 e_gourgoulhon
* -- Added integer argument to derivative functions dsdr, etc...
* so that one can choose the dzpuis of the result (default=2).
* -- Change of method name: laplacien --> laplacian.
*
* Revision 1.28 2003/10/29 11:00:42 e_gourgoulhon
* Virtual functions dec_dzpuis and inc_dzpuis have now an integer argument to
* specify by which amount dzpuis is to be increased.
* Accordingly virtual methods dec2_dzpuis and inc2_dzpuis have been suppressed.
*
* Revision 1.27 2003/10/20 14:26:02 j_novak
* New assignement operators.
*
* Revision 1.26 2003/10/19 19:46:33 e_gourgoulhon
* -- Method spectral_display now virtual (from Tensor), list of argument
* changed.
*
* Revision 1.25 2003/10/17 13:46:14 j_novak
* The argument is now between 1 and 3 (instead of 0->2)
*
* Revision 1.24 2003/10/16 15:23:41 e_gourgoulhon
* Name of method div_r_ced() changed to div_r_inc2().
* Name of method div_rsint_ced() changed to div_rsint_inc2().
*
* Revision 1.23 2003/10/15 21:10:11 e_gourgoulhon
* Added method poisson_angu().
*
* Revision 1.22 2003/10/15 16:03:35 j_novak
* Added the angular Laplace operator for Scalar.
*
* Revision 1.21 2003/10/15 10:29:05 e_gourgoulhon
* Added new members p_dsdt and p_stdsdp.
* Added new methods dsdt(), stdsdp() and div_tant().
*
* Revision 1.20 2003/10/13 13:52:39 j_novak
* Better managment of derived quantities.
*
* Revision 1.19 2003/10/10 15:57:27 j_novak
* Added the state one (ETATUN) to the class Scalar
*
* Revision 1.18 2003/10/08 14:24:08 j_novak
* replaced mult_r_zec with mult_r_ced
*
* Revision 1.17 2003/10/06 16:16:02 j_novak
* New constructor from a Tensor.
*
* Revision 1.16 2003/10/06 13:58:45 j_novak
* The memory management has been improved.
* Implementation of the covariant derivative with respect to the exact Tensor
* type.
*
* Revision 1.15 2003/10/05 21:06:31 e_gourgoulhon
* - Added new methods div_r_ced() and div_rsint_ced().
* - Added new virtual method std_spectral_base()
* - Removed method std_spectral_base_scal()
*
* Revision 1.14 2003/10/01 13:02:58 e_gourgoulhon
* Suppressed the constructor from Map* .
*
* Revision 1.13 2003/09/29 12:52:56 j_novak
* Methods for changing the triad are implemented.
*
* Revision 1.12 2003/09/25 09:33:36 j_novak
* Added methods for integral calculation and various manipulations
*
* Revision 1.11 2003/09/25 09:11:21 e_gourgoulhon
* Added functions for radial operations (divr, etc...)
*
* Revision 1.10 2003/09/25 08:55:23 e_gourgoulhon
* Added members raccord*.
*
* Revision 1.9 2003/09/25 08:50:11 j_novak
* Added the members import
*
* Revision 1.8 2003/09/25 08:13:51 j_novak
* Added method for calculating derivatives
*
* Revision 1.7 2003/09/25 07:59:26 e_gourgoulhon
* Added prototypes for PDE resolutions.
*
* Revision 1.6 2003/09/25 07:17:58 j_novak
* Method asymptot implemented.
*
* Revision 1.5 2003/09/24 20:53:38 e_gourgoulhon
* Added -- constructor by conversion from a Cmp
* -- assignment from Cmp
*
* Revision 1.4 2003/09/24 15:10:54 j_novak
* Suppression of the etat flag in class Tensor (still present in Scalar)
*
* Revision 1.3 2003/09/24 12:01:44 j_novak
* Added friend functions for math.
*
* Revision 1.2 2003/09/24 10:22:01 e_gourgoulhon
* still in progress...
*
* Revision 1.1 2003/09/22 12:50:47 e_gourgoulhon
* First version: not ready yet!
*
*
* $Header: /cvsroot/Lorene/C++/Include/scalar.h,v 1.94 2015/12/18 15:52:51 j_novak Exp $
*
*/
// Headers Lorene
#include "valeur.h"
#include "tensor.h"
namespace Lorene {
class Param ;
class Cmp ;
class Param_elliptic ;
class Scalar : public Tensor {
// Data :
// -----
protected:
int etat ;
int dzpuis ;
Valeur va ;
// Derived data :
// ------------
protected:
mutable Scalar* p_dsdr ;
mutable Scalar* p_srdsdt ;
mutable Scalar* p_srstdsdp ;
mutable Scalar* p_dsdt ;
mutable Scalar* p_stdsdp ;
mutable Scalar* p_dsdx ;
mutable Scalar* p_dsdy ;
mutable Scalar* p_dsdz ;
mutable Scalar* p_lap ;
mutable Scalar* p_lapang ;
mutable Scalar* p_dsdradial ;
mutable Scalar* p_dsdrho ;
mutable int ind_lap ;
mutable Tbl* p_integ ;
// Constructors - Destructor
// -------------------------
public:
explicit Scalar(const Map& mpi) ;
Scalar(const Tensor& a) ;
Scalar(const Scalar& a) ;
Scalar(const Cmp& a) ;
Scalar(const Map&, const Mg3d&, FILE* ) ;
virtual ~Scalar() ;
// Memory management
// -----------------
protected:
void del_t() ;
virtual void del_deriv() const;
void set_der_0x0() const;
public:
virtual void set_etat_nondef() ;
virtual void set_etat_zero() ;
virtual void set_etat_qcq() ;
void set_etat_one() ;
virtual void allocate_all() ;
void annule_hard() ;
// Extraction of information
// -------------------------
public:
int get_etat() const {return etat;} ;
int get_dzpuis() const {return dzpuis;} ;
bool dz_nonzero() const ;
bool check_dzpuis(int dzi) const ;
bool is_nan(bool verbose=false) const ;
// Assignment
// -----------
public:
void operator=(const Scalar& a) ;
virtual void operator=(const Tensor& a) ;
void operator=(const Cmp& a) ;
void operator=(const Valeur& a) ;
void operator=(const Mtbl& a) ;
void operator=(double ) ;
void operator=(int ) ;
// Conversion oprators
//---------------------
operator Cmp() const ;
// Access to individual elements
// -----------------------------
public:
const Valeur& get_spectral_va() const {return va;} ;
Valeur& set_spectral_va() {return va;} ;
Tbl& set_domain(int l) {
assert(etat == ETATQCQ) ;
del_deriv() ;
return va.set(l) ;
};
const Tbl& domain(int l) const {
assert( (etat == ETATQCQ) || (etat == ETATUN) ) ;
return va(l) ;
};
double val_grid_point(int l, int k, int j, int i) const {
assert(etat != ETATNONDEF) ;
if (etat == ETATZERO) {
double zero = 0. ;
return zero ;
}
else {
if (etat == ETATUN) {
double one = 1. ;
return one ;
}
else{
return va(l, k, j, i) ;
}
}
};
double val_point(double r, double theta, double phi) const ;
double& set_grid_point(int l, int k, int j, int i) {
assert(etat == ETATQCQ) ;
return va.set(l, k, j, i) ;
};
virtual void annule(int l_min, int l_max) ;
void set_inner_boundary(int l, double x) ;
void set_outer_boundary(int l, double x) ;
Tbl multipole_spectrum () const ;
Tbl tbl_out_bound(int l_dom, bool leave_ylm = false) ;
Tbl tbl_in_bound(int n, bool leave_ylm = false) ;
Scalar scalar_out_bound(int n, bool leave_ylm = false) ;
// Differential operators and others
// ---------------------------------
public:
const Scalar& dsdr() const ;
const Scalar& srdsdt() const ;
const Scalar& srstdsdp() const ;
const Scalar& dsdt() const ;
const Scalar& dsdradial() const ;
const Scalar& dsdrho() const ;
const Scalar& stdsdp() const ;
const Scalar& dsdx() const ;
const Scalar& dsdy() const ;
const Scalar& dsdz() const ;
const Scalar& deriv(int i) const ;
const Vector& derive_cov(const Metric& gam) const ;
const Vector& derive_con(const Metric& gam) const ;
Scalar derive_lie(const Vector& v) const ;
const Scalar& laplacian(int ced_mult_r = 4) const ;
const Scalar& lapang() const ;
void div_r() ;
void div_r_dzpuis(int ced_mult_r) ;
void div_r_ced() ;
void mult_r() ;
void mult_r_dzpuis(int ced_mult_r) ;
void mult_r_ced() ;
void mult_rsint() ;
void mult_rsint_dzpuis(int ced_mult_r) ;
void div_rsint() ;
void div_rsint_dzpuis(int ced_mult_r) ;
void mult_cost() ;
void div_cost() ;
void mult_sint() ;
void div_sint() ;
void div_tant() ;
Scalar primr(bool null_infty = true) const ;
double integrale() const ;
const Tbl& integrale_domains() const ;
virtual void dec_dzpuis(int dec = 1) ;
virtual void inc_dzpuis(int inc = 1) ;
virtual void change_triad(const Base_vect& new_triad) ;
void filtre (int n) ;
void filtre_r (int* nn) ;
void filtre_r (int n, int nzone) ;
// virtual void exponential_filter_r(int lzmin, int lzmax, int p,
// double alpha= -16.) ;
virtual void exponential_filter_r(int lzmin, int lzmax, int p,
double alpha= -16.) ;
void sarra_filter_r(int lzmin, int lzmax, double p,
double alpha= -1E-16) ;
void exp_filter_r_all_domains(Scalar &ss, int p, double alpha=-16.) ;
void sarra_filter_r_all_domains(double p, double alpha=1E-16) ;
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p,
double alpha= -16.) ;
void annule_l (int l_min, int l_max, bool ylm_output= false ) ;
void filtre_phi (int n, int zone) ;
void filtre_tp(int nn, int nz1, int nz2) ;
void fixe_decroissance (int puis) ;
void smooth_decay(int k, int n) ;
void raccord(int n) ;
void raccord_c1_zec(int puis, int nbre, int lmax) ;
void raccord_externe(int puis, int nbre, int lmax) ;
void match_tau(Param& par_bc, Param* par_mat=0x0) ;
void match_tau_shell(Param& par_bc, Param* par_mat=0x0) ;
void match_collocation(Param& par_bc, Param* par_mat=0x0) ;
// Outputs
// -------
public:
virtual void sauve(FILE *) const ;
virtual void spectral_display(const char* comment = 0x0,
double threshold = 1.e-7, int precision = 4,
ostream& ostr = cout) const ;
friend ostream& operator<<(ostream& , const Scalar & ) ;
void visu_section(const char section_type, double aa, double umin, double umax, double vmin,
double vmax, const char* title = 0x0, const char* filename = 0x0,
bool start_dx = true, int nu = 200, int nv = 200) const ;
void visu_section(const Tbl& plane, double umin, double umax, double vmin,
double vmax, const char* title = 0x0, const char* filename = 0x0,
bool start_dx = true, int nu = 200, int nv = 200) const ;
void visu_section_anim(const char section_type, double aa, double umin,
double umax, double vmin, double vmax, int jtime, double ttime,
int jgraph = 1, const char* title = 0x0, const char* filename_root = 0x0,
bool start_dx = false, int nu = 200, int nv = 200) const ;
void visu_box(double xmin, double xmax, double ymin, double ymax,
double zmin, double zmax, const char* title0 = 0x0,
const char* filename0 = 0x0, bool start_dx = true, int nx = 40, int ny = 40,
int nz = 40) const ;
// Member arithmetics
// ------------------
public:
void operator+=(const Scalar &) ;
void operator-=(const Scalar &) ;
void operator*=(const Scalar &) ;
// Manipulation of spectral bases
// ------------------------------
virtual void std_spectral_base() ;
virtual void std_spectral_base_odd() ;
void set_spectral_base(const Base_val& ) ;
const Base_val& get_spectral_base( ) const {return va.base ;} ;
void set_dzpuis(int ) ;
Valeur** asymptot(int n, const int flag = 0) const ;
// PDE resolution
// --------------
public:
Scalar poisson() const ;
void poisson(Param& par, Scalar& uu) const ;
Scalar poisson_tau() const ;
void poisson_tau(Param& par, Scalar& uu) const ;
Scalar poisson_dirichlet (const Valeur& limite, int num) const ;
Scalar poisson_neumann (const Valeur&, int) const ;
Scalar poisson_dir_neu (const Valeur& limite , int num,
double fact_dir, double fact_neu) const ;
Scalar poisson_frontiere_double (const Valeur&, const Valeur&, int) const ;
void poisson_regular(int k_div, int nzet, double unsgam1, Param& par,
Scalar& uu, Scalar& uu_regu, Scalar& uu_div,
Tensor& duu_div,
Scalar& source_regu, Scalar& source_div) const ;
Tbl test_poisson(const Scalar& uu, ostream& ostr,
bool detail = false) const ;
Scalar poisson_angu(double lambda =0) const ;
Scalar avance_dalembert(Param& par, const Scalar& fJm1, const Scalar& source)
const ;
Scalar sol_elliptic(Param_elliptic& params) const ;
Scalar sol_elliptic_boundary(Param_elliptic& params, const Mtbl_cf& bound,
double fact_dir, double fact_neu) const ;
Scalar sol_elliptic_boundary(Param_elliptic& params, const Scalar& bound,
double fact_dir, double fact_neu) const ;
Scalar sol_elliptic_2d(Param_elliptic&) const ;
Scalar sol_elliptic_pseudo_1d(Param_elliptic&) const ;
Scalar sol_elliptic_no_zec(Param_elliptic& params, double val = 0) const ;
Scalar sol_elliptic_only_zec(Param_elliptic& params, double val) const ;
Scalar sol_elliptic_sin_zec(Param_elliptic& params, double* coefs, double* phases) const ;
Scalar sol_elliptic_fixe_der_zero(double val,
Param_elliptic& params) const ;
Scalar sol_divergence(int n) const ;
// Import from other mapping
// -------------------------
void import(const Scalar& ci) ;
void import_symy(const Scalar& ci) ;
void import_asymy(const Scalar& ci) ;
void import(int nzet, const Scalar& ci) ;
void import_symy(int nzet, const Scalar& ci) ;
void import_asymy(int nzet, const Scalar& ci) ;
protected:
void import_gal(int nzet, const Scalar& ci) ;
void import_align(int nzet, const Scalar& ci) ;
void import_anti(int nzet, const Scalar& ci) ;
void import_align_symy(int nzet, const Scalar& ci) ;
void import_anti_symy(int nzet, const Scalar& ci) ;
void import_align_asymy(int nzet, const Scalar& ci) ;
void import_anti_asymy(int nzet, const Scalar& ci) ;
friend Scalar operator-(const Scalar& ) ;
friend Scalar operator+(const Scalar&, const Scalar &) ;
friend Scalar operator+(const Scalar&, const Mtbl&) ;
friend Scalar operator+(const Scalar&, double ) ;
friend Scalar operator-(const Scalar &, const Scalar &) ;
friend Scalar operator-(const Scalar&, const Mtbl&) ;
friend Scalar operator-(const Scalar&, double ) ;
friend Scalar operator*(const Scalar &, const Scalar &) ;
friend Scalar operator%(const Scalar &, const Scalar &) ;
friend Scalar operator|(const Scalar &, const Scalar &) ;
friend Scalar operator*(const Mtbl&, const Scalar &) ;
friend Scalar operator*(double, const Scalar &) ;
friend Scalar operator/(const Scalar &, const Scalar &) ;
friend Scalar operator/(const Scalar &, const Mtbl &) ;
friend Scalar operator/(const Mtbl &, const Scalar &) ;
friend Scalar operator/(const Scalar&, double ) ;
friend Scalar operator/(double, const Scalar &) ;
friend Scalar sin(const Scalar& ) ;
friend Scalar cos(const Scalar& ) ;
friend Scalar tan(const Scalar& ) ;
friend Scalar asin(const Scalar& ) ;
friend Scalar acos(const Scalar& ) ;
friend Scalar atan(const Scalar& ) ;
friend Scalar exp(const Scalar& ) ;
friend Scalar Heaviside(const Scalar& ) ;
friend Scalar log(const Scalar& ) ;
friend Scalar log10(const Scalar& ) ;
friend Scalar sqrt(const Scalar& ) ;
friend Scalar racine_cubique (const Scalar& ) ;
friend Scalar pow(const Scalar& , int ) ;
friend Scalar pow(const Scalar& , double ) ;
friend Scalar abs(const Scalar& ) ;
friend double totalmax(const Scalar& ) ;
friend double totalmin(const Scalar& ) ;
friend Tbl max(const Scalar& ) ;
friend Tbl min(const Scalar& ) ;
friend Tbl norme(const Scalar& ) ;
friend Tbl diffrel(const Scalar& a, const Scalar& b) ;
friend Tbl diffrelmax(const Scalar& a, const Scalar& b) ;
};
ostream& operator<<(ostream& , const Scalar & ) ;
// Prototypage de l'arithmetique
Scalar operator+(const Scalar& ) ;
Scalar operator-(const Scalar& ) ;
Scalar operator+(const Scalar&, const Scalar &) ;
Scalar operator+(const Scalar&, const Mtbl&) ;
Scalar operator+(const Mtbl&, const Scalar&) ;
Scalar operator+(const Scalar&, double ) ;
Scalar operator+(double, const Scalar& ) ;
Scalar operator+(const Scalar&, int ) ;
Scalar operator+(int, const Scalar& ) ;
Scalar operator-(const Scalar &, const Scalar &) ;
Scalar operator-(const Scalar&, const Mtbl&) ;
Scalar operator-(const Mtbl&, const Scalar&) ;
Scalar operator-(const Scalar&, double ) ;
Scalar operator-(double, const Scalar& ) ;
Scalar operator-(const Scalar&, int ) ;
Scalar operator-(int, const Scalar& ) ;
Scalar operator*(const Scalar &, const Scalar &) ;
Scalar operator%(const Scalar &, const Scalar &) ;
Scalar operator|(const Scalar &, const Scalar &) ;
Scalar operator*(const Mtbl&, const Scalar&) ;
Scalar operator*(const Scalar&, const Mtbl&) ;
Scalar operator*(const Scalar&, double ) ;
Scalar operator*(double, const Scalar &) ;
Scalar operator*(const Scalar&, int ) ;
Scalar operator*(int, const Scalar& ) ;
Scalar operator/(const Scalar &, const Scalar &) ;
Scalar operator/(const Scalar&, double ) ;
Scalar operator/(double, const Scalar &) ;
Scalar operator/(const Scalar&, int ) ;
Scalar operator/(int, const Scalar &) ;
Scalar operator/(const Scalar &, const Mtbl&) ;
Scalar operator/(const Mtbl&, const Scalar &) ;
Scalar sin(const Scalar& ) ;
Scalar cos(const Scalar& ) ;
Scalar tan(const Scalar& ) ;
Scalar asin(const Scalar& ) ;
Scalar acos(const Scalar& ) ;
Scalar atan(const Scalar& ) ;
Scalar exp(const Scalar& ) ;
Scalar Heaviside(const Scalar& ) ;
Scalar log(const Scalar& ) ;
Scalar log10(const Scalar& ) ;
Scalar sqrt(const Scalar& ) ;
Scalar racine_cubique (const Scalar& ) ;
Scalar pow(const Scalar& , int ) ;
Scalar pow(const Scalar& , double ) ;
Scalar abs(const Scalar& ) ;
double totalmax(const Scalar& ) ;
double totalmin(const Scalar& ) ;
Tbl max(const Scalar& ) ;
Tbl min(const Scalar& ) ;
Tbl norme(const Scalar& ) ;
Tbl diffrel(const Scalar& a, const Scalar& b) ;
Tbl diffrelmax(const Scalar& a, const Scalar& b) ;
void exp_filter_ylm_all_domains(Scalar& ss, int p, double alpha=-16.) ;
}
#endif
Lorene::Base_val
Bases of the spectral expansions.
Definition base_val.h:322
Lorene::Base_vect
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition base_vect.h:105
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Metric
Metric for tensor calculation.
Definition metric.h:90
Lorene::Mg3d
Multi-domain grid.
Definition grilles.h:273
Lorene::Mtbl_cf
Coefficients storage for the multi-domain spectral method.
Definition mtbl_cf.h:186
Lorene::Mtbl
Multi-domain array.
Definition mtbl.h:118
Lorene::Param_elliptic
This class contains the parameters needed to call the general elliptic solver.
Definition param_elliptic.h:135
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Scalar::poisson_neumann
Scalar poisson_neumann(const Valeur &, int) const
Idem as Scalar::poisson_dirichlet , the boundary condition being on the radial derivative of the solu...
Definition scalar_pde_frontiere.C:98
Lorene::Scalar::operator%
friend Scalar operator%(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing.
Definition scalar_arithm.C:457
Lorene::Scalar::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition scalar.C:686
Lorene::Scalar::annule_l
void annule_l(int l_min, int l_max, bool ylm_output=false)
Sets all the multipolar components between l_min and l_max to zero.
Definition scalar_manip.C:111
Lorene::Scalar::div_cost
void div_cost()
Division by .
Definition scalar_th_manip.C:70
Lorene::Scalar::sol_divergence
Scalar sol_divergence(int n) const
Resolution of a divergence-like equation.
Definition scalar_sol_div.C:68
Lorene::Scalar::lapang
const Scalar & lapang() const
Returns the angular Laplacian of *this , where .
Definition scalar_deriv.C:461
Lorene::Scalar::set_etat_one
void set_etat_one()
Sets the logical state to ETATUN (one).
Definition scalar.C:334
Lorene::Scalar::totalmax
friend double totalmax(const Scalar &)
Maximum values of a Scalar in each domain.
Definition scalar_math.C:553
Lorene::Scalar::srdsdt
const Scalar & srdsdt() const
Returns of *this .
Definition scalar_deriv.C:145
Lorene::Scalar::raccord
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Definition scalar_raccord.C:62
Lorene::Scalar::atan
friend Scalar atan(const Scalar &)
Arctangent.
Definition scalar_math.C:231
Lorene::Scalar::del_deriv
virtual void del_deriv() const
Logical destructor of the derivatives.
Definition scalar.C:287
Lorene::Scalar::min
friend Tbl min(const Scalar &)
Minimum values of a Scalar in each domain.
Definition scalar_math.C:639
Lorene::Scalar::p_lap
Scalar * p_lap
Pointer on the Laplacian of *this (0x0 if not up to date).
Definition scalar.h:448
Lorene::Scalar::operator|
friend Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
Definition scalar_arithm.C:491
Lorene::Scalar::derive_cov
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this.
Definition scalar_deriv.C:390
Lorene::Scalar::import_align
void import_align(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
Definition scalar_import.C:532
Lorene::Scalar::tan
friend Scalar tan(const Scalar &)
Tangent.
Definition scalar_math.C:136
Lorene::Scalar::p_dsdy
Scalar * p_dsdy
Pointer on of *this , where (0x0 if not up to date).
Definition scalar.h:439
Lorene::Scalar::sarra_filter_r
void sarra_filter_r(int lzmin, int lzmax, double p, double alpha=-1E-16)
Applies an exponential filter to the spectral coefficients in the radial direction.
Definition scalar_exp_filter.C:96
Lorene::Scalar::sol_elliptic_pseudo_1d
Scalar sol_elliptic_pseudo_1d(Param_elliptic &) const
Solves a pseudo-1d elliptic equation with *this as a source.
Definition scalar_pde.C:430
Lorene::Scalar::div_rsint_dzpuis
void div_rsint_dzpuis(int ced_mult_r)
Division by but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:362
Lorene::Scalar::deriv
const Scalar & deriv(int i) const
Returns of *this , where .
Definition scalar_deriv.C:359
Lorene::Scalar::div_r_dzpuis
void div_r_dzpuis(int ced_mult_r)
Division by r everywhere but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:147
Lorene::Scalar::dsdz
const Scalar & dsdz() const
Returns of *this , where .
Definition scalar_deriv.C:328
Lorene::Scalar::import_asymy
void import_asymy(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
Definition scalar_import_asymy.C:72
Lorene::Scalar::scalar_out_bound
Scalar scalar_out_bound(int n, bool leave_ylm=false)
Returns the Scalar containing the values of angular coefficients at the outer boundary.
Definition scalar_manip.C:467
Lorene::Scalar::filtre
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
Definition scalar_manip.C:151
Lorene::Scalar::dsdt
const Scalar & dsdt() const
Returns of *this .
Definition scalar_deriv.C:208
Lorene::Scalar::div_sint
void div_sint()
Division by .
Definition scalar_th_manip.C:98
Lorene::Scalar::~Scalar
virtual ~Scalar()
Destructor.
Definition scalar.C:267
Lorene::Scalar::poisson
Scalar poisson() const
Solves the scalar Poisson equation with *this as a source.
Definition scalar_pde.C:136
Lorene::Scalar::get_dzpuis
int get_dzpuis() const
Returns dzpuis.
Definition scalar.h:557
Lorene::Scalar::laplacian
const Scalar & laplacian(int ced_mult_r=4) const
Returns the Laplacian of *this.
Definition scalar_deriv.C:436
Lorene::Scalar::dsdy
const Scalar & dsdy() const
Returns of *this , where .
Definition scalar_deriv.C:297
Lorene::Scalar::smooth_decay
void smooth_decay(int k, int n)
Performs a matching of the last non-compactified shell with a decaying function where is the spher...
Definition scalar_raccord_zec.C:213
Lorene::Scalar::import_anti_asymy
void import_anti_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Definition scalar_import_asymy.C:131
Lorene::Scalar::p_dsdrho
Scalar * p_dsdrho
Pointer on of *this.
Definition scalar.h:458
Lorene::Scalar::fixe_decroissance
void fixe_decroissance(int puis)
Substracts all the components behaving like in the external domain, with n strictly lower than puis ...
Definition scalar_manip.C:346
Lorene::Scalar::operator=
void operator=(const Scalar &a)
Assignment to another Scalar defined on the same mapping.
Definition scalar.C:446
Lorene::Scalar::tbl_in_bound
Tbl tbl_in_bound(int n, bool leave_ylm=false)
Returns the Tbl containing the values of angular coefficients at the inner boundary.
Definition scalar_manip.C:448
Lorene::Scalar::max
friend Tbl max(const Scalar &)
Maximum values of a Scalar in each domain.
Definition scalar_math.C:611
Lorene::Scalar::cos
friend Scalar cos(const Scalar &)
Cosine.
Definition scalar_math.C:104
Lorene::Scalar::set_etat_qcq
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition scalar.C:353
Lorene::Scalar::integrale
double integrale() const
Computes the integral over all space of *this .
Definition scalar_integ.C:61
Lorene::Scalar::dz_nonzero
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
Definition scalar.C:814
Lorene::Scalar::mult_cost
void mult_cost()
Multiplication by .
Definition scalar_th_manip.C:58
Lorene::Scalar::operator<<
friend ostream & operator<<(ostream &, const Scalar &)
Display.
Definition scalar.C:702
Lorene::Scalar::poisson_angu
Scalar poisson_angu(double lambda=0) const
Solves the (generalized) angular Poisson equation with *this as source.
Definition scalar_pde.C:200
Lorene::Scalar::srstdsdp
const Scalar & srstdsdp() const
Returns of *this .
Definition scalar_deriv.C:177
Lorene::Scalar::raccord_externe
void raccord_externe(int puis, int nbre, int lmax)
Matching of the external domain with the outermost shell.
Definition scalar_raccord_externe.C:66
Lorene::Scalar::p_dsdr
Scalar * p_dsdr
Pointer on of *this (0x0 if not up to date).
Definition scalar.h:411
Lorene::Scalar::p_stdsdp
Scalar * p_stdsdp
Pointer on of *this (0x0 if not up to date).
Definition scalar.h:429
Lorene::Scalar::p_dsdx
Scalar * p_dsdx
Pointer on of *this , where (0x0 if not up to date).
Definition scalar.h:434
Lorene::Scalar::std_spectral_base
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Definition scalar.C:784
Lorene::Scalar::val_grid_point
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Definition scalar.h:637
Lorene::Scalar::dsdrho
const Scalar & dsdrho() const
Returns of *this .
Definition scalar_deriv.C:522
Lorene::Scalar::tbl_out_bound
Tbl tbl_out_bound(int l_dom, bool leave_ylm=false)
Returns the Tbl containing the values of angular coefficients at the outer boundary.
Definition scalar_manip.C:430
Lorene::Scalar::acos
friend Scalar acos(const Scalar &)
Arccosine.
Definition scalar_math.C:199
Lorene::Scalar::exp
friend Scalar exp(const Scalar &)
Exponential.
Definition scalar_math.C:323
Lorene::Scalar::import_gal
void import_gal(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings do not have a part...
Definition scalar_import.C:131
Lorene::Scalar::racine_cubique
friend Scalar racine_cubique(const Scalar &)
Cube root.
Definition scalar_math.C:293
Lorene::Scalar::inc_dzpuis
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Definition scalar_r_manip.C:470
Lorene::Scalar::test_poisson
Tbl test_poisson(const Scalar &uu, ostream &ostr, bool detail=false) const
Checks if a Poisson equation with *this as a source has been correctly solved.
Definition scalar_test_poisson.C:60
Lorene::Scalar::is_nan
bool is_nan(bool verbose=false) const
Looks for NaNs (not a number) in the scalar field.
Definition scalar.C:1008
Lorene::Scalar::visu_box
void visu_box(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const char *title0=0x0, const char *filename0=0x0, bool start_dx=true, int nx=40, int ny=40, int nz=40) const
3D visualization (volume rendering) via OpenDX.
Definition scalar_visu.C:342
Lorene::Scalar::stdsdp
const Scalar & stdsdp() const
Returns of *this .
Definition scalar_deriv.C:238
Lorene::Scalar::operator-=
void operator-=(const Scalar &)
-= Scalar
Definition scalar_arithm.C:886
Lorene::Scalar::match_tau_shell
void match_tau_shell(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
Lorene::Scalar::p_dsdz
Scalar * p_dsdz
Pointer on of *this , where (0x0 if not up to date).
Definition scalar.h:444
Lorene::Scalar::check_dzpuis
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Definition scalar.C:873
Lorene::Scalar::avance_dalembert
Scalar avance_dalembert(Param &par, const Scalar &fJm1, const Scalar &source) const
Performs one time-step integration (from ) of the scalar d'Alembert equation with *this being the val...
Definition scalar_pde.C:217
Lorene::Scalar::div_r
void div_r()
Division by r everywhere; dzpuis is not changed.
Definition scalar_r_manip.C:133
Lorene::Scalar::exp_filter_r_all_domains
void exp_filter_r_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in radial direction in all domains.
Lorene::Scalar::operator+=
void operator+=(const Scalar &)
+= Scalar
Definition scalar_arithm.C:833
Lorene::Scalar::dsdx
const Scalar & dsdx() const
Returns of *this , where .
Definition scalar_deriv.C:266
Lorene::Scalar::log10
friend Scalar log10(const Scalar &)
Basis 10 logarithm.
Definition scalar_math.C:418
Lorene::Scalar::set_etat_zero
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition scalar.C:324
Lorene::Scalar::div_tant
void div_tant()
Division by .
Definition scalar_th_manip.C:111
Lorene::Scalar::dsdr
const Scalar & dsdr() const
Returns of *this .
Definition scalar_deriv.C:113
Lorene::Scalar::change_triad
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition scalar.C:997
Lorene::Scalar::set_domain
Tbl & set_domain(int l)
Read/write of the value in a given domain.
Definition scalar.h:615
Lorene::Scalar::dsdradial
const Scalar & dsdradial() const
Returns of *this if the mapping is affine (class Map_af) and of *this if the mapping is logarithmic...
Definition scalar_deriv.C:491
Lorene::Scalar::ind_lap
int ind_lap
Power of r by which the last computed Laplacian has been multiplied in the compactified external doma...
Definition scalar.h:463
Lorene::Scalar::exponential_filter_ylm
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the angular directions.
Definition scalar_exp_filter.C:142
Lorene::Scalar::operator+
friend Scalar operator+(const Scalar &, const Scalar &)
Scalar + Scalar.
Definition scalar_arithm.C:113
Lorene::Scalar::annule
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
Definition scalar.C:391
Lorene::Scalar::Scalar
Scalar(const Map &mpi)
Constructor from mapping.
Definition scalar.C:204
Lorene::Scalar::operator/
friend Scalar operator/(const Scalar &, const Scalar &)
Scalar / Scalar.
Definition scalar_arithm.C:637
Lorene::Scalar::p_srstdsdp
Scalar * p_srstdsdp
Pointer on of *this (0x0 if not up to date).
Definition scalar.h:421
Lorene::Scalar::set_spectral_va
Valeur & set_spectral_va()
Returns va (read/write version).
Definition scalar.h:604
Lorene::Scalar::get_spectral_va
const Valeur & get_spectral_va() const
Returns va (read only version).
Definition scalar.h:601
Lorene::Scalar::visu_section_anim
void visu_section_anim(const char section_type, double aa, double umin, double umax, double vmin, double vmax, int jtime, double ttime, int jgraph=1, const char *title=0x0, const char *filename_root=0x0, bool start_dx=false, int nu=200, int nv=200) const
3D visualization via time evolving plane section (animation).
Definition scalar_visu.C:535
Lorene::Scalar::annule_hard
void annule_hard()
Sets the Scalar to zero in a hard way.
Definition scalar.C:380
Lorene::Scalar::mult_sint
void mult_sint()
Multiplication by .
Definition scalar_th_manip.C:84
Lorene::Scalar::del_t
void del_t()
Logical destructor.
Definition scalar.C:279
Lorene::Scalar::poisson_dir_neu
Scalar poisson_dir_neu(const Valeur &limite, int num, double fact_dir, double fact_neu) const
Is identicall to Scalar::poisson() .
Definition scalar_pde_frontiere.C:80
Lorene::Scalar::abs
friend Scalar abs(const Scalar &)
Absolute value.
Definition scalar_math.C:523
Lorene::Scalar::mult_r_ced
void mult_r_ced()
Multiplication by r in the compactified external domain (CED), the dzpuis flag is not changed.
Definition scalar_r_manip.C:269
Lorene::Scalar::filtre_tp
void filtre_tp(int nn, int nz1, int nz2)
Sets the n lasts coefficients in to 0 in the domain nz1 to nz2 when expressed in spherical harmonics...
Definition scalar_manip.C:270
Lorene::Scalar::etat
int etat
The logical state ETATNONDEF (undefined), ETATZERO (null), ETATUN (one), or ETATQCQ (ordinary).
Definition scalar.h:396
Lorene::Scalar::get_etat
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Definition scalar.h:554
Lorene::Scalar::allocate_all
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition scalar.C:365
Lorene::Scalar::set_etat_nondef
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Definition scalar.C:344
Lorene::Scalar::visu_section
void visu_section(const char section_type, double aa, double umin, double umax, double vmin, double vmax, const char *title=0x0, const char *filename=0x0, bool start_dx=true, int nu=200, int nv=200) const
3D visualization via a plane section.
Definition scalar_visu.C:78
Lorene::Scalar::get_spectral_base
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
Definition scalar.h:1294
Lorene::Scalar::mult_rsint
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
Definition scalar_r_manip.C:281
Lorene::Scalar::set_dzpuis
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition scalar.C:808
Lorene::Scalar::sol_elliptic_boundary
Scalar sol_elliptic_boundary(Param_elliptic &params, const Mtbl_cf &bound, double fact_dir, double fact_neu) const
Resolution of a general elliptic equation, putting zero at infinity and with inner boundary condition...
Definition scalar_pde.C:256
Lorene::Scalar::diffrelmax
friend Tbl diffrelmax(const Scalar &a, const Scalar &b)
Relative difference between two Scalar (max version).
Definition scalar_math.C:730
Lorene::Scalar::poisson_frontiere_double
Scalar poisson_frontiere_double(const Valeur &, const Valeur &, int) const
Idem as Scalar::poisson_dirichlet , the boundary condition being on both the function and its radial ...
Definition scalar_pde_frontiere.C:115
Lorene::Scalar::set_grid_point
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
Definition scalar.h:684
Lorene::Scalar::set_inner_boundary
void set_inner_boundary(int l, double x)
Sets the value of the Scalar at the inner boundary of a given domain.
Definition scalar_manip.C:283
Lorene::Scalar::raccord_c1_zec
void raccord_c1_zec(int puis, int nbre, int lmax)
Performs the matching of the external domain with respect to the last shell using function like wit...
Definition scalar_raccord_zec.C:77
Lorene::Scalar::log
friend Scalar log(const Scalar &)
Neperian logarithm.
Definition scalar_math.C:385
Lorene::Scalar::filtre_r
void filtre_r(int *nn)
Sets the n lasts coefficients in r to 0 in all domains.
Definition scalar_manip.C:180
Lorene::Scalar::match_tau
void match_tau(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
Definition scalar_match_tau.C:66
Lorene::Scalar::import_align_symy
void import_align_symy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
Definition scalar_import_symy.C:349
Lorene::Scalar::p_lapang
Scalar * p_lapang
Pointer on the Laplacian of *this (0x0 if not up to date).
Definition scalar.h:452
Lorene::Scalar::div_rsint
void div_rsint()
Division by everywhere; dzpuis is not changed.
Definition scalar_r_manip.C:348
Lorene::Scalar::sol_elliptic
Scalar sol_elliptic(Param_elliptic &params) const
Resolution of a general elliptic equation, putting zero at infinity.
Definition scalar_pde.C:234
Lorene::Scalar::mult_rsint_dzpuis
void mult_rsint_dzpuis(int ced_mult_r)
Multiplication by but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:294
Lorene::Scalar::domain
const Tbl & domain(int l) const
Read-only of the value in a given domain.
Definition scalar.h:625
Lorene::Scalar::val_point
double val_point(double r, double theta, double phi) const
Computes the value of the field at an arbitrary point , by means of the spectral expansion.
Definition scalar.C:890
Lorene::Scalar::asin
friend Scalar asin(const Scalar &)
Arcsine.
Definition scalar_math.C:167
Lorene::Scalar::mult_r_dzpuis
void mult_r_dzpuis(int ced_mult_r)
Multiplication by r everywhere but with the output flag dzpuis set to ced_mult_r .
Definition scalar_r_manip.C:221
Lorene::Scalar::sol_elliptic_only_zec
Scalar sol_elliptic_only_zec(Param_elliptic &params, double val) const
Resolution of a general elliptic equation solving in the compactified domain and putting a given valu...
Definition scalar_pde.C:341
Lorene::Scalar::totalmin
friend double totalmin(const Scalar &)
Minimum values of a Scalar in each domain.
Definition scalar_math.C:582
Lorene::Scalar::operator-
friend Scalar operator-(const Scalar &)
- Scalar
Definition scalar_arithm.C:90
Lorene::Scalar::match_collocation
void match_collocation(Param &par_bc, Param *par_mat=0x0)
Method for matching accross domains and imposing boundary condition.
Lorene::Scalar::operator*=
void operator*=(const Scalar &)
*= Scalar
Definition scalar_arithm.C:937
Lorene::Scalar::filtre_phi
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
Definition scalar_manip.C:249
Lorene::Scalar::multipole_spectrum
Tbl multipole_spectrum() const
Gives the spectrum in terms of multipolar modes l .
Definition scalar.C:956
Lorene::Scalar::sarra_filter_r_all_domains
void sarra_filter_r_all_domains(double p, double alpha=1E-16)
Applies an exponential filter in radial direction in all domains for the case where p is a double (se...
Definition scalar_exp_filter.C:136
Lorene::Scalar::std_spectral_base_odd
virtual void std_spectral_base_odd()
Sets the spectral bases of the Valeur va to the standard odd ones for a scalar field.
Definition scalar.C:791
Lorene::Scalar::norme
friend Tbl norme(const Scalar &)
Sums of the absolute values of all the values of the Scalar in each domain.
Definition scalar_math.C:667
Lorene::Scalar::set_outer_boundary
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
Definition scalar_manip.C:315
Lorene::Scalar::derive_con
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Definition scalar_deriv.C:402
Lorene::Scalar::sol_elliptic_no_zec
Scalar sol_elliptic_no_zec(Param_elliptic &params, double val=0) const
Resolution of a general elliptic equation, putting a given value at the outermost shell and not solvi...
Definition scalar_pde.C:314
Lorene::Scalar::va
Valeur va
The numerical value of the Scalar.
Definition scalar.h:405
Lorene::Scalar::spectral_display
virtual void spectral_display(const char *comment=0x0, double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Displays the spectral coefficients and the associated basis functions.
Definition scalar.C:741
Lorene::Scalar::sqrt
friend Scalar sqrt(const Scalar &)
Square root.
Definition scalar_math.C:263
Lorene::Scalar::poisson_regular
void poisson_regular(int k_div, int nzet, double unsgam1, Param &par, Scalar &uu, Scalar &uu_regu, Scalar &uu_div, Tensor &duu_div, Scalar &source_regu, Scalar &source_div) const
Solves the scalar Poisson equation with *this as a source (version with parameters to control the res...
Definition scalar_poisson_regu.C:62
Lorene::Scalar::import_anti
void import_anti(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Definition scalar_import.C:335
Lorene::Scalar::p_dsdradial
Scalar * p_dsdradial
Pointer on of *this.
Definition scalar.h:455
Lorene::Scalar::p_integ
Tbl * p_integ
Pointer on the space integral of *this (values in each domain) (0x0 if not up to date).
Definition scalar.h:468
Lorene::Scalar::p_dsdt
Scalar * p_dsdt
Pointer on of *this (0x0 if not up to date).
Definition scalar.h:424
Lorene::Scalar::poisson_dirichlet
Scalar poisson_dirichlet(const Valeur &limite, int num) const
Is identicall to Scalar::poisson() .
Definition scalar_pde_frontiere.C:64
Lorene::Scalar::pow
friend Scalar pow(const Scalar &, int)
Power .
Definition scalar_math.C:451
Lorene::Scalar::diffrel
friend Tbl diffrel(const Scalar &a, const Scalar &b)
Relative difference between two Scalar (norme version).
Definition scalar_math.C:695
Lorene::Scalar::integrale_domains
const Tbl & integrale_domains() const
Computes the integral in each domain of *this .
Definition scalar_integ.C:79
Lorene::Scalar::sol_elliptic_2d
Scalar sol_elliptic_2d(Param_elliptic &) const
Solves the scalar 2-dimensional elliptic equation with *this as a source.
Definition scalar_pde.C:409
Lorene::Scalar::operator*
friend Scalar operator*(const Scalar &, const Scalar &)
Scalar * Scalar.
Definition scalar_arithm.C:423
Lorene::Scalar::sol_elliptic_fixe_der_zero
Scalar sol_elliptic_fixe_der_zero(double val, Param_elliptic &params) const
Resolution of a general elliptic equation fixing the dericative at the origin and relaxing one contin...
Definition scalar_pde.C:386
Lorene::Scalar::poisson_tau
Scalar poisson_tau() const
Solves the scalar Poisson equation with *this as a source using a real Tau method The source of the ...
Definition scalar_pde.C:169
Lorene::Scalar::set_der_0x0
void set_der_0x0() const
Sets the pointers for derivatives to 0x0.
Definition scalar.C:306
Lorene::Scalar::dec_dzpuis
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Definition scalar_r_manip.C:418
Lorene::Scalar::import_anti_symy
void import_anti_symy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
Definition scalar_import_symy.C:131
Lorene::Scalar::primr
Scalar primr(bool null_infty=true) const
Computes the radial primitive which vanishes for .
Definition scalar_integ.C:101
Lorene::Scalar::sol_elliptic_sin_zec
Scalar sol_elliptic_sin_zec(Param_elliptic &params, double *coefs, double *phases) const
General elliptic solver.
Definition scalar_pde.C:363
Lorene::Scalar::import_align_asymy
void import_align_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
Definition scalar_import_asymy.C:378
Lorene::Scalar::mult_r
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
Definition scalar_r_manip.C:208
Lorene::Scalar::Heaviside
friend Scalar Heaviside(const Scalar &)
Heaviside function.
Definition scalar_math.C:355
Lorene::Scalar::asymptot
Valeur ** asymptot(int n, const int flag=0) const
Asymptotic expansion at r = infinity.
Definition scalar_asymptot.C:63
Lorene::Scalar::p_srdsdt
Scalar * p_srdsdt
Pointer on of *this (0x0 if not up to date).
Definition scalar.h:416
Lorene::Scalar::derive_lie
Scalar derive_lie(const Vector &v) const
Computes the derivative of this along a vector field v.
Definition scalar_deriv.C:419
Lorene::Scalar::div_r_ced
void div_r_ced()
Division by r in the compactified external domain (CED), the dzpuis flag is not changed.
Definition scalar_r_manip.C:196
Lorene::Scalar::import_symy
void import_symy(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
Definition scalar_import_symy.C:72
Lorene::Scalar::set_spectral_base
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va.
Definition scalar.C:797
Lorene::Scalar::dzpuis
int dzpuis
Power of r by which the quantity represented by this must be divided in the compactified external d...
Definition scalar.h:403
Lorene::Scalar::sin
friend Scalar sin(const Scalar &)
Sine.
Definition scalar_math.C:72
Lorene::Scalar::exponential_filter_r
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the radial direction.
Definition scalar_exp_filter.C:60
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Tensor
Tensor handling.
Definition tensor.h:288
Lorene::Valeur
Values and coefficients of a (real-value) function.
Definition valeur.h:287
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene::operator*
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
Definition base_val_mult.C:102
Lorene::operator-
Cmp operator-(const Cmp &)
- Cmp
Definition cmp_arithm.C:108
Lorene::atan
Cmp atan(const Cmp &)
Arctangent.
Definition cmp_math.C:195
Lorene::sqrt
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Lorene::log10
Cmp log10(const Cmp &)
Basis 10 logarithm.
Definition cmp_math.C:322
Lorene::operator/
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Definition cmp_arithm.C:457
Lorene::operator%
Cmp operator%(const Cmp &, const Cmp &)
Cmp * Cmp with desaliasing.
Definition cmp_arithm.C:364
Lorene::exp
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:270
Lorene::sin
Cmp sin(const Cmp &)
Sine.
Definition cmp_math.C:69
Lorene::diffrel
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Definition cmp_math.C:504
Lorene::norme
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Definition cmp_math.C:481
Lorene::acos
Cmp acos(const Cmp &)
Arccosine.
Definition cmp_math.C:169
Lorene::asin
Cmp asin(const Cmp &)
Arcsine.
Definition cmp_math.C:144
Lorene::racine_cubique
Cmp racine_cubique(const Cmp &)
Cube root.
Definition cmp_math.C:245
Lorene::min
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Definition cmp_math.C:458
Lorene::max
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition cmp_math.C:435
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Lorene::cos
Cmp cos(const Cmp &)
Cosine.
Definition cmp_math.C:94
Lorene::abs
Cmp abs(const Cmp &)
Absolute value.
Definition cmp_math.C:410
Lorene::diffrelmax
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Definition cmp_math.C:539
Lorene::operator+
Cmp operator+(const Cmp &)
Definition cmp_arithm.C:104
Lorene::tan
Cmp tan(const Cmp &)
Tangent.
Definition cmp_math.C:120
Lorene::log
Cmp log(const Cmp &)
Neperian logarithm.
Definition cmp_math.C:296
Lorene::Heaviside
Mtbl Heaviside(const Mtbl &)
Heaviside function.
Definition mtbl_math.C:317
Lorene::totalmin
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
Definition mtbl_math.C:522
Lorene::totalmax
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
Definition mtbl_math.C:494
Lorene::operator|
Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
Definition scalar_arithm.C:491
Lorene::exp_filter_ylm_all_domains
void exp_filter_ylm_all_domains(Scalar &ss, int p, double alpha=-16.)
Applies an exponential filter in angular directions in all domains.
Definition scalar_exp_filter.C:186
Lorene::Tensor::Tensor
Tensor(const Map &map, int val, const Itbl &tipe, const Base_vect &triad_i)
Standard constructor.
Definition tensor.C:202
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139
Lorene::phi
Coord phi
coordinate centered on the grid
Definition map.h:720
Lorene::x
Coord x
x coordinate centered on the grid
Definition map.h:726
Lorene::r
Coord r
r coordinate centered on the grid
Definition map.h:718