30char sym_tensor__aux_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/sym_tensor_aux.C,v 1.15 2014/10/13 08:53:43 j_novak Exp $" ;
129 if (
dynamic_cast<const Map_af*
>(
mp) != 0x0) {
171 if (
dynamic_cast<const Map_af*
>(
mp) != 0x0) {
197 p_ttt =
new Scalar(
operator()(2,2) +
operator()(3,3) ) ;
272 int dzp =
trr.get_dzpuis() ;
273 int dzeta = (
dzp == 0 ? 0 :
dzp - 1) ;
291 tmp.set_spectral_va().ylm_i() ;
294 tmp.set_spectral_va().ylm_i() ;
323 int dzp =
xxx().get_dzpuis() ;
337 if (
dynamic_cast<const Map_af*
>(
mp) != 0x0) {
384 if (
dynamic_cast<const Map_af*
>(
mp) != 0x0) {
393 dwdr.set_spectral_va().ylm() ;
396 wsr.set_spectral_va().ylm() ;
399 etasr2.set_spectral_va().ylm() ;
401 dtdr.set_spectral_va().ylm() ;
404 tsr.set_spectral_va().ylm() ;
407 hrrsr.set_spectral_va().ylm() ;
409 int nz =
mp->get_mg()->get_nzone() ;
413 if (
wsr.get_etat() != ETATZERO) {
414 base =
wsr.get_spectral_base() ;
417 if (
etasr2.get_etat() != ETATZERO) {
418 base =
etasr2.get_spectral_base() ;
421 if (
tsr.get_etat() != ETATZERO) {
422 base =
tsr.get_spectral_base() ;
425 if (
hrrsr.get_etat() != ETATZERO) {
426 base =
hrrsr.get_spectral_base() ;
440 if (
dwdr.get_etat() == ETATZERO)
dwdr.annule_hard() ;
441 if (
wsr.get_etat() == ETATZERO)
wsr.annule_hard() ;
442 if (
etasr2.get_etat() == ETATZERO)
etasr2.annule_hard() ;
443 if (
dtdr.get_etat() == ETATZERO)
dtdr.annule_hard() ;
444 if (
tsr.get_etat() == ETATZERO)
tsr.annule_hard() ;
445 if (
hrrsr.get_etat() == ETATZERO)
hrrsr.annule_hard() ;
448 for (
int lz=0;
lz<nz;
lz++) {
449 int np =
mp->get_mg()->get_np(
lz) ;
450 int nt =
mp->get_mg()->get_nt(
lz) ;
451 int nr =
mp->get_mg()->get_nr(
lz) ;
452 for (
int k=0;
k<np+1;
k++)
453 for (
int j=0;
j<nt;
j++) {
455 if ( (nullite_plm(
j, nt,
k, np, base) == 1) && (
l_q > 1))
457 for (
int i=0;
i<nr;
i++)
481 if (
resu.get_etat() == ETATZERO)
return resu ;
489 if (
hsr.get_etat() == ETATZERO)
return resu ;
491 dhdr.set_spectral_va().ylm() ;
493 hsr.set_spectral_va().ylm() ;
495 int nz =
mp->get_mg()->get_nzone() ;
499 if (
dhdr.get_etat() == ETATZERO)
dhdr.annule_hard() ;
502 for (
int lz=0;
lz<nz;
lz++) {
503 int np =
mp->get_mg()->get_np(
lz) ;
504 int nt =
mp->get_mg()->get_nt(
lz) ;
505 int nr =
mp->get_mg()->get_nr(
lz) ;
506 for (
int k=0;
k<np+1;
k++)
507 for (
int j=0;
j<nt;
j++) {
509 if ( (nullite_plm(
j, nt,
k, np, base) == 1) && (
l_q > 1))
511 for (
int i=0;
i<nr;
i++)
512 resu.set_spectral_va().c_cf->set(
lz,
k,
j,
i)
513 -= 0.5*(*
hsr.get_spectral_va().c_cf)(
lz,
k,
j,
i)
519 if (
resu.set_spectral_va().c != 0x0)
520 delete resu.set_spectral_va().c ;
521 resu.set_spectral_va().c = 0x0 ;
525 else resu.set_spectral_va().ylm_i() ;
538 if (
resu.get_etat() == ETATZERO) {
539 if (
tras.get_etat() == ETATZERO)
return resu ;
544 resu.set_spectral_base(base) ;
547 resu.set_spectral_va().ylm() ;
552 if (
hsr.get_etat() == ETATZERO)
return resu ;
555 if (
dhdr.get_etat() == ETATZERO)
dhdr.annule_hard() ;
556 dhdr.set_spectral_va().ylm() ;
558 hsr.set_spectral_va().ylm() ;
560 int nz =
mp->get_mg()->get_nzone() ;
564 for (
int lz=0;
lz<nz;
lz++) {
565 if ((*
resu.get_spectral_va().c_cf)(
lz).get_etat() == ETATZERO)
566 resu.get_spectral_va().c_cf->set(
lz).annule_hard() ;
567 int np =
mp->get_mg()->get_np(
lz) ;
568 int nt =
mp->get_mg()->get_nt(
lz) ;
569 int nr =
mp->get_mg()->get_nr(
lz) ;
570 for (
int k=0;
k<np+1;
k++)
571 for (
int j=0;
j<nt;
j++) {
573 if ( (nullite_plm(
j, nt,
k, np, base) == 1) && (
l_q > 1))
575 for (
int i=0;
i<nr;
i++)
576 resu.set_spectral_va().c_cf->set(
lz,
k,
j,
i)
577 += 0.5*(*
hsr.get_spectral_va().c_cf)(
lz,
k,
j,
i)
583 if (
resu.set_spectral_va().c != 0x0)
584 delete resu.set_spectral_va().c ;
585 resu.set_spectral_va().c = 0x0 ;
618 if (
dynamic_cast<const Map_af*
>(
mp) != 0x0) {
627 dwdr.set_spectral_va().ylm() ;
630 wsr.set_spectral_va().ylm() ;
633 etasr2.set_spectral_va().ylm() ;
635 dtdr.set_spectral_va().ylm() ;
638 tsr.set_spectral_va().ylm() ;
641 hrrsr.set_spectral_va().ylm() ;
643 int nz =
mp->get_mg()->get_nzone() ;
647 if (
wsr.get_etat() != ETATZERO) {
648 base =
wsr.get_spectral_base() ;
651 if (
etasr2.get_etat() != ETATZERO) {
652 base =
etasr2.get_spectral_base() ;
655 if (
tsr.get_etat() != ETATZERO) {
656 base =
tsr.get_spectral_base() ;
659 if (
hrrsr.get_etat() != ETATZERO) {
660 base =
hrrsr.get_spectral_base() ;
674 if (
dwdr.get_etat() == ETATZERO)
dwdr.annule_hard() ;
675 if (
wsr.get_etat() == ETATZERO)
wsr.annule_hard() ;
676 if (
etasr2.get_etat() == ETATZERO)
etasr2.annule_hard() ;
677 if (
dtdr.get_etat() == ETATZERO)
dtdr.annule_hard() ;
678 if (
tsr.get_etat() == ETATZERO)
tsr.annule_hard() ;
679 if (
hrrsr.get_etat() == ETATZERO)
hrrsr.annule_hard() ;
682 for (
int lz=0;
lz<nz;
lz++) {
683 int np =
mp->get_mg()->get_np(
lz) ;
684 int nt =
mp->get_mg()->get_nt(
lz) ;
685 int nr =
mp->get_mg()->get_nr(
lz) ;
686 for (
int k=0;
k<np+1;
k++)
687 for (
int j=0;
j<nt;
j++) {
689 if ( (nullite_plm(
j, nt,
k, np, base) == 1) && (
l_q > 1))
691 for (
int i=0;
i<nr;
i++)
693 = - (
l_q - 1)*(*
dwdr.get_spectral_va().c_cf)(
lz,
k,
j,
i)
Bases of the spectral expansions.
void mult_x()
The basis is transformed as with a multiplication by .
void give_quant_numbers(int, int, int, int &, int &, int &) const
Computes the various quantum numbers and 1d radial base.
Spherical orthonormal vectorial bases (triads).
Time evolution with partial storage (*** under development ***).
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
Tensor field of valence 0 (or component of a tensorial field).
void annule_l(int l_min, int l_max, bool ylm_output=false)
Sets all the multipolar components between l_min and l_max to zero.
const Scalar & dsdt() const
Returns of *this .
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Scalar & stdsdp() const
Returns of *this .
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Valeur & set_spectral_va()
Returns va (read/write version)
void set_dzpuis(int)
Modifies the dzpuis flag.
void mult_r_dzpuis(int ced_mult_r)
Multiplication by r everywhere but with the output flag dzpuis set to ced_mult_r .
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
const Scalar & xxx() const
Gives the field X (see member p_xxx ).
const Scalar & compute_tilde_C(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_c ).
Scalar * p_ttt
Field T defined as .
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for ).
const Scalar & compute_A(bool output_ylm=true, Param *par=0x0) const
Gives the field A (see member p_aaa ).
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
Scalar * p_tilde_c
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
const Scalar & ttt() const
Gives the field T (see member p_ttt ).
virtual const Scalar & eta(Param *par=0x0) const
Gives the field (see member p_eta ).
const Scalar & www() const
Gives the field W (see member p_www ).
Scalar get_tilde_B_from_TT_trace(const Scalar &tilde_B_tt_in, const Scalar &trace) const
Computes (see Sym_tensor::p_tilde_b ) from its transverse-traceless part and the trace.
const Scalar & mu(Param *par=0x0) const
Gives the field (see member p_mu ).
virtual void del_deriv() const
Deletes the derived quantities.
Scalar compute_tilde_B_tt(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_b ) associated with the TT-part of the Sym_tensor .
Scalar * p_eta
Field such that the components of the tensor are written (has only meaning with spherical component...
Scalar * p_xxx
Field X such that the components and of the tensor are written (has only meaning with spherical com...
void set_auxiliary(const Scalar &trr, const Scalar &eta_over_r, const Scalar &mu_over_r, const Scalar &www, const Scalar &xxx, const Scalar &ttt)
Assigns the component and the derived members p_eta , p_mu , p_www, p_xxx and p_ttt ,...
Scalar * p_www
Field W such that the components and of the tensor are written (has only meaning with spherical com...
const Scalar & compute_tilde_B(bool output_ylm=true, Param *par=0x0) const
Gives the field (see member p_tilde_b ).
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
void ylm()
Computes the coefficients of *this.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void ylm_i()
Inverse of ylm()
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
const Scalar & operator()(const Itbl &ind) const
Returns the value of a component (read-only version).
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.