cmp.C
/*
* Methods of class Cmp
*
* (see file cmp.h for documentation)
*
*/
/*
* Copyright (c) 1999-2000 Jean-Alain Marck
* Copyright (c) 1999-2001 Eric Gourgoulhon
* Copyright (c) 1999-2001 Philippe Grandclement
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char cmp_C[] = "$Header: /cvsroot/Lorene/C++/Source/Cmp/cmp.C,v 1.10 2014/10/13 08:52:46 j_novak Exp $" ;
/*
* $Id: cmp.C,v 1.10 2014/10/13 08:52:46 j_novak Exp $
* $Log: cmp.C,v $
* Revision 1.10 2014/10/13 08:52:46 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.9 2014/10/06 15:13:03 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.8 2004/10/11 15:09:01 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.7 2003/10/16 21:39:02 e_gourgoulhon
* Treated the case ETATUN in the constructor from Scalar.
*
* Revision 1.6 2003/10/01 15:49:33 e_gourgoulhon
* Method Scalar::get_mp() now returns a reference onto a mapping.
*
* Revision 1.5 2003/09/24 20:54:24 e_gourgoulhon
* Added constructor by conversion of a Scalar.
*
* Revision 1.4 2003/08/26 09:46:10 j_novak
* Added the method multipole_spectrum
*
* Revision 1.3 2002/10/16 14:36:33 j_novak
* Reorganization of #include instructions of standard C++, in order to
* use experimental version 3 of gcc.
*
* Revision 1.2 2001/12/04 21:27:53 e_gourgoulhon
*
* All writing/reading to a binary file are now performed according to
* the big endian convention, whatever the system is big endian or
* small endian, thanks to the functions fwrite_be and fread_be
*
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
* LORENE
*
* Revision 2.36 2000/09/13 12:11:56 eric
* Ajout de la fonction allocate_all().
*
* Revision 2.35 2000/09/06 09:45:23 keisuke
* Ajout de l'appel a del_deriv() dans set_etat_qcq() pour le cas
* ou etat est deja ETATQCQ.
*
* Revision 2.34 2000/08/16 10:43:30 eric
* Suppression de Mtbl_cf::dzpuis.
*
* Revision 2.33 2000/08/16 10:30:41 eric
* Suppression de Mtbl::dzpuis.
*
* Revision 2.32 2000/03/07 16:52:58 eric
* Modif dz_nonzero() : cas etat=ETATQCQ et va.etat=ETATZERO.
*
* Revision 2.31 2000/01/28 16:09:21 eric
* Ajout des fonctions dz_nonzero et check_dzpuis.
*
* Revision 2.30 1999/12/22 16:44:28 eric
* set_etat_zero() : remplacement de l'appel a del_t() par
* 1/ va.set_etat_zero() ;
* 2/ del_deriv() ;
*
* Revision 2.29 1999/12/10 15:59:14 eric
* Changement de la place de del_deriv() dans l'affectation
* (pour permettre l'affectation a des membres derives).
* Annulation des membres derives.
* dans la fonction annule(int,int).
*
* Revision 2.28 1999/12/09 10:50:01 eric
* Ajout du membre p_integ.
*
* Revision 2.27 1999/12/07 14:53:32 eric
* Changement ordre des arguments (phi,theta,r) --> (r,theta,phi)
* dans la routine val_point.
*
* Revision 2.26 1999/12/06 16:47:11 eric
* Ajout de la fonction val_point.
*
* Revision 2.25 1999/11/30 16:30:23 eric
* *** empty log message ***
*
* Revision 2.24 1999/11/30 16:26:39 eric
* Ajout (provisoire) de l'affectation des dzpuis des Mtbl et Mtbl_cf
* dans set_dzpuis.
*
* Revision 2.23 1999/11/29 15:14:48 phil
* *** empty log message ***
*
* Revision 2.22 1999/11/29 12:56:49 eric
* Introduction des membres p_lap, ind_lap.
*
* Revision 2.21 1999/11/26 14:23:17 eric
* Ajout du membre dzpuis et des fonctions de manipulation associees.
*
* Revision 2.20 1999/11/25 16:27:45 eric
* Reorganisation complete du calcul et stokage des derivees partielles.
*
* Revision 2.19 1999/11/23 16:21:02 eric
* Suppression du membre statique Cmp_Zero.
* Suppression du constructeur par defaut.
*
* Revision 2.18 1999/11/22 16:34:56 eric
* Ajout du constructeur prive sans argument pour Cmp_Zero.
*
* Revision 2.17 1999/11/22 15:41:57 eric
* Ajout de la fonction annule(int l).
*
* Revision 2.16 1999/10/29 08:14:59 eric
* Ajout de assert( mpi.get_mg() == &mgi ) dans le constructeur
* par lecture de fichier.
*
* Revision 2.15 1999/10/28 09:39:00 eric
* Ajout de la fonction affiche_seuil.
*
* Revision 2.14 1999/10/28 09:01:56 eric
* Constructeur par lecture de fichier.
* Ajout de la fonction annule(int, int).
*
* Revision 2.13 1999/10/27 15:38:52 eric
* Suppression du membre c.
*
* Revision 2.12 1999/10/27 09:51:46 eric
* *** empty log message ***
*
* Revision 2.11 1999/10/27 08:45:31 eric
* Introduction du membre Valeur va.
* Le pointeur Valeur* c est desormais un membre prive constant qui pointe
*
* sur va.
*
* Revision 2.10 1999/10/22 08:14:32 eric
* Depoussierage.
*
* Revision 2.9 1999/10/18 16:08:15 phil
* Correction de set_etat_qcq
* Evite les memory leak
*
* Revision 2.8 1999/10/18 15:07:58 eric
* La fonction membre Valeur::annule() est rebaptisee Valeur::annule_hard().
*
* Revision 2.7 1999/04/09 13:38:58 phil
* *** empty log message ***
*
* Revision 2.6 1999/04/09 13:10:09 phil
* ajout de cmp = valeur
*
* Revision 2.5 1999/03/03 11:16:24 hyc
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Source/Cmp/cmp.C,v 1.10 2014/10/13 08:52:46 j_novak Exp $
*
*/
// headers C
#include <cassert>
#include <cstdlib>
#include <cmath>
// headers Lorene
#include "cmp.h"
#include "type_parite.h"
#include "utilitaires.h"
#include "proto.h"
//---------------//
// Constructeurs //
//---------------//
namespace Lorene {
Cmp::Cmp(const Map& mpi) : mp(&mpi), etat(ETATNONDEF), dzpuis(0),
va(mpi.get_mg()) {
set_der_0x0() ;
}
Cmp::Cmp(const Map* mpi) : mp(mpi), etat(ETATNONDEF), dzpuis(0),
va(mpi->get_mg()) {
set_der_0x0() ;
}
// Copy constructor
// ----------------
Cmp::Cmp(const Cmp& ci) : mp(ci.mp), etat(ci.etat), dzpuis(ci.dzpuis),
va(ci.va) {
set_der_0x0() ; // On ne recopie pas les derivees
}
// From file
// ---------
Cmp::Cmp(const Map& mpi, const Mg3d& mgi, FILE* fd) : mp(&mpi), va(mgi, fd) {
assert( mpi.get_mg() == &mgi ) ;
fread_be(&etat, sizeof(int), 1, fd) ; // L'etat
fread_be(&dzpuis, sizeof(int), 1, fd) ; // dzpuis
set_der_0x0() ; // Les derivees sont initialisees a zero
}
//--------------//
// Destructeur //
//--------------//
// Destructeur
Cmp::~Cmp() {
del_t() ;
}
//-----------------------//
// Gestion de la memoire //
//-----------------------//
// Destructeur logique
void Cmp::del_t() {
va.del_t() ;
del_deriv() ;
etat = ETATNONDEF ;
}
void Cmp::del_deriv() {
delete p_dsdr ; p_dsdr = 0x0 ;
delete p_srdsdt ; p_srdsdt = 0x0 ;
delete p_srstdsdp ; p_srstdsdp = 0x0 ;
delete p_dsdx ; p_dsdx = 0x0 ;
delete p_dsdy ; p_dsdy = 0x0 ;
delete p_dsdz ; p_dsdz = 0x0 ;
delete p_lap ; p_lap = 0x0 ;
delete p_integ ; p_integ = 0x0 ;
}
void Cmp::set_der_0x0() {
p_dsdr = 0x0 ;
p_srdsdt = 0x0 ;
p_srstdsdp = 0x0 ;
p_dsdx = 0x0 ;
p_dsdy = 0x0 ;
p_dsdz = 0x0 ;
p_lap = 0x0 ;
ind_lap = - 1 ;
p_integ = 0x0 ;
}
// ETATZERO
void Cmp::set_etat_zero() {
if (etat == ETATZERO) return ;
del_deriv() ;
va.set_etat_zero() ;
etat = ETATZERO ;
}
// ETATNONDEF
void Cmp::set_etat_nondef() {
if (etat == ETATNONDEF) return ;
del_t() ;
etat = ETATNONDEF ;
}
// ETATQCQ
void Cmp::set_etat_qcq() {
if (etat == ETATQCQ) {
del_deriv() ;
return ;
}
// Protection
assert( (etat == ETATZERO) || (etat == ETATNONDEF) ) ; // sinon...
del_t() ;
// Termine
etat = ETATQCQ ;
}
// Allocates everything
// --------------------
void Cmp::allocate_all() {
set_etat_qcq() ;
va.set_etat_c_qcq() ; // allocation in configuration space
Mtbl* mt = va.c ;
mt->set_etat_qcq() ;
for (int l=0; l<mt->get_nzone(); l++) {
mt->t[l]->set_etat_qcq() ;
}
}
// ZERO hard
void Cmp::annule_hard() {
va.annule_hard() ;
del_deriv() ;
etat = ETATQCQ ;
}
// Sets the Cmp to zero in a given domain
// --------------------------------------
void Cmp::annule(int l) {
annule(l, l) ;
}
// Sets the Cmp to zero in several domains
// ---------------------------------------
void Cmp::annule(int l_min, int l_max) {
// Cas particulier: annulation globale :
if ( (l_min == 0) && (l_max == va.mg->get_nzone()-1) ) {
set_etat_zero() ;
return ;
}
assert( etat != ETATNONDEF ) ;
if ( etat == ETATZERO ) {
return ; // rien n'a faire si c'est deja zero
}
else {
assert( etat == ETATQCQ ) ; // sinon...
va.annule(l_min, l_max) ; // Annule la Valeur
// Annulation des membres derives
if (p_dsdr != 0x0) p_dsdr->annule(l_min, l_max) ;
if (p_srdsdt != 0x0) p_srdsdt->annule(l_min, l_max) ;
if (p_srstdsdp != 0x0) p_srstdsdp->annule(l_min, l_max) ;
if (p_dsdx != 0x0) p_dsdx->annule(l_min, l_max) ;
if (p_dsdy != 0x0) p_dsdy->annule(l_min, l_max) ;
if (p_dsdz != 0x0) p_dsdz->annule(l_min, l_max) ;
if (p_lap != 0x0) p_lap->annule(l_min, l_max) ;
if (p_integ != 0x0) delete p_integ ;
}
}
//------------//
// Assignment //
//------------//
// From Cmp
// --------
void Cmp::operator=(const Cmp& ci) {
assert(&ci != this) ; // pour eviter l'auto-affectation
// Menage general de la Valeur, mais pas des quantites derivees !
va.del_t() ;
// Les elements fixes
mp = ci.mp ;
dzpuis = ci.dzpuis ;
// La valeur eventuelle
switch(ci.etat) {
case ETATNONDEF: {
set_etat_nondef() ;
break ; // valeur par defaut
}
case ETATZERO: {
set_etat_zero() ;
break ;
}
case ETATQCQ: {
set_etat_qcq() ;
va = ci.va ;
// On detruit les quantites derivees (seulement lorsque tout est fini !)
del_deriv() ;
break ;
}
default: {
cout << "Unkwown state in Cmp::operator=(const Cmp&) !"
<< endl ;
abort() ;
break ;
}
}
}
// From Valeur
// -----------
void Cmp::operator=(const Valeur& vi) {
// Traitement de l'auto-affectation :
if (&vi == &va) {
return ;
}
// Protection
assert(vi.get_etat() != ETATNONDEF) ;
// Menage general de la Valeur, mais pas des quantites derivees !
va.del_t() ;
// La valeure eventuelle
switch(vi.get_etat()) {
case ETATZERO: {
set_etat_zero() ;
break ;
}
case ETATQCQ: {
set_etat_qcq() ;
va = vi ;
// On detruit les quantites derivees (seulement lorsque tout est fini !)
del_deriv() ;
break ;
}
default: {
cout << "Unkwown state in Cmp::operator=(const Valeur&) !" << endl ;
abort() ;
break ;
}
}
}
// From Mtbl
// ---------
void Cmp::operator=(const Mtbl& mi) {
// Protection
assert(mi.get_etat() != ETATNONDEF) ;
assert(&mi != va.c) ; // pour eviter l'auto-affectation
// Menage general de la Valeur, mais pas des quantites derivees !
va.del_t() ;
// La valeure eventuelle
switch(mi.get_etat()) {
case ETATZERO: {
set_etat_zero() ;
break ;
}
case ETATQCQ: {
set_etat_qcq() ;
va = mi ;
// On detruit les quantites derivees (seulement lorsque tout est fini !)
del_deriv() ;
break ;
}
default: {
cout << "Unkwown state in Cmp::operator=(const Mtbl&) !" << endl ;
abort() ;
break ;
}
}
}
// From double
// -----------
void Cmp::operator=(double x) {
if (x == double(0)) {
set_etat_zero() ;
}
else {
set_etat_qcq() ;
del_deriv() ;
va = x ;
}
dzpuis = 0 ;
}
// From int
// --------
void Cmp::operator=(int n) {
if (n == 0) {
set_etat_zero() ;
}
else {
set_etat_qcq() ;
del_deriv() ;
va = n ;
}
dzpuis = 0 ;
}
//------------//
// Sauvegarde //
//------------//
void Cmp::sauve(FILE* fd) const {
va.sauve(fd) ; // la valeur (en premier pour la construction
// lors de la lecture du fichier)
fwrite_be(&etat, sizeof(int), 1, fd) ; // l'etat
fwrite_be(&dzpuis, sizeof(int), 1, fd) ; // dzpuis
}
//------------//
// Impression //
//------------//
// Operator <<
// -----------
ostream& operator<<(ostream& o, const Cmp& ci) {
switch(ci.etat) {
case ETATNONDEF: {
o << "*** Cmp in UNDEFINED STATE" ;
break ;
}
case ETATZERO: {
o << "*** Cmp IDENTICALLY ZERO" ;
break ;
}
case ETATQCQ: {
o << "*** Cmp : " << endl ;
o << " dzpuis = " << ci.get_dzpuis() << endl ;
o << ci.va << endl ;
break ;
}
default: {
cout << "operator<<(ostream&, const Cmp&) : unknown state !"
<< endl ;
abort() ;
break ;
}
}
// Termine
return o ;
}
// affiche_seuil
//---------------
void Cmp::affiche_seuil(ostream& ost, int type, int precis,
double seuil) const {
ost << "*** Cmp " << endl ;
// Cas particuliers
//-----------------
if (etat == ETATNONDEF) {
ost << " state: UNDEFINED" << endl ;
return ;
}
if (etat == ETATZERO) {
ost << " state: ZERO" << endl ;
return ;
}
// Cas general : on affiche la Valeur
//------------
ost << " dzpuis = " << dzpuis << endl ;
va.affiche_seuil(ost, type, precis, seuil) ;
}
//------------------------------------//
// Spectral bases of the Valeur va //
//------------------------------------//
void Cmp::std_base_scal() {
va.std_base_scal() ;
}
//--------------------------//
// dzpuis manipulations //
//--------------------------//
void Cmp::set_dzpuis(int dzi) {
dzpuis = dzi ;
}
bool Cmp::dz_nonzero() const {
assert(etat != ETATNONDEF) ;
const Mg3d* mg = mp->get_mg() ;
int nzm1 = mg->get_nzone() - 1;
if (mg->get_type_r(nzm1) != UNSURR) {
return false ;
}
if (etat == ETATZERO) {
return false ;
}
assert(etat == ETATQCQ) ;
if (va.etat == ETATZERO) {
return false ;
}
assert(va.etat == ETATQCQ) ;
if (va.c != 0x0) {
if ( (va.c)->get_etat() == ETATZERO ) {
return false ;
}
assert( (va.c)->get_etat() == ETATQCQ ) ;
if ( (va.c)->t[nzm1]->get_etat() == ETATZERO ) {
return false ;
}
else {
assert( (va.c)->t[nzm1]->get_etat() == ETATQCQ ) ;
return true ;
}
}
else{
assert(va.c_cf != 0x0) ;
if ( (va.c_cf)->get_etat() == ETATZERO ) {
return false ;
}
assert( (va.c_cf)->get_etat() == ETATQCQ ) ;
if ( (va.c_cf)->t[nzm1]->get_etat() == ETATZERO ) {
return false ;
}
else {
assert( (va.c_cf)->t[nzm1]->get_etat() == ETATQCQ ) ;
return true ;
}
}
}
bool Cmp::check_dzpuis(int dzi) const {
if (dz_nonzero()) { // the check must be done
return (dzpuis == dzi) ;
}
else{
return true ;
}
}
//-----------------------------------------------//
// Value at an arbitrary point //
//-----------------------------------------------//
double Cmp::val_point(double r, double theta, double phi) const {
assert(etat != ETATNONDEF) ;
if (etat == ETATZERO) {
return double(0) ;
}
assert(etat == ETATQCQ) ;
// 1/ Search for the domain and the grid coordinates (xi,theta',phi')
// which corresponds to the point (r,theta,phi)
int l ;
double xi ;
mp->val_lx(r, theta, phi, l, xi) ; // call of val_lx with default
// accuracy parameters
// 2/ Call to the Valeur version
return va.val_point(l, xi, theta, phi) ;
}
//-------------------------------------//
// Multipolar spectrum //
//-------------------------------------//
Tbl Cmp::multipole_spectrum() {
assert (etat != ETATNONDEF) ;
const Mg3d* mg = mp->get_mg() ;
int nzone = mg->get_nzone() ;
int lmax = 0 ;
for (int lz=0; lz<nzone; lz++)
lmax = (lmax < 2*mg->get_nt(lz) - 1 ? 2*mg->get_nt(lz) - 1 : lmax) ;
Tbl resu(nzone, lmax) ;
if (etat == ETATZERO) {
resu.set_etat_zero() ;
return resu ;
}
assert(etat == ETATQCQ) ;
va.coef() ;
va.ylm() ;
resu.annule_hard() ;
const Base_val& base = va.c_cf->base ;
int m_quant, l_quant, base_r ;
for (int lz=0; lz<nzone; lz++)
for (int k=0 ; k<mg->get_np(lz) ; k++)
for (int j=0 ; j<mg->get_nt(lz) ; j++) {
if (nullite_plm(j, mg->get_nt(lz), k, mg->get_np(lz), base) == 1)
{
// quantic numbers and spectral bases
donne_lm(nzone, lz, j, k, base, m_quant, l_quant, base_r) ;
for (int i=0; i<mg->get_nr(lz); i++) resu.set(lz, l_quant)
+= fabs((*va.c_cf)(0, k, j, i)) ;
}
}
return resu ;
}
}
Lorene::Base_val
Bases of the spectral expansions.
Definition base_val.h:322
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::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::p_srdsdt
Cmp * p_srdsdt
Pointer on of *this.
Definition cmp.h:472
Lorene::Cmp::operator=
void operator=(const Cmp &a)
Assignment to another Cmp defined on the same mapping.
Definition cmp.C:398
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::va
Valeur va
The numerical value of the Cmp.
Definition cmp.h:464
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::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::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition cmp.C:304
Lorene::Cmp::get_dzpuis
int get_dzpuis() const
Returns dzpuis.
Definition cmp.h:903
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_etat_zero
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition cmp.C:289
Lorene::Cmp::set_dzpuis
void set_dzpuis(int)
Set a value to dzpuis.
Definition cmp.C:654
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::p_dsdr
Cmp * p_dsdr
Pointer on of *this.
Definition cmp.h:470
Lorene::Cmp::del_deriv
void del_deriv()
Logical destructor of the derivatives.
Definition cmp.C:265
Lorene::Cmp::set_der_0x0
void set_der_0x0()
Sets the pointers for derivatives to 0x0.
Definition cmp.C:276
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::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::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::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::p_dsdz
Cmp * p_dsdz
Pointer on of *this , where .
Definition cmp.h:489
Lorene::Mg3d
Multi-domain grid.
Definition grilles.h:273
Lorene::Mg3d::get_np
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition grilles.h:462
Lorene::Mg3d::get_nt
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition grilles.h:457
Lorene::Mg3d::get_nzone
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
Lorene::Mg3d::get_nr
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition grilles.h:452
Lorene::Mg3d::get_type_r
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition grilles.h:474
Lorene::Mtbl
Multi-domain array.
Definition mtbl.h:118
Lorene::Mtbl::get_etat
int get_etat() const
Gives the logical state.
Definition mtbl.h:277
Lorene::Mtbl::t
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
Definition mtbl.h:132
Lorene::Mtbl::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition mtbl.C:299
Lorene::Mtbl::get_nzone
int get_nzone() const
Gives the number of zones (domains).
Definition mtbl.h:280
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Tbl::annule_hard
void annule_hard()
Sets the Tbl to zero in a hard way.
Definition tbl.C:372
Lorene::Tbl::set_etat_zero
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition tbl.C:347
Lorene::Tbl::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tbl.C:361
Lorene::Tbl::set
double & set(int i)
Read/write of a particular element (index i) (1D case).
Definition tbl.h:281
Lorene::Valeur
Values and coefficients of a (real-value) function.
Definition valeur.h:287
Lorene::Valeur::get_etat
int get_etat() const
Returns the logical state.
Definition valeur.h:726
Lorene::fread_be
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Definition fread_be.C:69
Lorene::fwrite_be
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Definition fwrite_be.C:70
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::get_mg
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition map.h:765
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