126 bool verbose)
const {
127 assert (lambda != -1) ;
136 assert (
etat != ETATNONDEF) ;
139 if (
etat == ETATZERO) {
144 for (
int i=0; i<3; i++) {
154 for (
int i=0 ; i<3 ; i++)
155 assert ((*
this)(i).check_dzpuis(4)) ;
158 for (
int i=0 ; i<3 ; i++) {
161 (*this)(i).poisson(*par, vecteur.
set(i), verbose) ;
171 assert (source_scal().check_dzpuis(3)) ;
175 source_scal().poisson(*par, scalaire.
set(), verbose) ;
196 for (
int i=0 ; i<3 ; i++)
197 shift.
set(i) = (lambda+2)/2/(lambda+1) * vecteur(i)
198 - (lambda/2/(lambda+1)) * (dxsi(i) + dp(i)) ;
229 assert (lambda != -1) ;
236 assert (
etat != ETATNONDEF) ;
239 if (
etat == ETATZERO) {
246 for (
int i=0 ; i<3 ; i++)
247 assert ((*
this)(i).check_dzpuis(3) ||
248 (*
this)(i).check_dzpuis(4)) ;
253 if ((*
this)(0).check_dzpuis(4))
263 source_scal().poisson(*par, chi.
set());
268 if ((*
this)(0).check_dzpuis(4))
273 for (
int i=0 ; i<3 ; i++)
274 source_vect.
set(i) -= lambda*chi_grad(i) ;
279 for (
int i=0 ; i<3 ; i++)
283 for (
int i=0 ; i<3 ; i++) {
285 source_vect(i).poisson(*par, shift.
set(i)) ;
313 void Tenseur::poisson_vect_tau(
double lambda,
Param& para,
Tenseur& shift
315 assert (lambda != -1) ;
324 assert (
etat != ETATNONDEF) ;
327 if (
etat == ETATZERO) {
332 for (
int i=0; i<3; i++) {
342 for (
int i=0 ; i<3 ; i++)
343 assert ((*
this)(i).check_dzpuis(4)) ;
346 for (
int i=0 ; i<3 ; i++) {
349 (*this)(i).poisson_tau(*par, vecteur.
set(i)) ;
359 assert (source_scal().check_dzpuis(3)) ;
363 source_scal().poisson_tau(*par, scalaire.
set()) ;
370 Tenseur dxsi (auxiliaire.gradient()) ;
384 for (
int i=0 ; i<3 ; i++)
385 shift.
set(i) = (lambda+2)/2/(lambda+1) * vecteur(i)
386 - (lambda/2/(lambda+1)) * (dxsi(i) + dp(i)) ;
395 Tenseur Tenseur::poisson_vect_tau(
double lambda, Tenseur& vecteur,
396 Tenseur& scalaire)
const {
400 resu.set_etat_qcq() ;
401 poisson_vect_tau(lambda, bidon, resu, vecteur, scalaire) ;
413 void Tenseur::poisson_vect_oohara_tau(
double lambda, Param& para, Tenseur& shift,
414 Tenseur& chi)
const {
417 assert (lambda != -1) ;
421 assert (shift.get_valence() == 1) ;
422 assert (shift.get_type_indice(0) ==
type_indice(0)) ;
423 assert (chi.get_valence() == 0) ;
424 assert (
etat != ETATNONDEF) ;
427 if (
etat == ETATZERO) {
428 shift.set_etat_zero() ;
434 for (
int i=0 ; i<3 ; i++)
435 assert ((*
this)(i).check_dzpuis(3) ||
436 (*
this)(i).check_dzpuis(4)) ;
440 copie.dec2_dzpuis() ;
441 if ((*
this)(0).check_dzpuis(4))
442 copie.dec2_dzpuis() ;
447 source_scal.inc2_dzpuis() ;
451 source_scal().poisson_tau(*par, chi.set());
457 if ((*
this)(0).check_dzpuis(4))
458 source_vect.dec_dzpuis() ;
460 Tenseur chi_grad (chi.gradient()) ;
461 chi_grad.inc_dzpuis() ;
463 for (
int i=0 ; i<3 ; i++)
464 source_vect.set(i) -= lambda*chi_grad(i) ;
466 assert( *(source_vect.triad) == *((chi.gradient()).
get_triad()) ) ;
468 for (
int i=0 ; i<3 ; i++) {
471 source_vect(i).poisson_tau(*par, shift.set(i)) ;
476 shift.set_triad( *(source_vect.triad) ) ;
483 Tenseur Tenseur::poisson_vect_oohara_tau(
double lambda, Tenseur& scalaire)
const {
487 resu.set_etat_qcq() ;
488 poisson_vect_oohara_tau(lambda, bidon, resu, scalaire) ;
Itbl type_indice
Array of size valence contening the type of each index, COV for a covariant one and CON for a contrav...
const Map *const mp
Reference mapping.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
int get_type_indice(int i) const
Returns the type of the index number i .
void dec2_dzpuis()
dzpuis -= 2 ;
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
void poisson_vect_oohara(double lambda, Param &par, Tenseur &shift, Tenseur &scal) const
Solves the vectorial Poisson equation .
int etat
Logical state ETATZERO , ETATQCQ or ETATNONDEF.
void inc_dzpuis()
dzpuis += 1 ;
void inc2_dzpuis()
dzpuis += 2 ;
int get_valence() const
Returns the valence.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
double poids
For tensor densities: the weight.
int get_etat() const
Returns the logical state.
friend Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
virtual Param * donne_para_poisson_vect(Param ¶, int i) const =0
Function intended to be used by Map::poisson_vect and Map::poisson_vect_oohara .
friend Tenseur skxk(const Tenseur &)
Contraction of the last index of (*this) with or , depending on the type of S .
Tenseur(const Map &map, const Metrique *met=0x0, double weight=0)
Constructor for a scalar field.
void dec_dzpuis()
dzpuis -= 1 ;
const Metrique * metric
For tensor densities: the metric defining the conformal factor.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
void poisson_vect(double lambda, Param &par, Tenseur &shift, Tenseur &vect, Tenseur &scal, bool verbose=true) const
Solves the vectorial Poisson equation : .