20 #include "headcpp.hpp"
22 #include "utilities.hpp"
23 #include "bispheric.hpp"
24 #include "term_eq.hpp"
26 #include "tensor_impl.hpp"
32 Tensor res (*parts[0],
false);
35 res.
cmp[nc]->set_domain(numdom).allocate_conf() ;
38 for (
int i=0 ; i<n_ope ; i++)
39 for (
int nc=0 ; nc<parts[i]->
get_n_comp() ; nc++)
40 parts[i]->cmp[nc]->set_domain(zedoms(i)).
coef() ;
47 if (bound==INNER_BC) {
56 pos_bound.
set(0) = index_mu ;
57 pos_bound.
set(1) = j ;
58 pos_bound.
set(2) = k ;
62 MM.
set(1) = xx(pos_bound) ;
63 MM.
set(2) = yy(pos_bound) ;
64 MM.
set(3) = zz(pos_bound) ;
69 while ((current<n_ope) && (!found)) {
70 if (parts[0]->get_space().get_domain(zedoms(current))->
is_in(MM))
76 cerr <<
"Point " << MM <<
" not found in other domains, for Domain_bispheric_rect::import" << endl ;
85 double val = ((*parts[current]->
cmp[nc])(zedoms(current)).check_if_zero()) ? 0 : (*parts[current]->cmp[nc])(zedoms(current)).get_base().summation (num, *(*parts[current]->cmp[nc])(zedoms(current)).cf) ;
92 res.
cmp[nc]->set_domain(numdom).set(pos) = val ;
103 if (bound==OUTER_BC) {
113 pos_bound.
set(0) = index_mu ;
114 pos_bound.
set(1) = index_chi ;
115 pos_bound.
set(2) = k ;
119 MM.
set(1) = xx(pos_bound) ;
120 MM.
set(2) = yy(pos_bound) ;
121 MM.
set(3) = zz(pos_bound) ;
126 while ((current<n_ope) && (!found)) {
127 if (parts[0]->get_space().get_domain(zedoms(current))->
is_in(MM))
133 cerr <<
"Point " << MM <<
" not found in other domains, for Domain_bispheric_rect::import" << endl ;
138 Point num (parts[0]->get_space().get_domain(zedoms(current))->
absol_to_num(MM)) ;
142 double val = ((*parts[current]->
cmp[nc])(zedoms(current)).check_if_zero()) ? 0 : (*parts[current]->cmp[nc])(zedoms(current)).get_base().summation (num, *(*parts[current]->cmp[nc])(zedoms(current)).cf) ;
150 res.
cmp[nc]->set_domain(numdom).set(pos) = val ;
160 cerr <<
"unknown bound in Domain_bispheric_rect::import" << endl ;
virtual bool is_in(const Point &xx, double prec=1e-13) const
Check whether a point lies inside Domain.
virtual const Point absol_to_num(const Point &xxx) const
Computes the numerical coordinates from the physical ones.
virtual Tensor import(int, int, int, const Array< int > &, Tensor **) const
Gets the value of a Tensor by importing data from neighboring domains, on a boundary.
Dim_array const & get_nbr_points() const
Returns the number of points.
Dim_array nbr_points
Number of colocation points.
Val_domain const & get_cart(int i) const
Returns a Cartesian coordinates.
Class that gives the position inside a multi-dimensional Array.
int & set(int i)
Read/write of the position in a given dimension.
The class Point is used to store the coordinates of a point.
double & set(int i)
Read/write of a coordinate.
void coef() const
Computes the coefficients.
virtual void std_base()
Sets the standard spectal bases of decomposition for each component.
Memory_mapped_array< Scalar * > cmp
Array of size n_comp of pointers onto the components.
int get_n_comp() const
Returns the number of stored components.
Class for storing the basis of decompositions of a field and its values on both the configuration and...