20 #include "headcpp.hpp"
21 #include "polar_periodic.hpp"
23 #include "array_math.hpp"
25 #include "tensor_impl.hpp"
45 cerr <<
"Unknown order in Domain_polar_periodic_nucleus_export_tau_val_domain" << endl ;
68 cerr <<
"Unknown time basis in Domain_polar_periodic_nucleus_export_tau_val_domain" << endl ;
72 for (
int k=mink ; k<maxk ; k++) {
96 cerr <<
"Unknown theta basis in Domain_polar_periodic_nucleus_export_tau_val_domain" << endl ;
101 for (
int j=minj ; j<maxj ; j++) {
120 cerr <<
"Unknown theta basis in Domain_polar_periodic_nucleus_export_tau_val_domain" << endl ;
129 minr=(lquant<=llim) ? 0 : 1 ;
133 minr= (lquant<=llim) ? 0 : 1;
137 minr=(lquant<=llim) ? 0 : 1 ;
141 minr=(lquant<=llim) ? 0 : 1 ;
145 cerr <<
"Unknown r basis in Domain_polar_periodic_nucleus_export_tau_val_domain" << endl ;
150 for (
int i=minr ; i<maxr ; i++) {
155 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
161 pos_gal_r.
set(0) = 0 ;
164 fact_r = - 2 * pow(-1, i) ;
167 fact_r = -double(4*i+1) ;
168 for (
int t=0 ; t<i ; t++)
169 fact_r *= -
double(2*t+1)/double(2*t+2) ;
173 fact_r = - (2*i+1) * pow(-1, i) ;
176 fact_r = -double(4*i+3)/3. ;
177 for (
int t=0 ; t<i ; t++)
178 fact_r *= -
double(2*t+3)/double(2*t+2) ;
183 cerr <<
"Strange base in Domain_polar_periodic_nucleus:export_tau_inside" << endl ;
186 sec.
set(pos_sec) = (*so.
cf)(pos_cf) + fact_r*(*so.
cf)(pos_gal_r) ;
209 else for (
int i=0 ; i<n_cmp ; i++) {
210 if ((*p_cmp[i])(0)==1)
212 if ((*p_cmp[i])(0)==2)
214 if ((*p_cmp[i])(0)==3)
228 else for (
int i=0 ; i<n_cmp ; i++) {
229 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
231 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
233 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
235 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
237 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
239 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
257 else for (
int i=0 ; i<n_cmp ; i++) {
258 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
260 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
262 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
264 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
266 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
268 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
270 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
272 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
274 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
280 cerr <<
"Valence " << val <<
" not implemented in Domain_polar_periodicnucleus::export_tau" << endl ;
reference set(const Index &pos)
Read/write of an element.
Bases_container bases_1d
Arrays containing the various basis of decomposition.
void export_tau_val_domain(const Val_domain &eq, int llim, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
virtual void export_tau(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one in the bulk.
Dim_array nbr_coefs
Number of coefficients.
Class that gives the position inside a multi-dimensional Array.
int & set(int i)
Read/write of the position in a given dimension.
int get_n_comp() const
Returns the number of stored components.
int get_valence() const
Returns the valence.
Class for storing the basis of decompositions of a field and its values on both the configuration and...
bool check_if_zero() const
Check whether the logical state is zero or not.
Array< double > * cf
Pointer on the Array of the values in the coefficients space.
void coef() const
Computes the coefficients.
const Base_spectral & get_base() const
Returns the basis of decomposition.