30char base_vect_cart_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Base_vect/base_vect_cart.C,v 1.8 2014/10/13 08:52:39 j_novak Exp $" ;
101#include "utilitaires.h"
111 : rot_phi(rot_phi_i) {
132 rot_phi(bi.rot_phi) {
192 "WARNING : Base_vect_cart::set_align : " << endl ;
193 cout <<
" rot_phi is close to zero !" << endl ;
197 if (fabs(
rot_phi - M_PI) < 1.e-14) {
199 "WARNING : Base_vect_cart::set_align : " << endl ;
200 cout <<
" rot_phi is close to Pi !" << endl ;
238 <<
"The two Base_vect_cart have different rot_phi : " <<
rot_phi
239 <<
" <-> " << bic.
rot_phi << endl ;
264 ost <<
"Azimuthal angle with respect to the Absolute frame : "
283 assert(ti.
get_etat() != ETATNONDEF) ;
287 assert(triad_i != 0x0) ;
323 ti.
set(0) = - ti(0) ;
324 ti.
set(1) = - ti(1) ;
330 ti.
set(0, 2) = - copie(0, 2) ;
331 ti.
set(1, 2) = - copie(1, 2) ;
332 ti.
set(2, 0) = - copie(2, 0) ;
333 ti.
set(2, 1) = - copie(2, 1) ;
340 "Base_vect_cart::change_basis : the case of valence "
341 << ti.
get_valence() <<
" is not treated !" << endl ;
352 "Base_vect_cart::change_basis : general value of rot_phi "
353 <<
" not contemplated yet, sorry !" << endl ;
360 "Base_vect_cart::change_basis : unexpected value of ind !" << endl ;
361 cout <<
" ind = " << ind << endl ;
406 for (
int i=0; i<2; i++)
411 Tenseur tmp(*mp, 2, COV, *
this) ;
413 for (
int i=0; i<3; i++) {
420 for (
int i=0; i<3; i++) {
434 "Base_vect_cart::change_basis : the case of valence "
435 << ti.
get_valence() <<
" is not treated !" << endl ;
Cartesian vectorial bases (triads).
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.
virtual ~Base_vect_cart()
Destructor.
virtual ostream & operator>>(ostream &) const
Operator >>
void set_align()
Computes align from the value of rot_phi.
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.
virtual int identify() const
Returns a number to identify the sub-classe of Base_vect the object belongs to.
virtual bool operator==(const Base_vect &) const
Comparison operator (egality)
Base_vect_cart(double rot_phi_i)
Standard constructor.
double rot_phi
Angle between the x –axis and the absolute frame X –axis.
virtual void change_basis(Tenseur &) const
Change the basis in which the components of a tensor are expressed.
void operator=(const Base_vect_cart &)
Assignment to another Base_vect_cart.
Spherical orthonormal vectorial bases (triads).
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_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_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 Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
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 ***.
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.
void arrete(int a=0)
Setting a stop point in a code.
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.