20 #include "headcpp.hpp"
22 #include "bispheric.hpp"
24 #include "tensor_impl.hpp"
33 if ((bound==INNER_BC) || (bound==OUTER_BC)) {
45 if ((pos(2)%2==1) && (pos(1)==
nbr_coefs(1)-1))
48 if ((pos(2)!=0) && (pos(2)%2==0) && (pos(1)==0))
53 if ((pos(2)==0) || (pos(2)==
nbr_coefs(2)-1))
56 if ((pos(2)%2==1) && (pos(1)==
nbr_coefs(1)-1))
59 if ((pos(2)%2==0) && (pos(1)==0))
63 cerr <<
"Unknwon phi basis in Domain_bispheric_chi_first::nbr_conditions_val_boundary" << endl ;
73 if (bound==CHI_ONE_BC)
82 if ((bound!=INNER_BC) && (bound!=CHI_ONE_BC) && (bound!=OUTER_BC)) {
83 cerr <<
"Unknown boundary in Domain_bispheric_chi_first::nbr_conditions_boundary" << endl ;
87 int size = (n_cmp==-1) ? tt.
get_n_comp() : n_cmp ;
103 else for (
int i=0 ; i<n_cmp ; i++) {
104 if ((*p_cmp[i])(0)==1)
106 if ((*p_cmp[i])(0)==2)
108 if ((*p_cmp[i])(0)==3)
114 cerr <<
"Unknown type of vector Domain_bispheric_chi_first::nbr_conditions_boundary" << endl ;
131 else for (
int i=0 ; i<n_cmp ; i++) {
132 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
134 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
136 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
138 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
140 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
142 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
160 else for (
int i=0 ; i<n_cmp ; i++) {
161 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
163 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
165 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
167 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
169 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
171 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
173 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
175 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
177 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
183 cerr <<
"Unknown type of 2-tensor Domain_bispheric_chi_first::nbr_conditions_boundary" << endl ;
189 cerr <<
"Valence " << val <<
" not implemented in Domain_bispheric_chi_first::nbr_conditions_boundary" << 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 Array< int > nbr_conditions_boundary(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 on a boundary.
int nbr_conditions_val_domain_boundary(const Val_domain &eq, int bound) const
Computes number of discretized equations associated with a given equation on a boundary.
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.
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.