74 cout <<
"Star_rot::lambda_grv2: the mapping of sou_m does not" 75 << endl <<
" belong to the class Map_radial !" << endl ;
79 assert( &sou_q.
get_mp() == mprad ) ;
89 double theta0 = M_PI / 2 ;
94 for (
int l=0 ; l<nz ; l++) {
95 double rmax = mprad->
val_r(l,
double(1), theta0, phi0) ;
98 double rmin = mprad->
val_r(l,
double(0), theta0, phi0) ;
105 double rmin = mprad->
val_r(l,
double(-1), theta0, phi0) ;
106 mpaff.
set_alpha(
double(.5) * (rmax - rmin), l ) ;
107 mpaff.
set_beta(
double(.5) * (rmax + rmin), l) ;
113 double rmin = mprad->
val_r(l,
double(-1), theta0, phi0) ;
114 double umax = double(1) / rmin ;
115 double umin = double(1) / rmax ;
116 mpaff.
set_alpha(
double(.5) * (umin - umax), l) ;
117 mpaff.
set_beta(
double(.5) * (umin + umax), l) ;
122 cout <<
"Star_rot::lambda_grv2: unknown type_r ! " << endl ;
139 for (
int l=0; l<nz; l++) {
143 *(jac.
t[l]) = *(jac.
t[l]) / (a1*a1) ;
150 assert( jac.
t[l]->
get_etat() == ETATQCQ ) ;
151 double* tjac = jac.
t[l]->
t ;
153 for (
int k=0; k<mg->
get_np(l); k++) {
154 for (
int j=0; j<mg->
get_nt(l); j++) {
155 for (
int i=0; i<mg->
get_nr(l); i++) {
157 (a1 * (a1 * xi[i] + b1) ) ;
169 *(jac.
t[l]) = - *(jac.
t[l]) / (a1*a1) ;
174 cout <<
"Star_rot::lambda_grv2: unknown type_r ! " << endl ;
188 if ( sou_m.
get_etat() == ETATZERO ) {
198 if ( sou_q.
get_etat() == ETATZERO ) {
222 double int_m = integrale2d(af_soum) ;
223 double int_q = integrale2d(af_souq) ;
229 if ( int_q !=
double(0) ) {
230 lambda = - int_m / int_q ;
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
const double * get_alpha() const
Returns the pointer on the array alpha.
static double lambda_grv2(const Scalar &sou_m, const Scalar &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tensor field of valence 0 (or component of a tensorial field).
void coef_i() const
Computes the physical value of *this.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
int get_etat() const
Gives the logical state.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
double * x
Array of values of at the nr collocation points.
void set_dzpuis(int)
Modifies the dzpuis flag.
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
int get_etat() const
Returns the logical state.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
int get_dzpuis() const
Returns dzpuis.
double * t
The array of double.
const double * get_beta() const
Returns the pointer on the array beta.
Mtbl * c
Values of the function at the points of the multi-grid.
Base class for pure radial mappings.
int get_nzone() const
Returns the number of domains.
void set_alpha(double alpha0, int l)
Modifies the value of in domain no. l.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
const Map & get_mp() const
Returns the mapping.
const Valeur & get_spectral_va() const
Returns va (read only version)