20 #include "headcpp.hpp"
22 #include "spheric.hpp"
24 #include "tensor_impl.hpp"
35 if ((pos(2)==1) || (pos(2)==
nbr_coefs(2)-1))
41 if ((pos(1)==0) && (pos(2)!=0))
49 cerr <<
"Unknow theta basis in Domain_nucleus::nbr_conditions_val_domain_vr" << endl ;
71 if ((pos(2)==0) && (pos(1)>1) && (pos(0)==0))
73 if ((pos(2)>0) && (pos(0)==0))
80 if ((pos(2)==0) && (pos(1)>1) && (pos(0)==0))
82 if ((pos(2)>0) && (pos(0)==0))
87 cerr <<
"Unknow radial basis in Domain_nucleus::nbr_conditions_val_domain_vr" << endl ;
101 cerr <<
"Unknown case in Domain_nucleus_nbr_conditions" << endl ;
122 if ((pos(2)==1) || (pos(2)==
nbr_coefs(2)-1))
128 if ((pos(1)==
nbr_coefs(1)-1) || (pos(1)==0))
134 if ((pos(1)==0) && (pos(2)>3))
138 cerr <<
"Unknow theta basis in Domain_nucleus::nbr_conditions_val_domain_vt" << endl ;
148 if (((pos(2)==2) || (pos(2)==3)) && (pos(1)>0) && (pos(0)==0))
150 if ((pos(2)>3) && (pos(0)==0))
155 if (((pos(2)==2) || (pos(2)==3)) && (pos(1)>0) && (pos(0)==0))
157 if ((pos(2)>3) && (pos(0)==0))
176 cerr <<
"Unknow radial basis in Domain_nucleus::nbr_conditions_val_domain_vt" << endl ;
190 cerr <<
"Unknown case in Domain_nucleus_nbr_conditions" << endl ;
211 if ((pos(2)==1) || (pos(2)==
nbr_coefs(2)-1))
217 if ((pos(2)>3) && (pos(1)==0))
225 cerr <<
"Unknow theta basis in Domain_nucleus::nbr_conditions_val_domain_vp" << endl ;
235 if (((pos(2)==2) || (pos(2)==3)) && (pos(1)>0) && (pos(0)==0))
237 if ((pos(2)>3) && (pos(0)==0))
242 if (((pos(2)==2) || (pos(2)==3)) && (pos(1)>0) && (pos(0)==0))
244 if ((pos(2)>3) && (pos(0)==0))
251 if ((pos(2)==0) && (pos(1)>0) && (pos(0)==0))
253 if (((pos(2)==4) || (pos(2)==5)) && (pos(1)>0) && (pos(0)==0))
255 if ((pos(2)>5) && (pos(0)==0))
262 if ((pos(2)==0) && (pos(1)>0) && (pos(0)==0))
264 if (((pos(2)==4) || (pos(2)==5)) && (pos(1)>0) && (pos(0)==0))
266 if ((pos(2)>5) && (pos(0)==0))
271 cerr <<
"Unknow radial basis in Domain_nucleus::nbr_conditions_val_domain_vp" << endl ;
285 cerr <<
"Unknown case in Domain_nucleus_nbr_conditions" << endl ;
302 int kmin = 2*mlim + 2 ;
308 if ((pos(2)==1) || (pos(2)==
nbr_coefs(2)-1))
315 if ((pos(1)==0) && (pos(2)>=kmin))
320 if ((pos(1)==
nbr_coefs(1)-1) || ((pos(1)==0) && (pos(2)>=kmin)))
322 lquant = 2*pos(1)+1 ;
325 if (((pos(1)==1) && (pos(2)>=kmin+2)) || (pos(1)==0) || (pos(1)==
nbr_coefs(1)-1))
330 if (((pos(1)==0) && (pos(2)>=kmin+2)) || (pos(1)==
nbr_coefs(1)-1))
332 lquant = 2*pos(1)+1 ;
335 cerr <<
"Unknow theta basis in Domain_nucleus::nbr_unknowns_val_domain" << endl ;
346 if ((lquant>llim) && (pos(0)==0))
351 if ((lquant>llim) && (pos(0)==0))
356 if ((lquant>llim+1) && (pos(0)==0))
361 if ((lquant>llim+1) && (pos(0)==0))
366 cerr <<
"Unknow radial basis in Domain_nucleus::nbr_unknowns_val_domain" << endl ;
379 if ((pos(1)==0) && (pos(2)==0))
388 cerr <<
"Unknown case in Domain_nucleus_nbr_conditions" << endl ;
405 int size = (n_cmp==-1) ? tt.
get_n_comp() : n_cmp ;
424 else for (
int i=0 ; i<n_cmp ; i++) {
425 if ((*p_cmp[i])(0)==1)
427 if ((*p_cmp[i])(0)==2)
429 if ((*p_cmp[i])(0)==3)
441 else for (
int i=0 ; i<n_cmp ; i++) {
442 if ((*p_cmp[i])(0)==1)
444 if ((*p_cmp[i])(0)==2)
446 if ((*p_cmp[i])(0)==3)
452 cerr <<
"Unknown type of vector Domain_nucleus::nbr_conditions" << endl ;
469 else for (
int i=0 ; i<n_cmp ; i++) {
470 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
472 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
474 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
476 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
478 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
480 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
498 else for (
int i=0 ; i<n_cmp ; i++) {
499 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
501 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
503 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
505 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
507 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
509 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
511 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
513 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
515 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
521 cerr <<
"Unknown type of 2-tensor Domain_nucleus::nbr_conditions" << endl ;
527 cerr <<
"Valence " << val <<
" not implemented in Domain_nucleus::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_vt(const Val_domain &so, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
int nbr_conditions_val_domain(const Val_domain &so, int mlim, int llim, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
int nbr_conditions_val_domain_vr(const Val_domain &so, 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_vp(const Val_domain &so, 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 .
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.
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.