20 #include "base_spectral.hpp"
23 #include "array_math.hpp"
26 void coef_i_1d (
int, Array<double>&) ;
31 res_out.
set(dim) = nbr_conf ;
35 for (
int i=0 ; i<dim ; i++)
39 for (
int i=dim+1 ; i<
ndim ; i++)
42 int nbr_coef = inout->
get_size(dim) ;
43 int nbr = (nbr_coef > nbr_conf) ? nbr_coef : nbr_conf ;
59 for (
int i=0 ; i<before ; i++) {
61 demarre_coef.
set(loop_before_coef) ;
62 demarre_conf.
set(loop_before_out) ;
65 int base = (*
bases_1d[dim])(index_base) ;
67 for (
int j=0 ; j<after ; j++) {
69 lit_in = demarre_coef ;
70 for (
int k=0 ; k<nbr_coef ; k++) {
71 tab_1d.
set(k) = (*inout)(lit_in) ;
76 coef_i_1d(base, tab_1d) ;
79 put_out.
set(demarre_conf) ;
80 for (
int k=0 ; k<nbr_conf ; k++) {
81 res.
set(put_out) = tab_1d(k) ;
88 loop_before_coef.
inc1( dim+1) ;
89 loop_before_out.
inc1( dim+1) ;
99 for (
int d=0 ; d<
ndim ; d++)
Version of the Index class optimized for incremental access to Array components.
bool inc(int increm, int var=0)
Increments the position of the Array_iterator.
Array_iterator & set(Array_iterator const &_so)
Set the position of the iterator at the same as the one of the source.
bool inc1(int var)
Optimized unit increment with respect to the passed index number.
reference set(const Index &pos)
Read/write of an element.
int get_size(int i) const
Returns the size of a given dimension.
const Dim_array & get_dimensions() const
Returns the Dim_array of the Array.
void coef_i_dim(int var, int nbr, Array< double > *&tab) const
Performs the inverse coefficient transformation for one particular variable.
Array< double > coef_i(const Dim_array &nbr_points, const Array< double > &so) const
Bases_container bases_1d
Arrays containing the various basis of decomposition.
int ndim
Number of dimensions.
Class for storing the dimensions of an array.
int & set(int i)
Read/write of the size of a given dimension.