26 char tensor_change_triad_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/tensor_change_triad.C,v 1.9 2014/10/13 08:53:44 j_novak Exp $" ;
80 assert(
triad != 0x0) ;
88 assert((nbvc != 0x0) || (nbvs != 0x0)) ;
93 assert((bvc != 0x0) || (bvs != 0x0)) ;
122 set(1, 3) = - copie(1, 3) ;
123 set(2, 3) = - copie(2, 3) ;
124 set(3, 1) = - copie(3, 1) ;
125 set(3, 2) = - copie(3, 2) ;
132 "Tensor::change_basis : general value of rot_phi "
133 <<
" not contemplated yet, sorry !" << endl ;
140 "Tensor::change_basis : unexpected value of ind !" << endl ;
141 cout <<
" ind = " << ind << endl ;
167 for (
int i=0; i<nz; i++) {
175 for (
int i=1; i<=3; i++) {
177 operator()(3,i), tmp.
set(1,i)) ;
179 operator()(3,i), tmp.
set(2,i)) ;
182 for (
int i=1; i<=3; i++) {
196 assert(nbvc == 0x0) ;
214 for (
int i=0; i<nz; i++) {
222 for (
int i=1; i<=3; i++) {
224 operator()(3,i), tmp.
set(1,i)) ;
226 operator()(3,i), tmp.
set(2,i)) ;
229 for (
int i=1; i<=3; i++) {
244 cout <<
"Tensor::change_triad : case not treated yet !" << endl ;
Cartesian vectorial bases (triads).
int get_align() const
Returns the indicator of alignment with respect to the absolute frame.
Spherical orthonormal vectorial bases (triads).
Vectorial bases (triads) with respect to which the tensorial components are defined.
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...
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...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
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...
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...
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 ...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
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...
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
int valence
Valence of the tensor (0 = scalar, 1 = vector, etc...)
Itbl type_indice
1D array of integers (class Itbl ) of size valence containing the type of each index: COV for a cov...
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.