LORENE
|
Component of a tensorial field *** DEPRECATED : use class Scalar
instead ***.
More...
#include <cmp.h>
Public Member Functions | |
Cmp (const Map &map) | |
Constructor from mapping. | |
Cmp (const Map *p_map) | |
Constructor from mapping. | |
Cmp (const Cmp &a) | |
Copy constructor. | |
Cmp (const Map &, const Mg3d &, FILE *) | |
Constructor from a file (see sauve(FILE*) ) | |
~Cmp () | |
Destructor. | |
void | operator= (const Cmp &a) |
Assignment to another Cmp defined on the same mapping. | |
void | operator= (const Valeur &a) |
Assignment to a Valeur . | |
void | operator= (const Mtbl &a) |
Assignment to a Mtbl . | |
void | operator= (double) |
Assignment to a double . | |
void | operator= (int) |
Assignment to an int . | |
void | import (const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
void | import_symy (const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
void | import_asymy (const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
void | import (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
void | import_symy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
void | import_asymy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping. | |
Tbl & | set (int l) |
Read/write of the value in a given domain. | |
const Tbl & | operator() (int l) const |
Read-only of the value in a given domain. | |
double & | set (int l, int k, int j, int i) |
Read/write of a particular element. | |
double | operator() (int l, int k, int j, int i) const |
Read-only of a particular element. | |
double | val_point (double r, double theta, double phi) const |
Computes the value of the field represented by *this at an arbitrary point ![]() | |
void | set_etat_nondef () |
Sets the logical state to ETATNONDEF (undefined). | |
void | set_etat_zero () |
Sets the logical state to ETATZERO (zero). | |
void | set_etat_qcq () |
Sets the logical state to ETATQCQ (ordinary state). | |
void | allocate_all () |
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elements, down to the double arrays of the Tbl s. | |
void | annule_hard () |
Sets the Cmp to zero in a hard way. | |
void | annule (int l) |
Sets the Cmp to zero in a given domain. | |
void | annule (int l_min, int l_max) |
Sets the Cmp to zero in several domains. | |
void | filtre (int n) |
Sets the n lasts coefficients in r to 0 in the external domain. | |
void | filtre_phi (int n, int zone) |
Sets the n lasts coefficients in ![]() zone . | |
void | set_val_inf (double val) |
Sets the value of the Cmp to val at infinity. | |
void | set_val_hor (double val, int zone) |
Sets the value of the Cmp to val on the inner boudary of the shell number zone .This is usefull for dealing with undefined values. | |
void | fixe_decroissance (int puis) |
Substracts all the components behaving like ![]() puis , so that *this decreases at least like ![]() | |
Tbl | multipole_spectrum () |
Gives the spectrum in terms of multipolar modes l . | |
int | get_etat () const |
Returns the logical state. | |
const Map * | get_mp () const |
Returns the mapping. | |
int | get_dzpuis () const |
Returns dzpuis . | |
bool | dz_nonzero () const |
Returns true if the last domain is compactified and *this is not zero in this domain. | |
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 not equal to dzi , otherwise return true. | |
void | sauve (FILE *) const |
Save in a file. | |
void | affiche_seuil (ostream &ostr, int type=0, int precision=4, double threshold=1.e-7) const |
Prints only the values greater than a given threshold. | |
void | operator+= (const Cmp &) |
+= Cmp | |
void | operator-= (const Cmp &) |
-= Cmp | |
void | operator*= (const Cmp &) |
*= Cmp | |
void | std_base_scal () |
Sets the spectral bases of the Valeur va to the standard ones for a scalar. | |
const Cmp & | dsdr () const |
Returns ![]() *this . | |
const Cmp & | srdsdt () const |
Returns ![]() *this . | |
const Cmp & | srstdsdp () const |
Returns ![]() *this . | |
const Cmp & | dsdx () const |
Returns ![]() *this , where ![]() | |
const Cmp & | dsdy () const |
Returns ![]() *this , where ![]() | |
const Cmp & | dsdz () const |
Returns ![]() *this , where ![]() | |
const Cmp & | deriv (int i) const |
Returns ![]() *this , where ![]() | |
const Cmp & | laplacien (int zec_mult_r=4) const |
Returns the Laplacian of *this . | |
void | div_r () |
Division by r everywhere. | |
void | mult_r () |
Multiplication by r everywhere. | |
void | mult_r_zec () |
Multiplication by r in the external compactified domain (ZEC) | |
void | mult_rsint () |
Multiplication by ![]() | |
void | mult_cost () |
Multiplication by \f\cos\theta\f$. | |
Division by f$r sin theta f$ void | div_rsint () |
void | dec_dzpuis () |
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external compactified domain (ZEC). | |
void | inc_dzpuis () |
Increases by the value of dzpuis and changes accordingly the values of the Cmp in the external compactified domain (ZEC). | |
void | dec2_dzpuis () |
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external compactified domain (ZEC). | |
void | inc2_dzpuis () |
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external compactified domain (ZEC). | |
void | set_dzpuis (int) |
Set a value to dzpuis . | |
double | integrale () const |
Computes the integral over all space of *this . | |
const Tbl & | integrale_domains () const |
Computes the integral in each domain of *this . | |
Valeur ** | asymptot (int n, const int flag=0) const |
Asymptotic expansion at r = infinity. | |
Cmp | poisson () const |
Solves the scalar Poisson equation with *this as a source. | |
Cmp | poisson_tau () const |
Same as Poisson with a Tau method. | |
Cmp | poisson_falloff (int k_falloff) const |
Cmp | poisson_ylm (int nylm, double *intvec) const |
void | poisson (Param &par, Cmp &uu) const |
Solves the scalar Poisson equation with *this as a source (version with parameters to control the resolution). | |
void | poisson_tau (Param &par, Cmp &uu) const |
Same as Poisson with a Tau method. | |
void | poisson_falloff (Param &par, Cmp &uu, int k_falloff) const |
void | poisson_ylm (Param &par, Cmp &uu, int nylm, double *intvec) const |
Cmp | poisson_dirichlet (const Valeur &limite, int num) const |
Is identicall to Cmp::poisson() . | |
Cmp | poisson_neumann (const Valeur &, int) const |
Idem as Cmp::poisson_dirichlet , the boundary condition being on the radial derivative of the solution. | |
Cmp | poisson_neumann_interne (const Valeur &, Param &par, Cmp &resu) const |
Idem as Cmp::poisson_neumann , the boundary condition is on the radial derivative of the solution. | |
Cmp | poisson_frontiere_double (const Valeur &, const Valeur &, int) const |
void | poisson_regular (int k_div, int nzet, double unsgam1, Param &par, Cmp &uu, Cmp &uu_regu, Cmp &uu_div, Tenseur &duu_div, Cmp &source_regu, Cmp &source_div) const |
Solves the scalar Poisson equation with *this as a source (version with parameters to control the resolution). | |
Tbl | test_poisson (const Cmp &uu, ostream &ostr, bool detail=false) const |
Checks if a Poisson equation with *this as a source has been correctly solved. | |
void | raccord (int n) |
Performs the ![]() | |
void | raccord_c1_zec (int puis, int nbre, int lmax) |
Performs the ![]() ![]() ![]() ![]() | |
void | raccord_externe (int puis, int nbre, int lmax) |
Matching of the external domain with the outermost shell. | |
Public Attributes | |
Valeur | va |
The numerical value of the Cmp | |
Private Member Functions | |
void | import_gal (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings do not have a particular relative orientation. | |
void | import_align (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesian axis. | |
void | import_anti (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e. | |
void | import_align_symy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesian axis. | |
void | import_anti_symy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e. | |
void | import_align_asymy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesian axis. | |
void | import_anti_asymy (int nzet, const Cmp &ci) |
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e. | |
void | del_t () |
Logical destructor. | |
void | del_deriv () |
Logical destructor of the derivatives. | |
void | set_der_0x0 () |
Sets the pointers for derivatives to 0x0. | |
Private Attributes | |
const Map * | mp |
Reference mapping. | |
int | etat |
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ). | |
int | dzpuis |
Power of r by which the quantity represented by this must be divided in the external compactified zone in order to get the correct physical values. | |
Cmp * | p_dsdr |
Pointer on ![]() *this . | |
Cmp * | p_srdsdt |
Pointer on ![]() *this . | |
Cmp * | p_srstdsdp |
Pointer on ![]() *this . | |
Cmp * | p_dsdx |
Pointer on ![]() *this , where ![]() | |
Cmp * | p_dsdy |
Pointer on ![]() *this , where ![]() | |
Cmp * | p_dsdz |
Pointer on ![]() *this , where ![]() | |
Cmp * | p_lap |
Pointer on the Laplacian of *this . | |
int | ind_lap |
Power of r by which the last computed Laplacian has been multiplied in the external compactified domain. | |
Tbl * | p_integ |
Pointer on the space integral of *this (values in each domain) | |
Friends | |
ostream & | operator<< (ostream &, const Cmp &) |
Display. | |
Component of a tensorial field *** DEPRECATED : use class Scalar
instead ***.
()
Constructor from a file (see sauve(FILE*)
)
Definition at line 234 of file cmp.C.
References dzpuis, etat, Lorene::fread_be(), Lorene::Map::get_mg(), and set_der_0x0().
void Lorene::Cmp::affiche_seuil | ( | ostream & | ostr, |
int | type = 0 , |
||
int | precision = 4 , |
||
double | threshold = 1.e-7 |
||
) | const |
Prints only the values greater than a given threshold.
ostr | [input] Output stream used for the printing |
type | [input] Type of display : 0 = prints only the coefficients, 1 = prints only the values in configuration space, 2 = prints both |
precision | [input] Number of printed digits (default: 4) |
threshold | [input] Value above which an array element is printed (default: 1.e-7) |
Definition at line 612 of file cmp.C.
References Lorene::Valeur::affiche_seuil(), dzpuis, etat, and va.
void Lorene::Cmp::allocate_all | ( | ) |
Sets the logical state to ETATQCQ
(ordinary state) and performs the memory allocation of all the elements, down to the double
arrays of the Tbl
s.
This function performs in fact recursive calls to set_etat_qcq()
on each element of the chain Cmp
-> Valeur
-> Mtbl
-> Tbl
.
Definition at line 323 of file cmp.C.
References Lorene::Valeur::c, Lorene::Mtbl::get_nzone(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), Lorene::Tbl::set_etat_qcq(), Lorene::Mtbl::t, and va.
Sets the Cmp
to zero in several domains.
l_min | [input] The Cmp will be set (logically) to zero in the domains whose indices are in the range [l_min,l_max]. |
l_max | [input] see the comments for l_min . |
Note that annule
(0,va.mg->get_nzone()-1) is equivalent to set_etat_zero()
.
Definition at line 357 of file cmp.C.
References annule(), Lorene::Valeur::annule(), etat, Lorene::Mg3d::get_nzone(), Lorene::Valeur::mg, p_dsdr, p_dsdx, p_dsdy, p_dsdz, p_integ, p_lap, p_srdsdt, p_srstdsdp, set_etat_zero(), and va.
void Lorene::Cmp::annule_hard | ( | ) |
Sets the Cmp
to zero in a hard way.
1/ Sets the logical state to ETATQCQ
, i.e. to an ordinary state. 2/ Fills the Valeur
va
with zeros. NB: this function must be used for debugging purposes only. For other operations, the functions set_etat_zero()
or annule(int, int)
must be perferred.
Definition at line 338 of file cmp.C.
References Lorene::Valeur::annule_hard(), del_deriv(), etat, and va.
Asymptotic expansion at r = infinity.
Determines the coefficients
of *this
when
n | order of the expansion |
flag | : output |
Valeur
s on mg->angu
Definition at line 71 of file cmp_asymptot.C.
References Lorene::Valeur::base, Lorene::Valeur::c, dzpuis, Lorene::Mg3d::get_angu(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Mg3d::get_type_r(), mp, mult_r_zec(), set(), Lorene::Valeur::set(), Lorene::Valeur::set_base(), Lorene::Valeur::set_etat_c_qcq(), Lorene::Mtbl::set_etat_qcq(), Lorene::Tbl::set_etat_qcq(), Lorene::Tbl::set_etat_zero(), Lorene::Valeur::set_etat_zero(), Lorene::Mtbl::t, and va.
Returns false
if the last domain is compactified and *this
is not zero in this domain and dzpuis
is not equal to dzi
, otherwise return true.
Definition at line 715 of file cmp.C.
References dz_nonzero(), and dzpuis.
void Lorene::Cmp::dec2_dzpuis | ( | ) |
Decreases by 2 the value of dzpuis
and changes accordingly the values of the Cmp
in the external compactified domain (ZEC).
Definition at line 180 of file cmp_r_manip.C.
References Lorene::Map::dec2_dzpuis(), mp, and operator=().
void Lorene::Cmp::dec_dzpuis | ( | ) |
Decreases by 1 the value of dzpuis
and changes accordingly the values of the Cmp
in the external compactified domain (ZEC).
Definition at line 154 of file cmp_r_manip.C.
References Lorene::Map::dec_dzpuis(), mp, and operator=().
|
private |
|
private |
Logical destructor.
Definition at line 259 of file cmp.C.
References del_deriv(), Lorene::Valeur::del_t(), etat, and va.
Returns *this
, where
Note that in the external compactified domain (ZEC), it returns instead
i | [input] i=0 for x , i=1 for y , i=2 for z . |
Definition at line 211 of file cmp_deriv.C.
void Lorene::Cmp::div_r | ( | ) |
Division by r everywhere.
Definition at line 78 of file cmp_r_manip.C.
References del_deriv(), Lorene::Map::div_r(), mp, and operator=().
void Lorene::Cmp::div_rsint | ( | ) |
Definition at line 141 of file cmp_r_manip.C.
Returns *this
.
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 84 of file cmp_deriv.C.
References Lorene::Map::dsdr(), etat, mp, and p_dsdr.
Returns *this
, where
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 148 of file cmp_deriv.C.
References Lorene::Map::comp_x_from_spherical(), dsdr(), etat, mp, p_dsdx, srdsdt(), and srstdsdp().
Returns *this
, where
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 169 of file cmp_deriv.C.
References Lorene::Map::comp_y_from_spherical(), dsdr(), etat, mp, p_dsdy, srdsdt(), and srstdsdp().
Returns *this
, where
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 190 of file cmp_deriv.C.
References Lorene::Map::comp_z_from_spherical(), dsdr(), etat, mp, p_dsdz, and srdsdt().
bool Lorene::Cmp::dz_nonzero | ( | ) | const |
Returns true
if the last domain is compactified and *this
is not zero in this domain.
Definition at line 660 of file cmp.C.
References Lorene::Valeur::c, Lorene::Valeur::c_cf, etat, Lorene::Valeur::etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_nzone(), Lorene::Mg3d::get_type_r(), mp, and va.
Sets the n
lasts coefficients in r to 0 in the external domain.
Definition at line 74 of file cmp_manip.C.
References Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_deriv(), etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), mp, Lorene::Mtbl_cf::set(), Lorene::Valeur::set_etat_cf_qcq(), and va.
Sets the n
lasts coefficients in zone
.
Definition at line 101 of file cmp_manip.C.
References Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_deriv(), etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), mp, Lorene::Mtbl_cf::set(), Lorene::Valeur::set_etat_cf_qcq(), and va.
Substracts all the components behaving like puis
, so that *this
decreases at least like
Definition at line 186 of file cmp_manip.C.
References Lorene::Valeur::base, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), Lorene::cos(), dzpuis, Lorene::Map_af::get_alpha(), Lorene::Base_val::get_base_r(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), mp, mult_r_zec(), Lorene::pow(), R_CHEBU, Lorene::Mtbl_cf::set(), Lorene::Valeur::set_etat_cf_qcq(), and va.
|
inline |
|
inline |
Assignment to another Cmp
defined on a different mapping.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
ci | [input] Cmp to be imported. |
Definition at line 73 of file cmp_import.C.
References Lorene::Map::get_mg(), Lorene::Mg3d::get_nzone(), and mp.
Assignment to another Cmp
defined on a different mapping.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 85 of file cmp_import.C.
References Lorene::Map::get_bvect_cart(), import_align(), import_anti(), import_gal(), and mp.
Assignment to another Cmp
defined on a different mapping, when the two mappings have aligned Cartesian axis.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 527 of file cmp_import.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping, when the two mappings have aligned Cartesian axis.
Case where the Cmp
is antisymmetric with respect to the plane y=0.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 369 of file cmp_import_asymy.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Mg3d::get_type_p(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point_asymy(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping, when the two mappings have aligned Cartesian axis.
Case where the Cmp
is symmetric with respect to the plane y=0.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 340 of file cmp_import_symy.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Mg3d::get_type_p(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point_symy(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 335 of file cmp_import.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e.
Cmp
is antisymmetric with respect to the plane y=0.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 126 of file cmp_import_asymy.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Mg3d::get_type_p(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point_asymy(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping, when the two mappings have anti-aligned Cartesian axis (i.e.
Cmp
is symmetric with respect to the plane y=0.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 126 of file cmp_import_symy.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Mg3d::get_type_p(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point_symy(), Lorene::Map::x, Lorene::Map::y, and Lorene::Map::z.
Assignment to another Cmp
defined on a different mapping.
Case where the Cmp
is antisymmetric with respect to the plane y=0. This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
ci | [input] Cmp to be imported. |
Definition at line 67 of file cmp_import_asymy.C.
References Lorene::Map::get_mg(), Lorene::Mg3d::get_nzone(), import_asymy(), and mp.
Assignment to another Cmp
defined on a different mapping.
Case where the Cmp
is antisymmetric with respect to the plane y=0. This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 79 of file cmp_import_asymy.C.
References Lorene::Map::get_bvect_cart(), import_align_asymy(), import_anti_asymy(), and mp.
Assignment to another Cmp
defined on a different mapping, when the two mappings do not have a particular relative orientation.
This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 136 of file cmp_import.C.
References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), annule(), Lorene::Valeur::c, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), del_t(), dzpuis, etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Map::get_rot_phi(), mp, Lorene::Map::phi, Lorene::Map::r, set_dzpuis(), Lorene::Valeur::set_etat_c_qcq(), set_etat_qcq(), Lorene::Mtbl::set_etat_qcq(), set_etat_zero(), Lorene::sqrt(), Lorene::Mtbl::t, Lorene::Tbl::t, Lorene::Map::tet, va, Lorene::Map::val_lx(), Lorene::Mtbl_cf::val_point(), Lorene::Map::xa, Lorene::Map::ya, and Lorene::Map::za.
Assignment to another Cmp
defined on a different mapping.
Case where the Cmp
is symmetric with respect to the plane y=0. This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
ci | [input] Cmp to be imported. |
Definition at line 67 of file cmp_import_symy.C.
References Lorene::Map::get_mg(), Lorene::Mg3d::get_nzone(), import_symy(), and mp.
Assignment to another Cmp
defined on a different mapping.
Case where the Cmp
is symmetric with respect to the plane y=0. This assignment is performed point to point by means of the spectral expansion of the original Cmp
.
nzet | [input] Number of domains of the destination mapping (i.e. this->mp ) where the importation is performed: the assignment is done for the domains whose indices are between 0 and nzet-1 . In the other domains, *this is set to zero. |
ci | [input] Cmp to be imported. |
Definition at line 79 of file cmp_import_symy.C.
References Lorene::Map::get_bvect_cart(), import_align_symy(), import_anti_symy(), and mp.
void Lorene::Cmp::inc2_dzpuis | ( | ) |
Increases by 2 the value of dzpuis
and changes accordingly the values of the Cmp
in the external compactified domain (ZEC).
Definition at line 192 of file cmp_r_manip.C.
References Lorene::Map::inc2_dzpuis(), mp, and operator=().
void Lorene::Cmp::inc_dzpuis | ( | ) |
Increases by the value of dzpuis
and changes accordingly the values of the Cmp
in the external compactified domain (ZEC).
Definition at line 166 of file cmp_r_manip.C.
References Lorene::Map::inc_dzpuis(), mp, and operator=().
double Lorene::Cmp::integrale | ( | ) | const |
Computes the integral over all space of *this
.
The computed quantity is (u being the field represented by *this
) dzpuis
must be 4 for the computation to take place.
Definition at line 55 of file cmp_integ.C.
References Lorene::Map::get_mg(), Lorene::Mg3d::get_nzone(), integrale_domains(), and mp.
Computes the integral in each domain of *this
.
The computed quantity is (u being the field represented by *this
) Tbl
on the various domains. Note that in the external compactified domain (ZEC), dzpuis
must be 4 for the computation to take place.
Definition at line 73 of file cmp_integ.C.
References etat, Lorene::Map::integrale(), mp, and p_integ.
Returns the Laplacian of *this
.
zec_mult_r | [input] Determines the quantity computed in the external compactified domain (ZEC) (u in the field represented by *this ) : \ zec_mult_r = 0 : ![]() ![]() ![]() |
Definition at line 242 of file cmp_deriv.C.
References etat, ind_lap, Lorene::Map::laplacien(), mp, and p_lap.
void Lorene::Cmp::mult_cost | ( | ) |
Multiplication by \f\cos\theta\f$.
Definition at line 128 of file cmp_r_manip.C.
References del_deriv(), mp, Lorene::Map::mult_cost(), and operator=().
void Lorene::Cmp::mult_r | ( | ) |
Multiplication by r everywhere.
Definition at line 91 of file cmp_r_manip.C.
References del_deriv(), mp, and Lorene::Map::mult_r().
void Lorene::Cmp::mult_r_zec | ( | ) |
Multiplication by r in the external compactified domain (ZEC)
Definition at line 103 of file cmp_r_manip.C.
References del_deriv(), mp, Lorene::Map::mult_r_zec(), and operator=().
void Lorene::Cmp::mult_rsint | ( | ) |
Multiplication by
Definition at line 116 of file cmp_r_manip.C.
References del_deriv(), mp, Lorene::Map::mult_rsint(), and operator=().
Tbl Lorene::Cmp::multipole_spectrum | ( | ) |
Gives the spectrum in terms of multipolar modes l .
Tbl
of size (nzone, lmax), where lmax is the maximal multipolar momentum over all domains. The l -th element contains the L1 norm of the l -th multipole (i.e. a sum over all m of the norms (coefficient space) of the component of a given Definition at line 762 of file cmp.C.
References Lorene::Tbl::annule_hard(), Lorene::Mtbl_cf::base, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), mp, Lorene::Tbl::set(), Lorene::Tbl::set_etat_zero(), va, and Lorene::Valeur::ylm().
*= Cmp
Definition at line 668 of file cmp_arithm.C.
References del_deriv(), dzpuis, etat, get_etat(), get_mp(), mp, set_etat_nondef(), set_etat_zero(), and va.
+= Cmp
Definition at line 575 of file cmp_arithm.C.
References del_deriv(), dz_nonzero(), dzpuis, etat, get_etat(), get_mp(), mp, set_dzpuis(), set_etat_nondef(), and va.
-= Cmp
Definition at line 623 of file cmp_arithm.C.
References del_deriv(), dz_nonzero(), dzpuis, etat, get_etat(), get_mp(), mp, set_dzpuis(), set_etat_nondef(), and va.
Assignment to another Cmp
defined on the same mapping.
Definition at line 398 of file cmp.C.
References del_deriv(), Lorene::Valeur::del_t(), dzpuis, etat, mp, set_etat_nondef(), set_etat_qcq(), set_etat_zero(), and va.
Assignment to a Mtbl
.
Definition at line 486 of file cmp.C.
References Lorene::Valeur::c, del_deriv(), Lorene::Valeur::del_t(), Lorene::Mtbl::get_etat(), set_etat_qcq(), set_etat_zero(), and va.
Assignment to a Valeur
.
Definition at line 443 of file cmp.C.
References del_deriv(), Lorene::Valeur::del_t(), Lorene::Valeur::get_etat(), set_etat_qcq(), set_etat_zero(), and va.
Assignment to a double
.
Definition at line 526 of file cmp.C.
References del_deriv(), dzpuis, set_etat_qcq(), set_etat_zero(), and va.
Assignment to an int
.
Definition at line 542 of file cmp.C.
References del_deriv(), dzpuis, set_etat_qcq(), set_etat_zero(), and va.
Cmp Lorene::Cmp::poisson | ( | ) | const |
Solves the scalar Poisson equation with *this
as a source.
The source Cmp
*this
. Note that dzpuis
must be equal to 2, 3 or 4, i.e. that the quantity stored in *this
is in fact Cmp
.
Definition at line 94 of file cmp_pde.C.
References mp, and Lorene::Map::poisson().
Solves the scalar Poisson equation with *this
as a source (version with parameters to control the resolution).
The source Cmp
*this
. Note that dzpuis
must be equal to 2 or 4, i.e. that the quantity stored in *this
is in fact
par | [input/output] possible parameters |
uu | [input/output] solution u with the boundary condition u =0 at spatial infinity. |
Definition at line 107 of file cmp_pde.C.
References mp, and Lorene::Map::poisson().
Is identicall to Cmp::poisson()
.
The regularity condition at the origin is replace by a boundary condition of the Dirichlet type.
limite | [input] : angular function. The boundary condition is given by limite [num] . |
num | [input] : index of the boudary at which the condition is to be fullfilled. |
More precisely we impose the solution is equal to limite
[num] at the boundary between the domains num
and num+1
(the latter one being a shell).
Definition at line 95 of file cmp_pde_frontiere.C.
References mp, and Lorene::Map::poisson_frontiere().
Definition at line 58 of file cmp_pde_falloff.C.
Definition at line 71 of file cmp_pde_falloff.C.
Cmp Lorene::Cmp::poisson_frontiere_double | ( | const Valeur & | lim_func, |
const Valeur & | lim_der, | ||
int | num_zone | ||
) | const |
Definition at line 117 of file cmp_pde_frontiere.C.
Idem as Cmp::poisson_dirichlet
, the boundary condition being on the radial derivative of the solution.
Definition at line 103 of file cmp_pde_frontiere.C.
References mp, and Lorene::Map::poisson_frontiere().
Idem as Cmp::poisson_neumann
, the boundary condition is on the radial derivative of the solution.
But in this method, the poisson equation is solved in the shell only. We have so to impose a boundary condition on the surface of the star. This is used for example to solve the continuity equation for the fluid in the star.
Definition at line 110 of file cmp_pde_frontiere.C.
References mp, and Lorene::Map::poisson_interne().
void Lorene::Cmp::poisson_regular | ( | int | k_div, |
int | nzet, | ||
double | unsgam1, | ||
Param & | par, | ||
Cmp & | uu, | ||
Cmp & | uu_regu, | ||
Cmp & | uu_div, | ||
Tenseur & | duu_div, | ||
Cmp & | source_regu, | ||
Cmp & | source_div | ||
) | const |
Solves the scalar Poisson equation with *this
as a source (version with parameters to control the resolution).
The source Cmp
*this
. The regularized source dzpuis
must be equal to 2 or 4, i.e. that the quantity stored in *this
is in fact
k_div | [input] regularization degree of the procedure |
nzet | [input] number of domains covering the star |
unsgam1 | [input] parameter ![]() ![]() |
par | [input/output] possible parameters |
uu | [input/output] solution |
uu_regu | [output] solution of the regular part of the source. |
uu_div | [output] solution of the diverging part of the source. |
duu_div | [output] derivative of the diverging potential. |
source_regu | [output] regularized source |
source_div | [output] diverging part of the source |
Definition at line 88 of file cmp_poisson_regu.C.
References mp, and Lorene::Map::poisson_regular().
Cmp Lorene::Cmp::poisson_tau | ( | ) | const |
Same as Poisson with a Tau method.
Definition at line 120 of file cmp_pde.C.
References mp, and Lorene::Map::poisson_tau().
Same as Poisson with a Tau method.
Definition at line 133 of file cmp_pde.C.
References mp, and Lorene::Map::poisson_tau().
Definition at line 58 of file cmp_pde_ylm.C.
Definition at line 71 of file cmp_pde_ylm.C.
Performs the
Definition at line 170 of file cmp_raccord.C.
References Lorene::Tbl::annule_hard(), Lorene::Valeur::base, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), etat, Lorene::Map_af::get_alpha(), Lorene::Map::get_mg(), get_mp(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Mg3d::get_type_r(), Lorene::Matrice::inverse(), R_CHEBI, R_CHEBP, Lorene::Tbl::set(), Lorene::Mtbl_cf::set(), Lorene::Valeur::set_etat_cf_qcq(), Lorene::Mtbl_cf::t, va, Lorene::Valeur::ylm(), and Lorene::Valeur::ylm_i().
Performs the
Definition at line 84 of file cmp_raccord_zec.C.
References Lorene::Tbl::annule_hard(), Lorene::Valeur::base, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), Lorene::cos(), dec2_dzpuis(), dsdr(), etat, Lorene::Map_af::get_alpha(), Lorene::Base_val::get_base_r(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Matrice::inverse(), mp, Lorene::pow(), R_CHEB, Lorene::Tbl::set(), Lorene::Matrice::set(), Lorene::Mtbl_cf::set(), Lorene::Matrice::set_band(), set_dzpuis(), Lorene::Valeur::set_etat_cf_qcq(), Lorene::Matrice::set_etat_qcq(), Lorene::Tbl::set_etat_qcq(), Lorene::Matrice::set_lu(), Lorene::Mtbl_cf::t, va, Lorene::Valeur::ylm(), and Lorene::Valeur::ylm_i().
Matching of the external domain with the outermost shell.
Definition at line 91 of file cmp_raccord_externe.C.
References Lorene::Tbl::annule_hard(), Lorene::Valeur::base, Lorene::Valeur::c_cf, Lorene::Valeur::coef(), Lorene::cos(), Lorene::Map_af::get_alpha(), Lorene::Map_af::get_beta(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), mp, Lorene::pow(), Lorene::Tbl::set(), Lorene::Matrice::set(), Lorene::Mtbl_cf::set(), set_dzpuis(), Lorene::Valeur::set_etat_cf_qcq(), Lorene::Matrice::set_etat_qcq(), Lorene::Mtbl_cf::set_etat_qcq(), Lorene::Tbl::set_etat_qcq(), Lorene::sqrt(), Lorene::Mtbl_cf::t, va, Lorene::Valeur::ylm(), and Lorene::Valeur::ylm_i().
Save in a file.
Definition at line 561 of file cmp.C.
References dzpuis, etat, Lorene::fwrite_be(), Lorene::Valeur::sauve(), and va.
Read/write of the value in a given domain.
NB: to gain in efficiency, the method del_deriv()
(to delete the derived members) is not called by this function. It must thus be invoqued by the user.
l | [input] domain index |
l
. Definition at line 724 of file cmp.h.
References etat, Lorene::Valeur::set(), and va.
Read/write of a particular element.
NB: to gain in efficiency, the method del_deriv()
(to delete the derived members) is not called by this function. It must thus be invoqued by the user.
l | [input] domain index |
k | [input] ![]() |
j | [input] ![]() |
i | [input] r ( ![]() |
Definition at line 749 of file cmp.h.
References etat, Lorene::Valeur::set(), and va.
|
private |
void Lorene::Cmp::set_etat_nondef | ( | ) |
void Lorene::Cmp::set_etat_qcq | ( | ) |
Sets the logical state to ETATQCQ
(ordinary state).
If the state is already ETATQCQ
, this function does nothing. Otherwise, it calls the logical destructor of the Valeur
va
and deallocates the memory occupied by all the derivatives.
Definition at line 304 of file cmp.C.
References del_deriv(), del_t(), and etat.
void Lorene::Cmp::set_etat_zero | ( | ) |
Sets the logical state to ETATZERO
(zero).
Calls the logical destructor of the Valeur
va
and deallocates the memory occupied by all the derivatives.
Definition at line 289 of file cmp.C.
References del_deriv(), etat, Lorene::Valeur::set_etat_zero(), and va.
Sets the value of the Cmp
to val
on the inner boudary of the shell number zone
.This is usefull for dealing with undefined values.
Definition at line 159 of file cmp_manip.C.
References annule_hard(), Lorene::Valeur::coef_i(), del_deriv(), etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nt(), mp, Lorene::Valeur::set(), Lorene::Valeur::set_etat_c_qcq(), and va.
Sets the value of the Cmp
to val
at infinity.
This is usefull for dealing with undefined values. The external domain must be compactified.
Definition at line 126 of file cmp_manip.C.
References annule_hard(), Lorene::Valeur::coef_i(), del_deriv(), etat, Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Mg3d::get_type_r(), mp, Lorene::Valeur::set(), Lorene::Valeur::set_etat_c_qcq(), and va.
Returns *this
.
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 105 of file cmp_deriv.C.
References etat, mp, p_srdsdt, and Lorene::Map::srdsdt().
Returns *this
.
Note that in the external compactified domain (ZEC), it returns instead
Definition at line 127 of file cmp_deriv.C.
References etat, mp, p_srstdsdp, and Lorene::Map::srstdsdp().
void Lorene::Cmp::std_base_scal | ( | ) |
Sets the spectral bases of the Valeur
va
to the standard ones for a scalar.
Definition at line 644 of file cmp.C.
References Lorene::Valeur::std_base_scal(), and va.
Checks if a Poisson equation with *this
as a source has been correctly solved.
uu | [input] Solution u of the Poisson equation ![]() ![]() Cmp *this . |
ostr | [input/output] Output stream used for displaying err . |
detail | [input]
|
Tbl
err
decribing the errors in each domain: err(0,l)
: Relative error in domain no. l
, defined as the maximum value of dzpuis
= 0} or dzpuis
!= 0} and err(1,l)
: Maximum value of the absolute error l
err(2,l)
: Maximum value of l
Definition at line 58 of file cmp_test_poisson.C.
References Lorene::abs(), check_dzpuis(), dzpuis, Lorene::Map::get_mg(), get_mp(), Lorene::Mg3d::get_nzone(), laplacien(), Lorene::max(), mp, Lorene::Tbl::set(), and Lorene::Tbl::set_etat_qcq().
Computes the value of the field represented by *this
at an arbitrary point
r | [input] value of the coordinate r |
theta | [input] value of the coordinate ![]() |
phi | [input] value of the coordinate ![]() |
*this
. Definition at line 732 of file cmp.C.
References etat, mp, va, Lorene::Map::val_lx(), and Lorene::Valeur::val_point().
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |