cmp.h
/*
* Definition of Lorene class Cmp
*
*/
/*
* Copyright (c) 1999-2000 Jean-Alain Marck
* Copyright (c) 1999-2002 Eric Gourgoulhon
* Copyright (c) 1999-2001 Philippe Grandclement
* Copyright (c) 2000-2002 Jerome Novak
* Copyright (c) 2000-2001 Keisuke Taniguchi
*
* 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 __CMP_H_
#define __CMP_H_
/*
* $Id: cmp.h,v 1.23 2016/09/19 15:26:22 j_novak Exp $
* $Log: cmp.h,v $
* Revision 1.23 2016/09/19 15:26:22 j_novak
* Correction of several bugs preventing the shared library compilation.
*
* Revision 1.22 2014/10/13 08:52:33 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.21 2014/10/06 15:09:39 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.20 2012/08/12 17:35:36 p_cerda
* Magnetstar: adding new member to class Cmp
*
* Revision 1.19 2010/02/02 13:34:12 e_gourgoulhon
* Marked DEPRECATED (in the documentation).
*
* Revision 1.18 2005/08/30 08:35:10 p_grandclement
* Addition of the Tau version of the vectorial Poisson equation for the Tensors
*
* Revision 1.17 2005/08/02 06:09:58 m_saijo
* Modified comment lines (div_r, multi_r, mult_rsint, div_rsint)
*
* Revision 1.16 2004/12/29 16:20:20 k_taniguchi
* Addition of the function poisson_ylm.
*
* Revision 1.15 2004/11/30 20:38:10 k_taniguchi
* Addition of the function poisson_falloff.
*
* Revision 1.14 2004/10/11 15:08:59 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.13 2004/03/31 11:21:02 f_limousin
* Method Cmp::poisson_neumann_interne has been implemented to solve
* the continuity equation for strange stars.
*
* Revision 1.12 2004/03/22 13:12:40 j_novak
* Modification of comments to use doxygen instead of doc++
*
* Revision 1.11 2004/03/01 09:54:58 j_novak
* Suppression of the Cmp version of avance_dalembert (now only with Scalar's)
*
* Revision 1.10 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.9 2003/09/24 20:52:37 e_gourgoulhon
* Added constructor by conversion of a Scalar.
*
* Revision 1.8 2003/08/26 09:46:10 j_novak
* Added the method multipole_spectrum
*
* Revision 1.7 2003/06/20 14:16:10 f_limousin
* Add the function compare().
*
* Revision 1.6 2003/06/20 09:27:09 j_novak
* Modif commentaires.
*
* Revision 1.5 2002/09/13 09:17:31 j_novak
* Modif. commentaires
*
* Revision 1.4 2002/06/17 14:05:16 j_novak
* friend functions are now also declared outside the class definition
*
* Revision 1.3 2002/05/17 12:08:46 e_gourgoulhon
* Corrected error in the comment about dzpuis: multiplied --> divided
*
* Revision 1.2 2002/01/03 15:30:27 j_novak
* Some comments modified.
*
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
* LORENE
*
* Revision 2.101 2001/10/29 15:36:03 novak
* Ajout de Cmp::div_r()
*
* Revision 2.100 2001/10/16 10:03:57 novak
* *** empty log message ***
*
* Revision 2.99 2001/08/31 14:52:10 novak
* Back to 2.97 version 2.98 was useless
*
* Revision 2.97 2001/07/19 14:01:39 novak
* new arguments for Cmp::avance_dalembert
*
* Revision 2.96 2001/05/29 16:09:40 eric
* Modif commentaires (mise en conformite Doc++ 3.4.7).
*
* Revision 2.95 2001/05/26 15:07:20 eric
* Ajout de operator% : multiplication de deux Cmp avec desaliasage
*
* Revision 2.94 2001/05/25 09:30:07 phil
* ajout de filtre_phi
*
* Revision 2.93 2001/03/30 13:36:22 phil
* ajout de raccord_externe
*
* Revision 2.92 2001/03/26 08:11:50 eric
* Modif commentaires.
*
* Revision 2.91 2001/03/22 10:25:19 phil
* modification prototypage de raccord_zec.C
*
* Revision 2.90 2001/02/12 18:08:10 phil
* ajout de Cmp::fixe_decroissance
*
* Revision 2.89 2000/12/13 14:50:05 phil
* changement nom variable dzpuis dans raccord_c1_zec
*
* Revision 2.88 2000/12/13 14:35:53 phil
* *** empty log message ***
*
* Revision 2.87 2000/12/13 14:26:42 phil
* *** empty log message ***
*
* Revision 2.86 2000/12/13 14:25:26 phil
* vire commentaires des raccords (provisioire)
*
* Revision 2.85 2000/12/13 14:19:49 phil
* modif commentaires
*
* Revision 2.84 2000/12/13 14:08:36 phil
* ajout procedure raccord_c1_zec
*
* Revision 2.83 2000/12/04 16:48:47 novak
* *** empty log message ***
*
* Revision 2.82 2000/12/04 15:06:15 novak
* *** empty log message ***
*
* Revision 2.81 2000/11/15 13:24:28 phil
* modification de asymptot
*
* Revision 2.80 2000/11/15 13:19:13 phil
* *** empty log message ***
*
* Revision 2.79 2000/11/15 13:17:01 phil
* *** empty log message ***
*
* Revision 2.78 2000/11/15 13:15:45 phil
* gestion affichage dans asymptot
*
* Revision 2.77 2000/10/20 09:43:30 phil
* changement commentaires
*
* Revision 2.76 2000/10/19 14:07:06 novak
* Ajout de la fonction membre avance_dalembert (experimentale)
*
* Revision 2.75 2000/10/19 09:20:36 phil
* *** empty log message ***
*
* Revision 2.74 2000/10/19 09:13:45 phil
* ajout des fonctions :
* filtre(int)
* set_val_inf(double)
* set_val_hor(double,int)
*
* Revision 2.73 2000/10/05 14:18:14 eric
* La fonction check_poisson est rebaptisee test_poisson.
*
* Revision 2.72 2000/10/05 13:56:52 eric
* *** empty log message ***
*
* Revision 2.71 2000/10/05 13:52:25 eric
* Ajout de la fonction check_poisson.
*
* Revision 2.70 2000/09/13 12:21:44 eric
* Modif commentaires.
*
* Revision 2.69 2000/09/13 12:11:48 eric
* Ajout de la fonction allocate_all().
*
* Revision 2.68 2000/09/07 15:26:40 keisuke
* Add a new argument Cmp& uu in Cmp::poisson_regular.
*
* Revision 2.67 2000/09/04 09:11:06 keisuke
* Suppress Cmp::poisson_regular (version without parameter).
*
* Revision 2.66 2000/08/31 13:04:30 eric
* Ajout des fonctions mult_rsint et div_rsint.
*
* Revision 2.65 2000/08/29 13:51:36 keisuke
* *** empty log message ***
*
* Revision 2.64 2000/08/29 13:46:14 keisuke
* Add the polar and azimuthal derivatives of the diverging potential
* in Cmp::poisson_regular.
* Modify the argumants of Cmp::poisson_regular.
*
* Revision 2.63 2000/08/28 15:48:22 keisuke
* Modif Cmp::poisson_regular
*
* Revision 2.62 2000/08/28 15:43:11 keisuke
* Modif Cmp::poisson_regular
*
* Revision 2.61 2000/08/04 12:09:58 eric
* Ajout de l'operator()(int l) et de la fonction set(int l) pour
* l'acces aux Tbl individuels.
*
* Revision 2.60 2000/08/04 09:18:05 keisuke
* Transformation Cmp::poisson_regular_param en Cmp::poisson_regular
*
* Revision 2.59 2000/08/03 14:01:29 keisuke
* Modif Cmp::poisson_regular et ajout de Cmp::poisson_regular_param
*
* Revision 2.58 2000/07/29 12:50:01 keisuke
* Modif Cmp::poisson_regular
*
* Revision 2.57 2000/07/20 13:33:50 keisuke
* Modif Cmp::poisson_regular
*
* Revision 2.56 2000/07/20 10:25:09 keisuke
* Modif Cmp::poisson_regular
*
* Revision 2.55 2000/07/19 15:50:23 keisuke
* Ajout de Cmp::poisson_regular
*
* Revision 2.54 2000/05/22 14:38:32 phil
* ajout de dec_dzpuis et inc_dzpuis
*
* Revision 2.53 2000/04/27 15:18:57 phil
* *** empty log message ***
*
* Revision 2.52 2000/03/28 17:44:41 phil
* Cmp::raccord() -> Cmp::raccord(int)
*
* Revision 2.51 2000/03/28 17:31:31 phil
* *** empty log message ***
*
* Revision 2.50 2000/03/28 17:25:35 phil
* ajout de Cmp::raccord()
*
* Revision 2.49 2000/03/25 12:52:45 eric
* Ajout de la fonction asymptot(int ).
*
* Revision 2.48 2000/03/20 13:33:31 phil
* commentaires
*
* Revision 2.47 2000/03/17 17:32:54 phil
* *** empty log message ***
*
* Revision 2.46 2000/03/17 17:07:14 phil
* *** empty log message ***
*
* Revision 2.45 2000/03/17 16:56:00 phil
* ajout de poisson_dirichlet et de son amie poisson_neumann
*
* Revision 2.44 2000/03/06 10:55:44 eric
* Ajout des methodes import_symy et import_asymy.
*
* Revision 2.43 2000/02/28 16:29:48 eric
* Ajout des fonctions import_gal, import_align, import_anti.
*
* Revision 2.42 2000/01/28 16:08:55 eric
* Ajout des fonctions dz_nonzero et check_dzpuis.
*
* Revision 2.41 2000/01/07 16:28:15 eric
* Suppression de la fonction membre gradient.
*
* Revision 2.40 1999/12/21 13:03:22 eric
* Changement de prototype de la routine poisson avec Param& : la solution est
* desormais passee en argument (et non plus en valeur de retour)
* pour permettre l'initialisation de methodes de resolution iteratives.
*
* Revision 2.39 1999/12/21 10:06:52 eric
* Il y a desormais deux versions de poisson: une sans Param et une
* avec Param.
*
* Revision 2.38 1999/12/10 16:19:33 eric
* Modif commentaires.
*
* Revision 2.37 1999/12/10 15:59:01 eric
* Modif commentaires fonction set.
*
* Revision 2.36 1999/12/09 10:45:54 eric
* Ajout du calcul d'integrale (membre p_integ et fonctions
* integrale et integrale_domains).
*
* Revision 2.35 1999/12/08 12:38:38 eric
* Ajout de la fonction import.
*
* Revision 2.34 1999/12/07 14:53:13 eric
* Changement ordre des arguments (phi,theta,r) --> (r,theta,phi)
* dans la routine val_point.
*
* Revision 2.33 1999/12/06 16:47:00 eric
* Ajout de la fonction val_point.
*
* Revision 2.32 1999/12/02 17:59:11 phil
* *** empty log message ***
*
* Revision 2.31 1999/12/02 14:28:46 eric
* Reprototypage de la fonction poisson(): const.
* Commentaires.
*
* Revision 2.30 1999/11/30 14:20:54 eric
* Reprototypage des fonctions membres mult_r, mult_r_zec,
* dec2_dzpuis et inc2_dzpuis : Cmp --> void.
*
* Revision 2.29 1999/11/29 13:18:06 eric
* Modif commentaires.
*
* Revision 2.28 1999/11/29 12:56:11 eric
* Introduction des membres p_lap, ind_lap.
* Changement prototype de la fonction laplacien.
*
* Revision 2.27 1999/11/26 14:22:54 eric
* Ajout du membre dzpuis et des fonctions de manipulation associees.
*
* Revision 2.26 1999/11/25 16:27:00 eric
* Reorganisation complete du calcul et stokage des derivees partielles.
*
* Revision 2.25 1999/11/23 16:21:32 eric
* Suppression du membre statique Cmp_Zero.
* Suppression du constructeur par defaut.
*
* Revision 2.24 1999/11/22 16:48:00 phil
* Cmp_Zero est desormais public
*
* Revision 2.23 1999/11/22 16:34:17 eric
* Ajout de l'element global Cmp_Zero.
*
* Revision 2.22 1999/11/22 15:41:42 eric
* Ajout des operateurs set(l,k,j,i) et (l,k,j,i).
* Ajout de la fonction annule(int l).
*
* Revision 2.21 1999/11/15 14:12:28 eric
* Ajout des fonctions mathematiques cos, sin, ..., min, max, norme,...
*
* Revision 2.20 1999/11/12 17:08:10 eric
* Ajout de la partie manquante de l'arithmetique.
*
* Revision 2.19 1999/10/28 09:36:56 eric
* Ajout de la fonction affiche_seuil.
*
* Revision 2.18 1999/10/28 09:01:24 eric
* Constructeur par lecture de fichier.
* Ajout de la fonction annule(int, int).
*
* Revision 2.17 1999/10/27 16:46:23 phil
* ajout de mult_r_zec
*
* Revision 2.16 1999/10/27 15:38:40 eric
* Suppression du membre c.
*
* Revision 2.15 1999/10/27 08:42:40 eric
* Introduction du membre Valeur va.
* Le pointeur Valeur* c est desormais un membre prive constant qui pointe
* sur va.
* Suppression de la fonction nouveau(), ainsi que du constructeur par
* defaut.
*
* Revision 2.14 1999/10/22 08:14:19 eric
* Depoussierage.
* Documentation.
*
* Revision 2.13 1999/10/19 14:40:51 phil
* ajout de inc2_dzpuis()
*
* Revision 2.12 1999/09/16 13:16:47 phil
* ajout de Cmp mult_r()
*
* Revision 2.11 1999/09/15 10:29:44 phil
* ajout de dec2_dzpuis()
*
* Revision 2.10 1999/09/14 17:13:05 phil
* ajout de Cmp operator*(double,const Cmp&)
*
* Revision 2.9 1999/09/14 13:45:27 phil
* suppression de la divergence
*
* Revision 2.8 1999/09/14 12:50:31 phil
* ajout de Cmp deriv(int) et de Cmp divergence()
*
* Revision 2.7 1999/09/07 16:08:04 phil
* ajout de la fonction membre gradient
*
* Revision 2.6 1999/09/06 14:50:27 phil
* ajout du laplacien
*
* Revision 2.5 1999/09/06 14:35:05 phil
* ajout de poisson
*
* Revision 2.4 1999/03/03 11:13:46 hyc
* *** empty log message ***
*
* Revision 2.3 1999/03/03 11:07:27 hyc
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Include/cmp.h,v 1.23 2016/09/19 15:26:22 j_novak Exp $
*
*/
#include <cstdio>
#include "valeur.h"
#include "map.h"
namespace Lorene {
class Param ;
class Cmp {
// Data :
// -----
private:
const Map* mp ;
int etat ;
int dzpuis ;
public:
Valeur va ;
// Derived data :
// ------------
private:
mutable Cmp* p_dsdr ;
mutable Cmp* p_srdsdt ;
mutable Cmp* p_srstdsdp ;
mutable Cmp* p_dsdx ;
mutable Cmp* p_dsdy ;
mutable Cmp* p_dsdz ;
mutable Cmp* p_lap ;
mutable int ind_lap ;
mutable Tbl* p_integ ;
// Constructors - Destructor
// -------------------------
public:
explicit Cmp(const Map& map) ;
explicit Cmp(const Map* p_map) ;
Cmp(const Cmp& a) ;
Cmp(const Map&, const Mg3d&, FILE* ) ;
~Cmp() ;
// Assignment
// -----------
public:
void operator=(const Cmp& a) ;
void operator=(const Valeur& a) ;
void operator=(const Mtbl& a) ;
void operator=(double ) ;
void operator=(int ) ;
void import(const Cmp& ci) ;
void import_symy(const Cmp& ci) ;
void import_asymy(const Cmp& ci) ;
void import(int nzet, const Cmp& ci) ;
void import_symy(int nzet, const Cmp& ci) ;
void import_asymy(int nzet, const Cmp& ci) ;
private:
void import_gal(int nzet, const Cmp& ci) ;
void import_align(int nzet, const Cmp& ci) ;
void import_anti(int nzet, const Cmp& ci) ;
void import_align_symy(int nzet, const Cmp& ci) ;
void import_anti_symy(int nzet, const Cmp& ci) ;
void import_align_asymy(int nzet, const Cmp& ci) ;
void import_anti_asymy(int nzet, const Cmp& ci) ;
// Access to individual elements
// -----------------------------
public:
Tbl& set(int l) {
assert(etat == ETATQCQ) ;
return va.set(l) ;
};
const Tbl& operator()(int l) const {
assert(etat == ETATQCQ) ;
return va(l) ;
};
double& set(int l, int k, int j, int i) {
assert(etat == ETATQCQ) ;
return va.set(l, k, j, i) ;
};
double operator()(int l, int k, int j, int i) const {
assert(etat != ETATNONDEF) ;
if (etat == ETATZERO) {
double zero = 0. ;
return zero ;
}
else{
return va(l, k, j, i) ;
}
};
double val_point(double r, double theta, double phi) const ;
// Memory management
// -----------------
private:
void del_t() ;
void del_deriv() ;
void set_der_0x0() ;
public:
void set_etat_nondef() ;
void set_etat_zero() ;
void set_etat_qcq() ;
void allocate_all() ;
void annule_hard() ;
void annule(int l) ;
void annule(int l_min, int l_max) ;
void filtre (int n) ;
void filtre_phi (int n, int zone) ;
void set_val_inf (double val) ;
void set_val_hor (double val, int zone) ;
void fixe_decroissance (int puis) ;
Tbl multipole_spectrum () ;
// Extraction of information
// -------------------------
public:
int get_etat() const {return etat;} ;
const Map* get_mp() const {return mp;};
int get_dzpuis() const {return dzpuis;} ;
bool dz_nonzero() const ;
bool check_dzpuis(int dzi) const ;
// Outputs
// -------
public:
void sauve(FILE *) const ;
void affiche_seuil(ostream& ostr, int type = 0, int precision = 4,
double threshold = 1.e-7) const ;
friend ostream& operator<<(ostream& , const Cmp & ) ;
// Member arithmetics
// ------------------
public:
void operator+=(const Cmp &) ;
void operator-=(const Cmp &) ;
void operator*=(const Cmp &) ;
// Manipulation of spectral bases
// ------------------------------
void std_base_scal() ;
// Differential operators and others
// ---------------------------------
public:
const Cmp& dsdr() const ;
const Cmp& srdsdt() const ;
const Cmp& srstdsdp() const ;
const Cmp& dsdx() const ;
const Cmp& dsdy() const ;
const Cmp& dsdz() const ;
const Cmp& deriv(int i) const ;
const Cmp& laplacien(int zec_mult_r = 4) const ;
void div_r() ;
void mult_r() ;
void mult_r_zec() ;
void mult_rsint() ;
void mult_cost() ;
void div_rsint() ;
void dec_dzpuis() ;
void inc_dzpuis() ;
void dec2_dzpuis() ;
void inc2_dzpuis() ;
void set_dzpuis(int ) ;
double integrale() const ;
const Tbl& integrale_domains() const ;
Valeur** asymptot(int n, const int flag = 0) const ;
// PDE resolution
// --------------
public:
Cmp poisson() const ;
Cmp poisson_tau() const ;
Cmp poisson_falloff(int k_falloff) const ;
Cmp poisson_ylm(int nylm, double* intvec) const ;
void poisson(Param& par, Cmp& uu) const ;
void poisson_tau(Param& par, Cmp& uu) const ;
void poisson_falloff(Param& par, Cmp& uu, int k_falloff) const ;
void poisson_ylm(Param& par, Cmp& uu, int nylm, double* intvec) const ;
Cmp poisson_dirichlet (const Valeur& limite, int num) const ;
Cmp poisson_neumann (const Valeur&, int) const ;
Cmp poisson_neumann_interne (const Valeur&, Param& par, Cmp& resu) const ;
Cmp poisson_frontiere_double (const Valeur&, const Valeur&, int) const ;
void poisson_regular(int k_div, int nzet, double unsgam1, Param& par,
Cmp& uu, Cmp& uu_regu, Cmp& uu_div,
Tenseur& duu_div,
Cmp& source_regu, Cmp& source_div) const ;
Tbl test_poisson(const Cmp& uu, ostream& ostr,
bool detail = false) const ;
void raccord(int n) ;
void raccord_c1_zec (int puis, int nbre, int lmax) ;
void raccord_externe (int puis, int nbre, int lmax) ;
};
ostream& operator<<(ostream& , const Cmp & ) ;
Cmp operator+(const Cmp& ) ;
Cmp operator-(const Cmp& ) ;
Cmp operator+(const Cmp&, const Cmp &) ;
Cmp operator+(const Cmp&, double ) ;
Cmp operator+(double, const Cmp& ) ;
Cmp operator+(const Cmp&, int ) ;
Cmp operator+(int, const Cmp& ) ;
Cmp operator-(const Cmp &, const Cmp &) ;
Cmp operator-(const Cmp&, double ) ;
Cmp operator-(double, const Cmp& ) ;
Cmp operator-(const Cmp&, int ) ;
Cmp operator-(int, const Cmp& ) ;
Cmp operator*(const Cmp &, const Cmp &) ;
Cmp operator%(const Cmp &, const Cmp &) ;
Cmp operator*(const Cmp&, double ) ;
Cmp operator*(double, const Cmp &) ;
Cmp operator*(const Cmp&, int ) ;
Cmp operator*(int, const Cmp& ) ;
Cmp operator/(const Cmp &, const Cmp &) ;
Cmp operator/(const Cmp&, double ) ;
Cmp operator/(double, const Cmp &) ;
Cmp operator/(const Cmp&, int ) ;
Cmp operator/(int, const Cmp &) ;
Cmp sin(const Cmp& ) ;
Cmp cos(const Cmp& ) ;
Cmp tan(const Cmp& ) ;
Cmp asin(const Cmp& ) ;
Cmp acos(const Cmp& ) ;
Cmp atan(const Cmp& ) ;
Cmp exp(const Cmp& ) ;
Cmp log(const Cmp& ) ;
Cmp log10(const Cmp& ) ;
Cmp sqrt(const Cmp& ) ;
Cmp racine_cubique (const Cmp& ) ;
Cmp pow(const Cmp& , int ) ;
Cmp pow(const Cmp& , double ) ;
Cmp abs(const Cmp& ) ;
Tbl max(const Cmp& ) ;
Tbl min(const Cmp& ) ;
Tbl norme(const Cmp& ) ;
Tbl diffrel(const Cmp& a, const Cmp& b) ;
Tbl diffrelmax(const Cmp& a, const Cmp& b) ;
}
#endif
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Cmp::poisson_regular
void poisson_regular(int k_div, int nzet, double unsgam1, Param &par, Cmp &uu, Cmp &uu_regu, Cmp &uu_div, Tenseur &duu_div, Cmp &source_regu, Cmp &source_div) const
Solves the scalar Poisson equation with *this as a source (version with parameters to control the res...
Definition cmp_poisson_regu.C:88
Lorene::Cmp::p_dsdx
Cmp * p_dsdx
Pointer on of *this , where .
Definition cmp.h:479
Lorene::Cmp::mp
const Map * mp
Reference mapping.
Definition cmp.h:451
Lorene::Cmp::mult_r_zec
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC).
Definition cmp_r_manip.C:103
Lorene::Cmp::mult_rsint
void mult_rsint()
Multiplication by .
Definition cmp_r_manip.C:116
Lorene::Cmp::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 cmp_raccord_zec.C:84
Lorene::Cmp::Cmp
Cmp(const Map &map)
Constructor from mapping.
Definition cmp.C:208
Lorene::Cmp::allocate_all
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition cmp.C:323
Lorene::Cmp::p_srstdsdp
Cmp * p_srstdsdp
Pointer on of *this.
Definition cmp.h:474
Lorene::Cmp::sauve
void sauve(FILE *) const
Save in a file.
Definition cmp.C:561
Lorene::Cmp::div_r
void div_r()
Division by r everywhere.
Definition cmp_r_manip.C:78
Lorene::Cmp::p_srdsdt
Cmp * p_srdsdt
Pointer on of *this.
Definition cmp.h:472
Lorene::Cmp::dec_dzpuis
void dec_dzpuis()
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition cmp_r_manip.C:154
Lorene::Cmp::operator=
void operator=(const Cmp &a)
Assignment to another Cmp defined on the same mapping.
Definition cmp.C:398
Lorene::Cmp::import_align_symy
void import_align_symy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesia...
Definition cmp_import_symy.C:340
Lorene::Cmp::dzpuis
int dzpuis
Power of r by which the quantity represented by this must be divided in the external compactified z...
Definition cmp.h:461
Lorene::Cmp::set_val_hor
void set_val_hor(double val, int zone)
Sets the value of the Cmp to val on the inner boudary of the shell number zone .This is usefull for d...
Definition cmp_manip.C:159
Lorene::Cmp::dsdz
const Cmp & dsdz() const
Returns of *this , where .
Definition cmp_deriv.C:190
Lorene::Cmp::get_etat
int get_etat() const
Returns the logical state.
Definition cmp.h:899
Lorene::Cmp::va
Valeur va
The numerical value of the Cmp.
Definition cmp.h:464
Lorene::Cmp::poisson_neumann_interne
Cmp poisson_neumann_interne(const Valeur &, Param &par, Cmp &resu) const
Idem as Cmp::poisson_neumann , the boundary condition is on the radial derivative of the solution.
Definition cmp_pde_frontiere.C:110
Lorene::Cmp::operator()
double operator()(int l, int k, int j, int i) const
Read-only of a particular element.
Definition cmp.h:761
Lorene::Cmp::filtre_phi
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
Definition cmp_manip.C:101
Lorene::Cmp::std_base_scal
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Definition cmp.C:644
Lorene::Cmp::srstdsdp
const Cmp & srstdsdp() const
Returns of *this .
Definition cmp_deriv.C:127
Lorene::Cmp::etat
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition cmp.h:454
Lorene::Cmp::annule
void annule(int l)
Sets the Cmp to zero in a given domain.
Definition cmp.C:348
Lorene::Cmp::import_anti
void import_anti(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Car...
Definition cmp_import.C:335
Lorene::Cmp::dsdy
const Cmp & dsdy() const
Returns of *this , where .
Definition cmp_deriv.C:169
Lorene::Cmp::deriv
const Cmp & deriv(int i) const
Returns of *this , where .
Definition cmp_deriv.C:211
Lorene::Cmp::laplacien
const Cmp & laplacien(int zec_mult_r=4) const
Returns the Laplacian of *this.
Definition cmp_deriv.C:242
Lorene::Cmp::poisson_dirichlet
Cmp poisson_dirichlet(const Valeur &limite, int num) const
Is identicall to Cmp::poisson() .
Definition cmp_pde_frontiere.C:95
Lorene::Cmp::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition cmp.C:304
Lorene::Cmp::set
double & set(int l, int k, int j, int i)
Read/write of a particular element.
Definition cmp.h:749
Lorene::Cmp::get_dzpuis
int get_dzpuis() const
Returns dzpuis.
Definition cmp.h:903
Lorene::Cmp::mult_r
void mult_r()
Multiplication by r everywhere.
Definition cmp_r_manip.C:91
Lorene::Cmp::integrale_domains
const Tbl & integrale_domains() const
Computes the integral in each domain of *this .
Definition cmp_integ.C:73
Lorene::Cmp::operator+=
void operator+=(const Cmp &)
+= Cmp
Definition cmp_arithm.C:575
Lorene::Cmp::inc2_dzpuis
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition cmp_r_manip.C:192
Lorene::Cmp::dz_nonzero
bool dz_nonzero() const
Returns true if the last domain is compactified and *this is not zero in this domain.
Definition cmp.C:660
Lorene::Cmp::operator<<
friend ostream & operator<<(ostream &, const Cmp &)
Display.
Definition cmp.C:577
Lorene::Cmp::set
Tbl & set(int l)
Read/write of the value in a given domain.
Definition cmp.h:724
Lorene::Cmp::set_etat_zero
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition cmp.C:289
Lorene::Cmp::filtre
void filtre(int n)
Sets the n lasts coefficients in r to 0 in the external domain.
Definition cmp_manip.C:74
Lorene::Cmp::import_anti_asymy
void import_anti_asymy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Car...
Definition cmp_import_asymy.C:126
Lorene::Cmp::operator*=
void operator*=(const Cmp &)
*= Cmp
Definition cmp_arithm.C:668
Lorene::Cmp::set_dzpuis
void set_dzpuis(int)
Set a value to dzpuis.
Definition cmp.C:654
Lorene::Cmp::integrale
double integrale() const
Computes the integral over all space of *this .
Definition cmp_integ.C:55
Lorene::Cmp::srdsdt
const Cmp & srdsdt() const
Returns of *this .
Definition cmp_deriv.C:105
Lorene::Cmp::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 cmp.C:715
Lorene::Cmp::get_mp
const Map * get_mp() const
Returns the mapping.
Definition cmp.h:901
Lorene::Cmp::poisson_tau
Cmp poisson_tau() const
Same as Poisson with a Tau method.
Definition cmp_pde.C:120
Lorene::Cmp::import_align_asymy
void import_align_asymy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesia...
Definition cmp_import_asymy.C:369
Lorene::Cmp::asymptot
Valeur ** asymptot(int n, const int flag=0) const
Asymptotic expansion at r = infinity.
Definition cmp_asymptot.C:71
Lorene::Cmp::p_dsdr
Cmp * p_dsdr
Pointer on of *this.
Definition cmp.h:470
Lorene::Cmp::import_align
void import_align(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesia...
Definition cmp_import.C:527
Lorene::Cmp::import_symy
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Definition cmp_import_symy.C:67
Lorene::Cmp::poisson_neumann
Cmp poisson_neumann(const Valeur &, int) const
Idem as Cmp::poisson_dirichlet , the boundary condition being on the radial derivative of the solutio...
Definition cmp_pde_frontiere.C:103
Lorene::Cmp::test_poisson
Tbl test_poisson(const Cmp &uu, ostream &ostr, bool detail=false) const
Checks if a Poisson equation with *this as a source has been correctly solved.
Definition cmp_test_poisson.C:58
Lorene::Cmp::operator()
const Tbl & operator()(int l) const
Read-only of the value in a given domain.
Definition cmp.h:733
Lorene::Cmp::set_val_inf
void set_val_inf(double val)
Sets the value of the Cmp to val at infinity.
Definition cmp_manip.C:126
Lorene::Cmp::del_deriv
void del_deriv()
Logical destructor of the derivatives.
Definition cmp.C:265
Lorene::Cmp::dec2_dzpuis
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition cmp_r_manip.C:180
Lorene::Cmp::div_rsint
void div_rsint()
Division by .
Definition cmp_r_manip.C:141
Lorene::Cmp::dsdx
const Cmp & dsdx() const
Returns of *this , where .
Definition cmp_deriv.C:148
Lorene::Cmp::mult_cost
void mult_cost()
Multiplication by \f\cos\theta\f$.
Definition cmp_r_manip.C:128
Lorene::Cmp::set_der_0x0
void set_der_0x0()
Sets the pointers for derivatives to 0x0.
Definition cmp.C:276
Lorene::Cmp::operator-=
void operator-=(const Cmp &)
-= Cmp
Definition cmp_arithm.C:623
Lorene::Cmp::fixe_decroissance
void fixe_decroissance(int puis)
Substracts all the components behaving like in the external domain, with n strictly lower than puis ...
Definition cmp_manip.C:186
Lorene::Cmp::val_point
double val_point(double r, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point , by means of the spectral...
Definition cmp.C:732
Lorene::Cmp::~Cmp
~Cmp()
Destructor.
Definition cmp.C:250
Lorene::Cmp::p_dsdy
Cmp * p_dsdy
Pointer on of *this , where .
Definition cmp.h:484
Lorene::Cmp::raccord
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Definition cmp_raccord.C:170
Lorene::Cmp::poisson
Cmp poisson() const
Solves the scalar Poisson equation with *this as a source.
Definition cmp_pde.C:94
Lorene::Cmp::dsdr
const Cmp & dsdr() const
Returns of *this .
Definition cmp_deriv.C:84
Lorene::Cmp::set_etat_nondef
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Definition cmp.C:297
Lorene::Cmp::p_lap
Cmp * p_lap
Pointer on the Laplacian of *this.
Definition cmp.h:493
Lorene::Cmp::affiche_seuil
void affiche_seuil(ostream &ostr, int type=0, int precision=4, double threshold=1.e-7) const
Prints only the values greater than a given threshold.
Definition cmp.C:612
Lorene::Cmp::ind_lap
int ind_lap
Power of r by which the last computed Laplacian has been multiplied in the external compactified doma...
Definition cmp.h:498
Lorene::Cmp::import_gal
void import_gal(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings do not have a particu...
Definition cmp_import.C:136
Lorene::Cmp::annule_hard
void annule_hard()
Sets the Cmp to zero in a hard way.
Definition cmp.C:338
Lorene::Cmp::del_t
void del_t()
Logical destructor.
Definition cmp.C:259
Lorene::Cmp::raccord_externe
void raccord_externe(int puis, int nbre, int lmax)
Matching of the external domain with the outermost shell.
Definition cmp_raccord_externe.C:91
Lorene::Cmp::import_asymy
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Definition cmp_import_asymy.C:67
Lorene::Cmp::p_integ
Tbl * p_integ
Pointer on the space integral of *this (values in each domain).
Definition cmp.h:503
Lorene::Cmp::multipole_spectrum
Tbl multipole_spectrum()
Gives the spectrum in terms of multipolar modes l .
Definition cmp.C:762
Lorene::Cmp::inc_dzpuis
void inc_dzpuis()
Increases by the value of dzpuis and changes accordingly the values of the Cmp in the external compac...
Definition cmp_r_manip.C:166
Lorene::Cmp::import_anti_symy
void import_anti_symy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Car...
Definition cmp_import_symy.C:126
Lorene::Cmp::p_dsdz
Cmp * p_dsdz
Pointer on of *this , where .
Definition cmp.h:489
Lorene::Mg3d
Multi-domain grid.
Definition grilles.h:273
Lorene::Mtbl
Multi-domain array.
Definition mtbl.h:118
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Tenseur
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
Lorene::Valeur
Values and coefficients of a (real-value) function.
Definition valeur.h:287
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
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::r
Coord r
r coordinate centered on the grid
Definition map.h:718