26char scalar_raccord_zec_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_raccord_zec.C,v 1.8 2014/10/13 08:53:47 j_novak Exp $" ;
70#include "utilitaires.h"
81 if ((
etat == ETATZERO) || (
etat == ETATUN))
87 cout <<
"Le mapping doit etre affine" <<
endl ;
91 int nz = map->
get_mg()->get_nzone() ;
92 int nr = map->
get_mg()->get_nr (nz-1) ;
93 int nt = map->
get_mg()->get_nt (nz-1) ;
94 int np = map->
get_mg()->get_np (nz-1) ;
97 double r_cont = -1./2./alpha ;
103 int*
deg =
new int[3] ;
105 double*
auxi =
new double[nr] ;
108 for (
int i=0 ;
i<nr ;
i++)
112 for (
int i=0 ;
i<nr ;
i++)
122 double*
res_val =
new double[1] ;
128 courant.va.c_cf->t[nz-1]->annule_hard() ;
130 int base_r =
courant.va.base.get_base_r(nz-2) ;
131 for (
int k=0 ;
k<np+1 ;
k++)
132 for (
int j=0 ;
j<nt ;
j++)
133 if (nullite_plm(
j, nt,
k, np,
courant.va.base) == 1) {
135 for (
int i=0 ;
i<nr ;
i++)
143 cout <<
"Cas non prevu dans raccord_zec" <<
endl ;
150 copie.dec_dzpuis(2) ;
166 for (
int k=0 ;
k<np+1 ;
k++)
167 for (
int j=0 ;
j<nt ;
j++)
168 if (nullite_plm(
j, nt,
k, np,
va.
base) == 1) {
170 donne_lm (nz, nz-1,
j,
k, base,
m_quant, l_quant, base_r) ;
197 for (
int i=0 ;
i<nr ;
i++)
201 else for (
int i=0 ;
i<nr ;
i++)
222 int nz =
mgrid.get_nzone() ;
237 cout <<
"Scalar::smooth_decay: present version supports only \n"
238 <<
" affine mappings !" <<
endl ;
257 int nbt1[] = {1, 1} ;
258 int nbp1[] = {1, 1} ;
275 uu.std_spectral_base() ;
284 for (
int k=0;
k<=np;
k++) {
285 for (
int j=0;
j<nt;
j++) {
287 if (nullite_plm(
j, nt,
k, np, base) != 1) {
297 int nn0 = l_quant + nn ;
300 uu.va.set_etat_cf_qcq() ;
301 uu.va.c_cf->set_etat_qcq() ;
302 uu.va.c_cf->t[0]->set_etat_qcq() ;
303 uu.va.c_cf->t[1]->set_etat_qcq() ;
305 uu.va.c_cf->t[0]->set(0, 0,
i) =
307 uu.va.c_cf->t[0]->set(1, 0,
i) = 0. ;
308 uu.va.c_cf->t[0]->set(2, 0,
i) = 0. ;
311 uu.va.c_cf->t[1]->set_etat_zero() ;
323 for (
int p=1;
p<=kk;
p++) {
335 for (
int im=0;
im<=kk;
im++) {
337 double fact = (
im%2 == 0) ? 1. : -1. ;
340 for (
int jm=0;
jm<=kk;
jm++) {
355 mat.set_band(kk+1, kk+1) ;
363 for (
int p=0;
p<=kk;
p++) {
367 vv.va.set_base(
uu.va.get_base() ) ;
374 if (
vv.get_etat() == ETATZERO) {
404 for (
int p=0;
p<=kk;
p++) {
407 for (
int k=0;
k<np;
k++) {
408 for (
int j=0;
j<nt;
j++) {
415 "Scalar::smooth_decay: Max error matching of " <<
p
416 <<
"-th derivative: " <<
err <<
endl ;
Bases of the spectral expansions.
Active physical coordinates and mapping derivatives.
Time evolution with partial storage (*** under development ***).
const double * get_alpha() const
Returns the pointer on the array alpha.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
Tensor field of valence 0 (or component of a tensorial field).
friend Scalar cos(const Scalar &)
Cosine.
void smooth_decay(int k, int n)
Performs a matching of the last non-compactified shell with a decaying function where is the spher...
int etat
The logical state ETATNONDEF (undefined), ETATZERO (null), ETATUN (one), or ETATQCQ (ordinary).
void set_dzpuis(int)
Modifies the dzpuis flag.
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...
friend Scalar pow(const Scalar &, int)
Power .
Valeur va
The numerical value of the Scalar
void annule_hard()
Sets the Tbl to zero in a hard way.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
const Base_val & get_base() const
Return the bases for spectral expansions (member base )
int get_etat() const
Returns the logical state.
void ylm()
Computes the coefficients of *this.
Mtbl * c
Values of the function at the points of the multi-grid
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void coef() const
Computes the coeffcients of *this.
void ylm_i()
Inverse of ylm()
Base_val base
Bases on which the spectral expansion is performed.
#define R_CHEB
base de Chebychev ordinaire (fin)
const Map *const mp
Mapping on which the numerical values at the grid points are defined.