168 for (
int i_met = 0; i_met < N_MET_MAX; i_met++) {
173 assert ((jp>=0) && (jp<N_MET_MAX)) ;
181 assert ((jp>=0) && (jp<N_MET_MAX)) ;
197 :
Tensor_sym(*source.mp, 2, source.type_indice, *(source.triad),
202 for (
int ic=0 ; ic<
n_comp ; ic++) {
204 *(
cmp[ic]) = *(source.
cmp[posi]) ;
243 for (
int i_met = 0; i_met < N_MET_MAX; i_met++) {
248 assert ((jp>=0) && (jp<N_MET_MAX)) ;
256 assert ((jp>=0) && (jp<N_MET_MAX)) ;
291 for (
int i=0; i<N_MET_MAX; i++)
310 for (
int i=0; i<N_MET_MAX; i++)
325 assert( (j>=0) && (j<N_MET_MAX) ) ;
340 assert( (i>=0) && (i<N_MET_MAX) ) ;
357 assert(pvect != 0x0) ;
392 int l_up, l_down, c_left, c_right ;
396 for (
int i=1 ; i<=3 ; i++) {
398 for (
int j=i ; j<=3 ; j++) {
441 res->
set(i, j) = cofacteur ;
452 for (
int i=0; i<
n_comp; i++)
457 srr_tmp.exponential_filter_r(lzmin, lzmax, p, alpha) ;
470 set_auxiliary(srr_tmp, eta_tmp, mu_tmp, w_tmp, x_tmp, t_tmp) ;
477 for (
int i=0; i<
n_comp; i++)
482 srr_tmp.exponential_filter_ylm(lzmin, lzmax, p, alpha) ;
495 set_auxiliary(srr_tmp, eta_tmp, mu_tmp, w_tmp, x_tmp, t_tmp) ;
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_ylm )...
Scalar * p_mu
Field such that the components of the tensor are written (has only meaning with spherical component...
Metric for tensor calculation.
const Scalar & mu(Param *par=0x0) const
Gives the field (see member p_mu ).
int n_comp
Number of stored components, depending on the symmetry.
Scalar * p_tilde_b
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
virtual void operator=(const Tensor_sym &a)
Assignment to another Tensor_sym.
Sym_tensor * inverse() const
Returns a pointer on the inverse of the Sym_tensor (seen as a matrix).
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies exponential filters to all components (see Scalar::exponential_filter_r ).
virtual void del_derive_met(int) const
Logical destructor of the derivatives depending on the i-th element of met_depend ...
void set_dependance(const Metric &) const
To be used to describe the fact that the derivatives members have been calculated with met ...
virtual void del_derive_met(int i) const
Logical destructor of the derivatives depending on the i-th element of met_depend specific to the cla...
Tensor field of valence 0 (or component of a tensorial field).
const Scalar & xxx() const
Gives the field X (see member p_xxx ).
Base class for coordinate mappings.
virtual Itbl indices(int pos) const
Returns the indices of a component given by its position in the array cmp .
Basic integer array class.
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the radial direction.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
Scalar * p_www
Field W such that the components and of the tensor are written (has only meaning with spherical com...
virtual void operator=(const Sym_tensor &a)
Assignment to another Sym_tensor.
int get_place_met(const Metric &) const
Returns the position of the pointer on metre in the array met_depend .
Tensor field of valence 1.
Vectorial bases (triads) with respect to which the tensorial components are defined.
Sym_tensor(const Map &map, const Itbl &tipe, const Base_vect &triad_i)
Standard constructor.
const Scalar & ttt() const
Gives the field T (see member p_ttt ).
void set_der_0x0() const
Sets the pointers on derived quantities to 0x0.
Scalar * p_eta
Field such that the components of the tensor are written (has only meaning with spherical component...
Scalar * p_aaa
Field A defined from X and insensitive to the longitudinal part of the Sym_tensor (only for )...
const Scalar & www() const
Gives the field W (see member p_www ).
void div_r()
Division by r everywhere; dzpuis is not changed.
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
Itbl type_indice
1D array of integers (class Itbl ) of size valence containing the type of each index: COV for a cova...
virtual void del_deriv() const
Deletes the derived quantities.
virtual int position(const Itbl &ind) const
Returns the position in the array cmp of a component given by its indices.
void compute_derive_lie(const Vector &v, Tensor &resu) const
Computes the Lie derivative of this with respect to some vector field v (protected method; the public...
virtual ~Sym_tensor()
Destructor.
Scalar ** cmp
Array of size n_comp of pointers onto the components.
Scalar * p_xxx
Field X such that the components and of the tensor are written (has only meaning with spherical com...
Vector * p_longit_pot[N_MET_MAX]
Array of the vector potential of the longitudinal part of the tensor with respect to various metrics ...
virtual int identify() const =0
Returns a number to identify the sub-classe of Base_vect the object belongs to.
Scalar * p_tilde_c
Field defined from and h insensitive to the longitudinal part of the Sym_tensor.
void set_der_met_0x0(int i) const
Sets all the i-th components of met_depend specific to the class Sym_tensor (p_transverse ...
Transverse symmetric tensors of rank 2.
const Tensor & divergence(const Metric &gam) const
Computes the divergence of this with respect to some metric .
virtual const Scalar & eta(Param *par=0x0) const
Gives the field (see member p_eta ).
virtual void del_deriv() const
Deletes the derived quantities.
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 ...
int valence
Valence of the tensor (0 = scalar, 1 = vector, etc...)
Scalar * p_ttt
Field T defined as .
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
const Metric * met_depend[N_MET_MAX]
Array on the Metric 's which were used to compute derived quantities, like p_derive_cov ...
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
const Scalar & operator()(const Itbl &ind) const
Returns the value of a component (read-only version).
Symmetric tensors (with respect to two of their arguments).
virtual void exponential_filter_ylm(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the angular directions.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Sym_tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
Class intended to describe valence-2 symmetric tensors.
Sym_tensor_trans * p_transverse[N_MET_MAX]
Array of the transverse part of the tensor with respect to various metrics, transverse meaning diver...