83 assert(
triad != 0x0) ;
91 assert((nbvc != 0x0) || (nbvs != 0x0)) ;
96 assert((bvc != 0x0) || (bvs != 0x0)) ;
102 assert(nbvs == 0x0) ;
125 set(1, 3) = - copie(1, 3) ;
126 set(2, 3) = - copie(2, 3) ;
127 set(3, 1) = - copie(3, 1) ;
128 set(3, 2) = - copie(3, 2) ;
135 "Tensor::change_basis : general value of rot_phi " 136 <<
" not contemplated yet, sorry !" << endl ;
143 "Tensor::change_basis : unexpected value of ind !" << endl ;
144 cout <<
" ind = " << ind << endl ;
170 for (
int i=0; i<nz; i++) {
178 for (
int i=1; i<=3; i++) {
180 operator()(3,i), tmp.
set(1,i)) ;
182 operator()(3,i), tmp.
set(2,i)) ;
185 for (
int i=1; i<=3; i++) {
199 assert(nbvc == 0x0) ;
217 for (
int i=0; i<nz; i++) {
225 for (
int i=1; i<=3; i++) {
227 operator()(3,i), tmp.
set(1,i)) ;
229 operator()(3,i), tmp.
set(2,i)) ;
232 for (
int i=1; i<=3; i++) {
247 cout <<
"Tensor::change_triad : case not treated yet !" << endl ;
int get_align() const
Returns the indicator of alignment with respect to the absolute frame.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
virtual void comp_p_from_cartesian(const Scalar &v_x, const Scalar &v_y, Scalar &v_p) const =0
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.
Vectorial bases (triads) with respect to which the tensorial components are defined.
virtual void comp_x_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_x) const =0
Computes the Cartesian x component (with respect to bvect_cart ) of a vector given by its spherical c...
virtual void comp_t_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_t) const =0
Computes the Spherical component (with respect to bvect_spher ) of a vector given by its cartesian c...
virtual void comp_z_from_spherical(const Scalar &v_r, const Scalar &v_theta, Scalar &v_z) const =0
Computes the Cartesian z component (with respect to bvect_cart ) of a vector given by its spherical c...
Itbl type_indice
1D array of integers (class Itbl ) of size valence containing the type of each index: COV for a cova...
int get_nzone() const
Returns the number of domains.
Cartesian vectorial bases (triads).
Spherical orthonormal vectorial bases (triads).
int valence
Valence of the tensor (0 = scalar, 1 = vector, etc...)
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).
virtual void comp_r_from_cartesian(const Scalar &v_x, const Scalar &v_y, const Scalar &v_z, Scalar &v_r) const =0
Computes the Spherical r component (with respect to bvect_spher ) of a vector given by its cartesian ...
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.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
virtual void comp_y_from_spherical(const Scalar &v_r, const Scalar &v_theta, const Scalar &v_phi, Scalar &v_y) const =0
Computes the Cartesian y component (with respect to bvect_cart ) of a vector given by its spherical c...