28char sol_Dirac_A_1z_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Tensor/vector_divfree_A_1z.C,v 1.4 2014/10/13 08:53:45 j_novak Exp $" ;
70 const Param* par_bc)
const {
73 assert(mp_aff != 0x0) ;
82 assert(aaa.
get_etat() != ETATNONDEF) ;
85 bool ced = (mgrid.
get_type_r(nzm1) == UNSURR) ;
86 int n_shell = ced ? nz-2 : nzm1 ;
90 n_shell = (nz_bc < n_shell ? nz_bc : n_shell) ;
122 int l_q, m_q, base_r ;
128 int nr = mgrid.
get_nr(lz) ;
133 for (
int k=0 ; k<np+1 ; k++) {
134 for (
int j=0 ; j<nt ; j++) {
137 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 0)) {
141 for (
int lin=0; lin<nr; lin++)
142 for (
int col=0; col<nr; col++)
143 ope.
set(lin,col) = md(lin,col) + 2*ms(lin,col) ;
144 for (
int lin=0; lin<nr; lin++)
145 for (
int col=0; col<nr; col++)
146 ope.
set(lin,col+nr) = -l_q*(l_q+1)*ms(lin,col) ;
147 for (
int lin=0; lin<nr; lin++)
148 for (
int col=0; col<nr; col++)
149 ope.
set(lin+nr,col) = -ms(lin,col) ;
150 for (
int lin=0; lin<nr; lin++)
151 for (
int col=0; col<nr; col++)
152 ope.
set(lin+nr,col+nr) = md(lin,col) + ms(lin,col) ;
160 for (
int col=0 ; col<nr; col++) {
161 ope.
set(nr-1,col) = pari ;
162 ope.
set(nr-1,col+nr) = -pari ;
165 for (
int col=0 ; col<nr ; col++) {
166 ope.
set(2*nr-1,col+nr)=1 ;
171 for (
int col=0; col<2*nr; col++) {
172 ope.
set(ind1+nr-2, col) = 0 ;
174 for (
int col=nr; col<2*nr; col++)
175 ope.
set(ind1+nr-2, col) = 1 ;
176 for (
int col=0; col<2*nr; col++) {
177 ope.
set(nr-1, col) = 0 ;
178 ope.
set(2*nr-1, col) = 0 ;
182 for (
int col=0; col<nr; col++) {
183 ope.
set(nr-1, col) = pari ;
184 ope.
set(2*nr-1, col+nr) = pari ;
189 ope.
set(nr-1, nr-1) = 1 ;
190 ope.
set(2*nr-1, 2*nr-1) = 1 ;
199 for (
int lin=0; lin<nr; lin++)
201 for (
int lin=0; lin<nr; lin++)
204 sec.
set(2*nr-1) = 0 ;
217 for (
int i=0; i<nr; i++) {
218 sol_vr.
set(lz, k, j, i) = sol(i) ;
219 sol_eta.
set(lz, k, j, i) = sol(i+nr) ;
221 if ((l_q==2)&&(k==3)) {
222 cout <<
" ========================== " << endl ;
223 cout <<
" Operateur " << endl ;
224 cout <<
" ========================== " << endl ;
225 cout << ope << endl ;
226 cout <<
" ========================== " << endl ;
227 cout <<
" Second membre " << endl ;
228 cout <<
" ========================== " << endl ;
229 cout << sec << endl ;
230 cout <<
" ========================== " << endl ;
231 cout <<
" Solution " << endl ;
232 cout <<
" ========================== " << endl ;
233 cout << sol << endl ;
250 for (
int k=0 ; k<np+1 ; k++)
251 for (
int j=0 ; j<nt ; j++) {
253 if ((nullite_plm(j, nt, k, np, base) == 1) && (l_q > 0)) {
256 int nr = mgrid.
get_nr(0) ;
257 for (
int i=0 ; i<nr ; i++) {
258 mvr.
set(0, k, j, i) = sol_vr(0, k, j, i) ;
259 meta.
set(0, k, j, i) = sol_eta(0, k, j, i) ;
Bases of the spectral expansions.
void mult_x()
The basis is transformed as with a multiplication by .
void give_quant_numbers(int, int, int, int &, int &, int &) const
Computes the various quantum numbers and 1d radial base.
Class for the elementary differential operator (see the base class Diff ).
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
Class for the elementary differential operator division by (see the base class Diff ).
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
const double * get_alpha() const
Returns the pointer on the array alpha.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int j, int i)
Read/write of a particuliar element.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
int get_np(int l) const
Returns the number of points in the azimuthal 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_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Coefficients storage for the multi-domain spectral method.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
int get_n_int() const
Returns the number of stored int 's addresses.
Tensor field of valence 0 (or component of a tensorial field).
Valeur & set_spectral_va()
Returns va (read/write version)
const Valeur & get_spectral_va() const
Returns va (read only version)
void annule_hard()
Sets the Scalar to zero in a hard way.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
void ylm()
Computes the coefficients of *this.
Mtbl * c
Values of the function at the points of the multi-grid
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
void ylm_i()
Inverse of ylm()
void sol_Dirac_A_1z(const Scalar &aaa, Scalar &eta, Scalar &vr, const Param *par_bc=0x0) const
Solves a one-domain system of two-coupled first-order PDEs obtained from the divergence-free conditio...
#define R_CHEBP
base de Cheb. paire (rare) seulement
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.