20 #include "headcpp.hpp"
22 #include "utilities.hpp"
23 #include "spheric.hpp"
24 #include "term_eq.hpp"
26 #include "tensor_impl.hpp"
32 if (parts[0]->get_valence() !=0) {
33 for (
int i=0 ; i<n_ope ; i++) {
34 if (parts[i]->get_basis().get_basis(zedoms(i)) != CARTESIAN_BASIS) {
35 cerr <<
"Import must be called with a Cartesian tensorial basis" << endl ;
41 Tensor res (*parts[0],
false);
44 res.
cmp[nc]->set_domain(numdom).allocate_conf() ;
47 for (
int i=0 ; i<n_ope ; i++)
48 for (
int nc=0 ; nc<parts[i]->
get_n_comp() ; nc++)
49 parts[i]->cmp[nc]->set_domain(zedoms(i)).
coef() ;
65 cerr <<
"Unknown boundary in Domain_shell::import" << endl ;
75 pos_bound.
set(0) = index_r ;
76 pos_bound.
set(1) = j ;
77 pos_bound.
set(2) = k ;
81 MM.
set(1) = xx(pos_bound) ;
82 MM.
set(2) = yy(pos_bound) ;
83 MM.
set(3) = zz(pos_bound) ;
88 while ((current<n_ope) && (!found)) {
89 if (parts[0]->get_space().get_domain(zedoms(current))->
is_in(MM, 1e-12))
95 cerr <<
"Point " << MM <<
" not found in other domains, for Domain_shell::import" << endl ;
100 Point num (parts[0]->get_space().get_domain(zedoms(current))->
absol_to_num(MM)) ;
104 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) ;
111 res.
cmp[nc]->set_domain(numdom).set(pos) = val ;
117 res.
set_basis(numdom) = CARTESIAN_BASIS ;
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.
int & set_basis(int dd)
Assigns a new tensorial basis in a given domain.
Class for storing the basis of decompositions of a field and its values on both the configuration and...