26char vector_change_triad_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/vector_change_triad.C,v 1.9 2014/10/13 08:53:44 j_novak Exp $" ;
77 assert(
triad != 0x0) ;
85 assert((nbvc != 0x0) || (nbvs != 0x0)) ;
90 assert((bvc != 0x0) || (bvs != 0x0)) ;
116 set(1) = - copie(1) ;
117 set(2) = - copie(2) ;
125 "Vector::change_basis : general value of rot_phi "
126 <<
" not contemplated yet, sorry !" << endl ;
133 "Vector::change_basis : unexpected value of ind !" << endl ;
134 cout <<
" ind = " << ind << endl ;
152 assert( *nbvc ==
mp->get_bvect_cart() ) ;
153 assert( *bvs ==
mp->get_bvect_spher() ) ;
155 int nz =
mp->get_mg()->get_nzone() ;
156 for (
int i=0; i<nz; i++) {
158 assert(
mp->get_mg()->get_nt(i) >= 5) ;
164 mp->comp_x_from_spherical(*
cmp[0], *
cmp[1], *
cmp[2], res1) ;
165 mp->comp_y_from_spherical(*
cmp[0], *
cmp[1], *
cmp[2], res2) ;
166 mp->comp_z_from_spherical(*
cmp[0], *
cmp[1],
set(3)) ;
179 assert(nbvc == 0x0) ;
189 assert( *nbvs ==
mp->get_bvect_spher() ) ;
190 assert( *bvc ==
mp->get_bvect_cart() ) ;
192 int nz =
mp->get_mg()->get_nzone() ;
193 for (
int i=0; i<nz; i++) {
195 assert(
mp->get_mg()->get_nt(i) >= 5) ;
201 mp->comp_r_from_cartesian(*
cmp[0], *
cmp[1], *
cmp[2], res1) ;
202 mp->comp_t_from_cartesian(*
cmp[0], *
cmp[1], *
cmp[2], res2) ;
203 mp->comp_p_from_cartesian(*
cmp[0], *
cmp[1],
set(3)) ;
217 cout <<
"Vector::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.
Vector(const Map &map, int tipe, const Base_vect &triad_i)
Standard constructor.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set(int)
Read/write access to a component.
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Scalar ** cmp
Array of size n_comp of pointers onto the components.
const Base_vect * triad
Vectorial basis (triad) with respect to which the tensor components are defined.