30char base_vect_spher_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Base_vect/base_vect_spher.C,v 1.7 2014/10/13 08:52:39 j_novak Exp $" ;
94#include "utilitaires.h"
108 rot_phi(rot_phi_i) {}
117 double rot_phi_i,
const char* name_i)
122 rot_phi(rot_phi_i) {}
131 rot_phi(bi.rot_phi) {}
209 <<
"The two Base_vect_spher have different X origin : " <<
ori_x
210 <<
" <-> " << bis.
ori_x << endl ;
216 <<
"The two Base_vect_spher have different Y origin : " <<
ori_y
217 <<
" <-> " << bis.
ori_y << endl ;
223 <<
"The two Base_vect_spher have different Z origin : " <<
ori_z
224 <<
" <-> " << bis.
ori_z << endl ;
230 <<
"The two Base_vect_spher have different rot_phi : " <<
rot_phi
231 <<
" <-> " << bis.
rot_phi << endl ;
259 ost <<
"Absolute coordinates (X,Y,Z) of the origin : "
261 ost <<
"Azimuthal angle with respect to the Absolute frame : "
279 assert(ti.
get_etat() != ETATNONDEF) ;
283 assert(triad_i != 0x0) ;
330 for (
int i=0; i<2; i++)
335 Tenseur tmp(*mp, 2, COV, *
this) ;
337 for (
int i=0; i<3; i++) {
344 for (
int i=0; i<3; i++) {
358 "Base_vect_sphere::change_basis : the case of valence "
359 << ti.
get_valence() <<
" is not treated !" << endl ;
374 cout <<
"Base_vect_spher::change_basis : case not treated yet !" << endl ;
Cartesian vectorial bases (triads).
Spherical orthonormal vectorial bases (triads).
double ori_y
Absolute coordinate Y of the origin.
virtual ~Base_vect_spher()
Destructor.
void operator=(const Base_vect_spher &)
Assignment to another Base_vect_spher.
double ori_x
Absolute coordinate X of the origin.
double ori_z
Absolute coordinate Z of the origin.
virtual bool operator==(const Base_vect &) const
Comparison operator (egality)
virtual void sauve(FILE *) const
Save in a file.
double rot_phi
Angle between the x –axis and the absolute frame X –axis.
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
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.
Base_vect_spher(double xa0, double ya0, double za0, double rot_phi_i)
Standard constructor.
virtual int identify() const
Returns a number to identify the sub-classe of Base_vect the object belongs to.
virtual void change_basis(Tenseur &) const
Change the basis in which the components of a tensor are expressed.
virtual ostream & operator>>(ostream &) const
Operator >>
Vectorial bases (triads) with respect to which the tensorial components are defined.
virtual int identify() const =0
Returns a number to identify the sub-classe of Base_vect the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
void set_name(const char *name_i)
Sets the basis name.
char name[100]
Name of the basis.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Base class for coordinate mappings.
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_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 Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
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 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...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
int get_type_indice(int i) const
Returns the type of the index number i .
const Map * get_mp() const
Returns pointer on the mapping.
int get_valence() const
Returns the valence.
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_etat() const
Returns the logical state.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
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.