32char valeur_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur.C,v 1.8 2014/10/13 08:53:49 j_novak Exp $" ;
190#include "utilitaires.h"
220 switch(
vc.get_etat()) {
242 if (
vc.c_cf != 0x0) {
255 cout <<
"Etat pas possible" <<
endl ;
269 "Valeur::Valeur(const Mg3d& g, FILE* fd): grid not consistent !"
277 if (
etat == ETATQCQ) {
376 cout <<
"Unkwon state in Valeur::operator=(const Valeur&) !"
391 assert(
mt.get_etat() != ETATNONDEF) ;
402 switch(
mt.get_etat()) {
419 cout <<
"Unkwon state in Valeur::operator=(const Mtbl&) !"
434 assert(
mt.get_etat() != ETATNONDEF) ;
445 switch(
mt.get_etat()) {
462 cout <<
"Unkwon state in Valeur::operator=(const Mtbl_cf&) !"
481 if (
etat == ETATQCQ) {
500 o <<
"*** Valeur in UNDEFINED STATE" ;
505 o <<
"*** Valeur IDENTICALLY ZERO" ;
511 o <<
"*** Valeur (configuration space) :" <<
endl ;
514 if (
vi.c_cf != 0x0) {
515 o <<
"*** Valeur (coefficients) :" <<
endl ;
522 cout <<
"operator<<(ostream&, const Valeur&) : unknown state !"
538 if (
etat == ETATNONDEF) {
539 ost <<
" state: UNDEFINED" <<
endl ;
543 if (
etat == ETATZERO) {
544 ost <<
" state: ZERO" <<
endl ;
559 double seuil)
const {
566 if (
etat == ETATNONDEF) {
567 ost <<
" state: UNDEFINED" <<
endl ;
571 if (
etat == ETATZERO) {
572 ost <<
" state: ZERO" <<
endl ;
579 ost <<
" Coefficients of the Valeur : " <<
endl ;
586 ost <<
" Values of the Valeur at the collocation points: " <<
endl ;
594 ost <<
" Coefficients of the Valeur : " <<
endl ;
596 ost <<
" Values of the Valeur at the collocation points: " <<
endl ;
602 cout <<
"Unknown type in Valeur::affiche_seuil !" <<
endl ;
764 if (
etat == ETATZERO ) {
888 if (
etat == ETATZERO) {
906 if (
etat == ETATZERO) {
926 int nz =
mg->get_nzone() ;
927 int nr =
mg->get_nr(0) ;
928 int nt =
mg->get_nt(0) ;
929 int np =
mg->get_np(0) ;
931 if (
etat != ETATZERO) {
936 for (
int k=0;
k<np+1;
k++)
937 for (
int j=0;
j<nt;
j++) {
939 if (nullite_plm(
j, nt,
k, np,
base) == 1) {
942 for (
int i=0;
i<nr;
i++)
Bases of the spectral expansions.
void sauve(FILE *) const
Save in a file.
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
void set_base_r(int l, int base_r)
Sets the expansion basis for r ( ) functions in a given domain.
void set_base_nondef()
Sets the spectral bases to NONDEF.
void set_base_p(int base_p)
Sets the expansion basis for functions in all domains.
Time evolution with partial storage (*** under development ***).
Coefficients storage for the multi-domain spectral method.
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Base_val base
Bases of the spectral expansions.
int get_etat() const
Returns the logical state.
void annule(int l_min, int l_max)
Sets the Mtbl_cf to zero in some domains.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void affiche_seuil(ostream &ostr, int precision=4, double threshold=1.e-7) const
Prints only the values greater than a given threshold.
void display(double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Prints the coefficients whose values are greater than a given threshold, as well as the corresponding...
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
void sauve(FILE *) const
Save in a file.
void annule(int l_min, int l_max)
Sets the Mtbl to zero in some domains.
void affiche_seuil(ostream &ostr, int precision=4, double threshold=1.e-7) const
Prints only the values greater than a given threshold.
void annule_hard()
Sets the Mtbl to zero in a hard way.
Values and coefficients of a (real-value) function.
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...
void del_t()
Logical destructor.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c ).
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Valeur * p_dsdp
Pointer on .
Valeur * p_mult_sp
Pointer on .
Valeur * p_mult_x
Pointer on .
Valeur * p_scost
Pointer on
Valeur * p_sx2
Pointer on .
Valeur * p_d2sdx2
Pointer on .
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Valeur * p_dsdx
Pointer on .
Valeur(const Mg3d &mgrid)
Constructor.
void nouveau()
Memory allocation.
void ylm()
Computes the coefficients of *this.
Valeur * p_d2sdt2
Pointer on .
Mtbl * c
Values of the function at the points of the multi-grid
Valeur * p_mult_cp
Pointer on .
void display_coef(double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Displays the spectral coefficients and the associated basis functions.
void annule(int l)
Sets the Valeur to zero in a given domain.
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
void operator=(const Valeur &a)
Assignement to another Valeur.
void std_base_scal_odd()
Sets the bases for spectral expansions (member base ) to the standard odd ones for a scalar.
Valeur * p_sx
Pointer on .
void coef_i() const
Computes the physical value of *this.
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.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
Valeur * p_ssint
Pointer on .
void set_der_0x0()
Sets the pointers for derivatives to 0x0.
Valeur * p_stdsdp
Pointer on .
void set_base_r(int l, int base_r)
Sets the expansion basis for r ( ) functions in a given domain.
Valeur * p_dsdt
Pointer on .
Valeur * p_lapang
Pointer on the angular Laplacian.
Base_val base
Bases on which the spectral expansion is performed.
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
void annule_hard()
Sets the Valeur to zero in a hard way.
Valeur * p_mult_ct
Pointer on .
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
void set_base_p(int base_p)
Sets the expansion basis for functions in all domains.
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Valeur * p_d2sdp2
Pointer on .
Valeur * p_mult_st
Pointer on .
void del_deriv()
Logical destructor of the derivatives.
void sauve(FILE *) const
Save in a file.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
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.