28char mtbl_cf_display_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_display.C,v 1.3 2014/10/13 08:53:08 j_novak Exp $" ;
58 ost <<
"Spectral expansion (Mtbl_cf, threshold for display = "
59 << thres <<
")" << endl ;
62 if (
etat == ETATNONDEF) {
63 ost <<
" state: UNDEFINED" << endl ;
67 if (
etat == ETATZERO) {
68 ost <<
" state: ZERO" << endl ;
72 ost.precision(precis);
73 ost.setf(ios::showpoint);
74 assert(
etat == ETATQCQ) ;
79 for (
int l=0; l<
nzone; l++) {
85 ost <<
" --------- Domain no. " << l <<
" ------- nr x nt x np = "
86 << nr <<
" x " << nt <<
" x " << np <<
" ------" << endl ;
87 const Tbl& tcf = *(
t[l]) ;
89 ost <<
"*** identically ZERO ***" << endl << endl ;
93 ost <<
"*** UNDEFINED ***" << endl << endl ;
96 assert( tcf.
get_etat() == ETATQCQ ) ;
98 for (
int k=0; k<=np; k++) {
100 if (namep[0] ==
'u') continue ;
102 for (
int j=0; j<nt; j++) {
104 bool test_display = false ;
105 for (
int i=0; i<nr; i++) {
106 if (fabs( tcf(k, j, i) ) >= thres) test_display = true ;
111 test_display = test_display && ( namet[0] !=
'u' ) ;
114 ost <<
"# " << namep <<
" " << namet <<
" :" ;
115 for (
int i=0; i<nr; i++) {
116 double cx = tcf(k, j, i) ;
117 if (fabs( cx ) >= thres) {
119 if (namer[0] ==
'u') continue ;
120 if ( (i>0) && (cx >= 0.) ) {
121 ost <<
" +" << setw(precis) << cx
125 ost <<
" " << setw(precis) << cx
void name_r(int l, int k, int j, int i, char *basename) const
Name of the basis function in r ( )
void name_phi(int l, int k, char *basename) const
Name of the basis function in .
void name_theta(int l, int k, int j, char *basename) const
Name of the basis function in .
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Base_val base
Bases of the spectral expansions.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
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...
int nzone
Number of domains (zones)
int get_etat() const
Gives the logical state.