102 #include "base_vect.h" 104 #include "utilitaires.h" 114 : rot_phi(rot_phi_i) {
135 rot_phi(bi.rot_phi) {
195 "WARNING : Base_vect_cart::set_align : " << endl ;
196 cout <<
" rot_phi is close to zero !" << endl ;
200 if (fabs(
rot_phi - M_PI) < 1.e-14) {
202 "WARNING : Base_vect_cart::set_align : " << endl ;
203 cout <<
" rot_phi is close to Pi !" << endl ;
241 <<
"The two Base_vect_cart have different rot_phi : " <<
rot_phi 242 <<
" <-> " << bic.
rot_phi << endl ;
267 ost <<
"Azimuthal angle with respect to the Absolute frame : " 286 assert(ti.
get_etat() != ETATNONDEF) ;
290 assert(triad_i != 0x0) ;
308 int ind =
align * (bvc->align) ;
326 ti.
set(0) = - ti(0) ;
327 ti.
set(1) = - ti(1) ;
333 ti.
set(0, 2) = - copie(0, 2) ;
334 ti.
set(1, 2) = - copie(1, 2) ;
335 ti.
set(2, 0) = - copie(2, 0) ;
336 ti.
set(2, 1) = - copie(2, 1) ;
343 "Base_vect_cart::change_basis : the case of valence " 344 << ti.
get_valence() <<
" is not treated !" << endl ;
355 "Base_vect_cart::change_basis : general value of rot_phi " 356 <<
" not contemplated yet, sorry !" << endl ;
363 "Base_vect_cart::change_basis : unexpected value of ind !" << endl ;
364 cout <<
" ind = " << ind << endl ;
409 for (
int i=0; i<2; i++)
414 Tenseur tmp(*mp, 2, COV, *
this) ;
416 for (
int i=0; i<3; i++) {
423 for (
int i=0; i<3; i++) {
437 "Base_vect_cart::change_basis : the case of valence " 438 << ti.
get_valence() <<
" is not treated !" << endl ;
double rot_phi
Angle between the x –axis and the absolute frame X –axis.
int get_type_indice(int i) const
Returns the type of the index number i .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
virtual ~Base_vect_cart()
Destructor.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
void set_rot_phi(double rot_phi_i)
Sets a new value to the angle rot_phi between the x –axis and the absolute frame X –axis...
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
int align
Indicator of alignment with respect to the absolute frame: \ align = 1 : basis aligned with the absol...
virtual void sauve(FILE *) const
Save in a file.
Base class for coordinate mappings.
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 change_basis(Tenseur &) const
Change the basis in which the components of a tensor are expressed.
int get_valence() const
Returns the valence.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
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...
const Map * get_mp() const
Returns pointer on the mapping.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
virtual void sauve(FILE *) const
Save in a file.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual int identify() const =0
Returns a number to identify the sub-classe of Base_vect the object belongs to.
int get_etat() const
Returns the logical state.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
virtual bool operator==(const Base_vect &) const
Comparison operator (egality)
char name[100]
Name of the basis.
virtual int identify() const
Returns a number to identify the sub-classe of Base_vect the object belongs to.
Cartesian vectorial bases (triads).
Spherical orthonormal vectorial bases (triads).
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Base_vect_cart(double rot_phi_i)
Standard constructor.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
void arrete(int a=0)
Setting a stop point in a code.
void set_name(const char *name_i)
Sets the basis name.
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...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void set_align()
Computes align from the value of rot_phi.
void operator=(const Base_vect_cart &)
Assignment to another Base_vect_cart.