20 #include "headcpp.hpp"
22 #include "spheric.hpp"
24 #include "tensor_impl.hpp"
40 if ((pos(1)==0) && (mquant!=0))
44 if ((pos(1)==
nbr_coefs(1)-1) || ((pos(1)==0) && (mquant!=0)))
48 if (((pos(1)==1) && (mquant>1)) || (pos(1)==0) || (pos(1)==
nbr_coefs(1)-1))
52 if (((pos(1)==0) && (mquant>1)) || (pos(1)==
nbr_coefs(1)-1))
56 cerr <<
"Unknow theta basis in Domain_compact::nbr_conditions_val_domain_mquant" << endl ;
76 int kmin = 2*mlim + 2 ;
82 if ((pos(2)==1) || (pos(2)==
nbr_coefs(2)-1))
88 if ((pos(1)==0) && (pos(2)>=kmin))
92 if ((pos(1)==
nbr_coefs(1)-1) || ((pos(1)==0) && (pos(2)>=kmin)))
96 if (((pos(1)==1)&&(pos(2)>=kmin+2)) || (pos(1)==0) || (pos(1)==
nbr_coefs(1)-1))
100 if (((pos(1)==0)&&(pos(2)>=kmin+2)) || (pos(1)==
nbr_coefs(1)-1))
104 cerr <<
"Unknow theta basis in Domain_compact::nbr_conditions_val_domain" << endl ;
121 int size = (n_cmp==-1) ? tt.
get_n_comp() : n_cmp ;
146 else for (
int i=0 ; i<n_cmp ; i++) {
147 if ((*p_cmp[i])(0)==1)
149 if ((*p_cmp[i])(0)==2)
151 if ((*p_cmp[i])(0)==3)
163 else for (
int i=0 ; i<n_cmp ; i++) {
164 if ((*p_cmp[i])(0)==1)
166 if ((*p_cmp[i])(0)==2)
168 if ((*p_cmp[i])(0)==3)
174 cerr <<
"Unknown type of vector Domain_compact::nbr_conditions" << endl ;
191 else for (
int i=0 ; i<n_cmp ; i++) {
192 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
194 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
196 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
198 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
200 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
202 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
220 else for (
int i=0 ; i<n_cmp ; i++) {
221 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
223 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
225 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
227 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
229 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
231 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
233 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
235 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
237 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
252 else for (
int i=0 ; i<n_cmp ; i++) {
253 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
255 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
257 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
259 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
261 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
263 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
282 else for (
int i=0 ; i<n_cmp ; i++) {
283 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
285 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
287 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
289 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
291 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
293 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
295 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
297 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
299 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
305 cerr <<
"Unknown type of 2-tensor Domain_compact::nbr_conditions" << endl ;
311 cerr <<
"Valence " << val <<
" not implemented in Domain_compact::nbr_conditions" << 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.
int nbr_conditions_val_domain(const Val_domain &eq, int mlim, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual Array< int > nbr_conditions(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
int nbr_conditions_val_domain_mquant(const Val_domain &eq, int mquant, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
Dim_array nbr_coefs
Number of coefficients.
Class that gives the position inside a multi-dimensional Array.
bool inc(int increm, int var=0)
Increments the position of the Index.
int get_m_order() const
Returns .
int get_m_quant() const
Returns .
bool is_m_order_affected() const
Checks whether the additional parameter order is affected (not very used).
const Param_tensor & get_parameters() const
Returns a pointer on the possible additional parameter.
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).
Class for storing the basis of decompositions of a field and its values on both the configuration and...
const Base_spectral & get_base() const
Returns the basis of decomposition.