20 #include "headcpp.hpp"
21 #include "bispheric.hpp"
23 #include "tensor_impl.hpp"
32 if (bound==INNER_BC) {
44 if ((pos(2)%2==1) && (pos(1)==
nbr_coefs(1)-1))
47 if ((pos(2)!=0) && (pos(2)%2==0) && (pos(1)==0))
52 if ((pos(2)==0) || (pos(2)==
nbr_coefs(2)-1))
55 if ((pos(2)%2==1) && (pos(1)==
nbr_coefs(1)-1))
58 if ((pos(2)%2==0) && (pos(1)==0))
62 cerr <<
"Unknwon phi basis in Domain_bispheric_rect::nbr_conditions_val_boundary" << endl ;
72 if (bound==ETA_PLUS_BC) {
75 bool true_other = true ;
82 if ((k!=0) && (k%2==0) && (j==0))
95 if ((k%2==0) && (j==0))
101 cerr <<
"Unknwon phi basis in Domain_bispheric_rect::nbr_conditions_vall_boundary" << endl ;
109 if (bound==CHI_ONE_BC)
121 if ((bound!=INNER_BC) && (bound!=CHI_ONE_BC) && (bound!=ETA_PLUS_BC) && (bound!=OUTER_BC)) {
122 cerr <<
"Unknown boundary in Domain_bispheric_rect::nbr_conditions_boundary" << endl ;
126 int size = (n_cmp==-1) ? tt.
get_n_comp() : n_cmp ;
142 else for (
int i=0 ; i<n_cmp ; i++) {
143 if ((*p_cmp[i])(0)==1)
145 if ((*p_cmp[i])(0)==2)
147 if ((*p_cmp[i])(0)==3)
153 cerr <<
"Unknown type of vector Domain_bispheric_rect::nbr_conditions_boundary" << endl ;
170 else for (
int i=0 ; i<n_cmp ; i++) {
171 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
173 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
175 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
177 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
179 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
181 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
199 else for (
int i=0 ; i<n_cmp ; i++) {
200 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
202 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
204 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
206 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
208 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
210 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
212 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
214 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
216 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
222 cerr <<
"Unknown type of 2-tensor Domain_bispheric_rect::nbr_conditions_boundary" << endl ;
228 cerr <<
"Valence " << val <<
" not implemented in Domain_bispheric_rect::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.