20 #include "headcpp.hpp"
21 #include "polar_periodic.hpp"
23 #include "array_math.hpp"
25 #include "tensor_impl.hpp"
52 cerr <<
"Unknown basis in Domain_polar_periodic_nucleus_affecte_tau_val_domain" << endl ;
56 for (
int k=mink ; k<maxk ; k++) {
81 cerr <<
"Unknown theta basis in Domain_polar_periodic_nucleus_affecte_tau_val_domain" << endl ;
85 for (
int j=minj ; j<maxj ; j++) {
104 cerr <<
"Unknown theta basis in Domain_polar_periodic_nucleus_affecte_tau_val_domain" << endl ;
113 minr=(lquant<=llim) ? 0 : 1 ;
117 minr= (lquant<=llim) ? 0 : 1;
121 minr=(lquant<=llim) ? 0 : 1 ;
125 minr=(lquant<=llim) ? 0 : 1 ;
129 cerr <<
"Unknown r basis in Domain_polar_periodic_nucleus_affecte_tau_val_domain" << endl ;
134 for (
int i=minr ; i<maxr ; i++) {
138 so.
cf->
set(pos_cf) += values(conte) ;
144 pos_gal_r.
set(0) = 0 ;
147 fact_r = - pow(-1, i) ;
151 for (
int t=0 ; t<i ; t++)
152 fact_r *= -
double(2*t+1)/double(2*t+2) ;
156 fact_r = - (2*i+1) * pow(-1, i) ;
160 for (
int t=0 ; t<i ; t++)
161 fact_r *= -
double(2*t+3)/double(2*t+2) ;
166 cerr <<
"Strange base in Domain_polar_periodic_nucleus::affecte_tau_val_domain" << endl ;
169 so.
cf->
set(pos_cf) += values(conte) ;
170 so.
cf->
set(pos_gal_r) += fact_r*values(conte) ;
216 cerr <<
"Valence " << val <<
" not implemented in Domain_polar_periodic_nucleus::affecte_tau" << endl ;
reference set(const Index &pos)
Read/write of an element.
Bases_container bases_1d
Arrays containing the various basis of decomposition.
virtual void affecte_tau(Tensor &, int, const Array< double > &, int &) const
Affects some coefficients to a Tensor.
void affecte_tau_val_domain(Val_domain &so, int llim, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
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.
Val_domain & set_domain(int)
Read/write of a particular Val_domain.
const Domain * get_domain(int i) const
returns a pointer on the domain.
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
int get_n_comp() const
Returns the number of stored components.
int get_valence() const
Returns the valence.
const Space & get_space() const
Returns the Space.
Class for storing the basis of decompositions of a field and its values on both the configuration and...
void allocate_coef()
Allocates the values in the coefficient space and destroys the values in the configuration space.
Array< double > * cf
Pointer on the Array of the values in the coefficients space.
const Base_spectral & get_base() const
Returns the basis of decomposition.