20 #include "headcpp.hpp"
22 #include "spheric.hpp"
24 #include "tensor_impl.hpp"
39 bool true_tet = true ;
42 if ((j==0) && (mquant!=0))
46 if ((j==
nbr_coefs(1)-1) || ((j==0) && (mquant!=0)))
50 if (((j==1) && (mquant>1)) || (j==0) || (j==
nbr_coefs(1)-1))
54 if (((j==0) && (mquant>1)) || (j==
nbr_coefs(1)-1))
58 cerr <<
"Unknow theta basis in Domain_shell::affecte_tau_val_domain_mquant" << endl ;
65 so.
cf->
set(pos_cf) += values(conte);
80 sum += (*so.
cf)(pos_cf) ;
83 so.
cf->
set(pos_cf) = -sum ;
88 sum += (*so.
cf)(pos_cf) ;
91 so.
cf->
set(pos_cf) = -sum ;
96 sum += j*(*so.
cf)(pos_cf) ;
99 so.
cf->
set(pos_cf) = -sum ;
104 sum += (2*j+1)*(*so.
cf)(pos_cf) ;
107 so.
cf->
set(pos_cf) = -sum ;
110 cerr <<
"Unknow theta basis in Domain_shell::affecte_tau_val_domain_mquant" << endl ;
119 int kmin = 2*mlim+2 ;
134 bool true_tet = true ;
137 if ((j==0) && (k>=kmin))
141 if ((j==
nbr_coefs(1)-1) || ((j==0) && (k>=kmin)))
145 if (((j==1)&&(k>=kmin+2))||(j==0) || (j==
nbr_coefs(1)-1))
149 if (((j==0)&&(k>kmin+2)) || (j==
nbr_coefs(1)-1))
153 cerr <<
"Unknow theta basis in Domain_shell::affecte_tau_val_domain" << endl ;
160 so.
cf->
set(pos_cf) += values(conte);
180 sum += (*so.
cf)(pos_cf) ;
183 so.
cf->
set(pos_cf) = -sum ;
190 sum += (*so.
cf)(pos_cf) ;
193 so.
cf->
set(pos_cf) = -sum ;
200 sum += j*(*so.
cf)(pos_cf) ;
203 so.
cf->
set(pos_cf) = -sum ;
210 sum += (2*j+1)*(*so.
cf)(pos_cf) ;
213 so.
cf->
set(pos_cf) = -sum ;
217 cerr <<
"Unknow theta basis in Domain_shell::affecte_tau_val_domain" << endl ;
263 cerr <<
"Unknown type of vector Domain_shell::affecte_tau" << endl ;
340 cerr <<
"Unknown type of 2-tensor Domain_shell::affecte_tau" << endl ;
346 cerr <<
"Valence " << val <<
" not implemented in Domain_shell::affecte_tau" << endl ;
reference set(const Index &pos)
Read/write of an element.
Bases_container bases_1d
Arrays containing the various basis of decomposition.
int get_basis(int nd) const
Read only the basis in a given domain.
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 mlim, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
void affecte_tau_val_domain_mquant(Val_domain &so, int mquant, 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.
int get_m_quant() const
Returns .
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.
const Param_tensor & get_parameters() const
Returns a pointer on the possible additional parameter.
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
const Base_tensor & get_basis() const
Returns the vectorial basis (triad) on which the components are defined.
int get_n_comp() const
Returns the number of stored components.
int get_valence() const
Returns the valence.
bool is_m_quant_affected() const
Checks whether the additional parameter is affected (used for boson stars for instance).
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.