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"
117 double rot_phi_i,
const char* name_i)
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) ;
308 assert( *
this == mp->get_bvect_spher() ) ;
309 assert( *bvc == mp->get_bvect_cart() ) ;
315 mp->comp_r_from_cartesian(vx, vy, vz, ti.
set(0)) ;
316 mp->comp_t_from_cartesian(vx, vy, vz, ti.
set(1)) ;
317 mp->comp_p_from_cartesian(vx, vy, ti.
set(2)) ;
327 assert( *
this == mp->get_bvect_spher() ) ;
328 assert( *bvc == mp->get_bvect_cart() ) ;
330 for (
int i=0; i<2; i++)
335 Tenseur tmp(*mp, 2, COV, *
this) ;
337 for (
int i=0; i<3; i++) {
338 mp->comp_r_from_cartesian(ti(0,i), ti(1,i), ti(2,i)
340 mp->comp_t_from_cartesian(ti(0,i), ti(1,i), ti(2,i)
342 mp->comp_p_from_cartesian(ti(0,i), ti(1,i), tmp.
set(2,i) ) ;
344 for (
int i=0; i<3; i++) {
345 mp->comp_r_from_cartesian(tmp(i,0), tmp(i,1), tmp(i,2)
347 mp->comp_t_from_cartesian(tmp(i,0), tmp(i,1), tmp(i,2)
349 mp->comp_p_from_cartesian(tmp(i,0), tmp(i,1), ti.
set(i,2) ) ;
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).
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 >>.
Base_vect()
Standard constructor.
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 ***.
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.
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.