105 assert(dynamic_cast<const Base_vect_spher*>(
triad) != 0x0) ;
108 assert( mpaff!= 0x0) ;
117 double* bornes =
new double[nz+1] ;
119 const double* bet = mpaff->
get_beta() ;
120 for (
int lz=0; lz<nz; lz++) {
121 assert (gri.
get_np(lz) == np) ;
122 assert (gri.
get_nt(lz) == nt) ;
125 bornes[lz] = bet[lz] ;
129 bornes[lz] = bet[lz] - alp[lz] ;
133 bornes[lz] = double(1) / ( bet[lz] - alp[lz] ) ;
137 cout <<
"Sym_tensor_trans::poisson() : problem with the grid!" 145 bornes[nz] = 1./(alp[nz-1] + bet[nz-1]) ;
147 bornes[nz] = alp[nz-1] + bet[nz-1] ;
151 int np2 = ( np > 3 ? np : 4 ) ;
154 for (
int l=1; l<=3; l++)
155 for (
int c=l; c<=3; c++) {
156 switch (this->
operator()(l,c).get_etat() ) {
158 sou_cart.set(l,c).set_etat_zero() ;
162 sou_cart.set(l,c).set_etat_one() ;
166 sou_cart.set(l,c).allocate_all() ;
167 for (
int lz=0; lz<nz; lz++)
168 for (
int k=0; k<np2; k++)
169 for (
int j=0; j<nt; j++)
170 for(
int i=0; i<gr2.
get_nr(lz); i++)
171 sou_cart.set(l,c).set_grid_point(lz, k, j, i)
177 "Sym_tensor_trans::poisson() : source in undefined state!" 183 sou_cart.set(l,c).set_dzpuis(this->
operator()(l,c).get_dzpuis()) ;
185 sou_cart.std_spectral_base() ;
188 for (
int i=1; i<=3; i++)
189 for(
int j=i; j<=3; j++)
193 Scalar res_B(*
mp) ;
Scalar big_B = res_cart.compute_tilde_B_tt() ;
206 for (
int lz=0; lz<nz; lz++)
207 for (
int k=0; k<np; k++)
208 for (
int j=0; j<nt; j++)
209 for(
int i=0; i<gri.
get_nr(lz); i++)
216 "Sym_tensor_trans::poisson() : res_A in undefined state!" 237 for (
int lz=0; lz<nz; lz++)
238 for (
int k=0; k<np; k++)
239 for (
int j=0; j<nt; j++)
240 for(
int i=0; i<gri.
get_nr(lz); i++)
247 "Sym_tensor_trans::poisson() : res_B in undefined state!" 267 for (
int i=1; i<=3; i++)
268 for(
int j=i; j<=3; j++)
273 resu.
set_AtBtt_det_one(res_cart.compute_A(), res_cart.compute_tilde_B_tt(), h_guess) ;
279 maxabs(dive,
"Sym_tensor_trans::poisson : divergence of the solution") ;
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
const Mg3d * get_non_axi() const
Returns the pointer on the grid which has at least 4 points in the direction and at least 5 in the ...
Tbl maxabs(const Tensor &aa, const char *comment=0x0, ostream &ost=cout, bool verb=true)
Maxima in each domain of the absolute values of the tensor components.
const double * get_alpha() const
Returns the pointer on the array alpha.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
const Metric *const met_div
Metric with respect to which the divergence and the trace are defined.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tensor field of valence 0 (or component of a tensorial field).
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar poisson() const
Solves the scalar Poisson equation with *this as a source.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Tensor field of valence 1.
void set_dzpuis(int)
Modifies the dzpuis flag.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
void set_AtBtt_det_one(const Scalar &a_in, const Scalar &tbtt_in, const Scalar *h_prev=0x0, Param *par_bc=0x0, Param *par_mat=0x0, double precis=1.e-14, int it_max=100)
Assigns the derived member A and computes from its TT-part (see Sym_tensor::compute_tilde_B_tt() )...
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
int get_dzpuis() const
Returns dzpuis.
const double * get_beta() const
Returns the pointer on the array beta.
void set_etat_one()
Sets the logical state to ETATUN (one).
int get_nzone() const
Returns the number of domains.
Transverse symmetric tensors of rank 2.
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Sym_tensor_trans poisson(const Scalar *h_guess=0x0) const
Computes the solution of a tensorial transverse Poisson equation with *this as a source: In particu...
const Scalar & operator()(const Itbl &ind) const
Returns the value of a component (read-only version).
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Class intended to describe valence-2 symmetric tensors.