20 #include "headcpp.hpp"
21 #include "utilities.hpp"
22 #include "adapted.hpp"
24 #include "array_math.hpp"
25 #include "term_eq.hpp"
27 #include "tensor_impl.hpp"
33 #ifndef REMOVE_ALL_CHECKS
34 if (parts[0]->get_valence() !=0) {
35 for (
int i=0 ; i<n_ope ; i++) {
36 if (parts[i]->get_basis().get_basis(zedoms(i)) != CARTESIAN_BASIS) {
37 cerr <<
"Import must be called with a Cartesian tensorial basis" << endl ;
44 Tensor res (*parts[0],
false);
47 res.
cmp[nc]->set_domain(numdom).allocate_conf() ;
50 for (
int i=0 ; i<n_ope ; i++)
51 for (
int nc=0 ; nc<parts[i]->
get_n_comp() ; nc++)
52 parts[i]->cmp[nc]->set_domain(zedoms(i)).
coef() ;
68 cerr <<
"Unknown boundary in Domain_shell_outer_adapted::import" << endl ;
78 pos_bound.
set(0) = index_r ;
79 pos_bound.
set(1) = j ;
80 pos_bound.
set(2) = k ;
84 MM.
set(1) = xx(pos_bound) ;
85 MM.
set(2) = yy(pos_bound) ;
86 MM.
set(3) = zz(pos_bound) ;
91 while ((current<n_ope) && (!found)) {
92 if (parts[0]->get_space().get_domain(zedoms(current))->
is_in(MM))
97 #ifndef REMOVE_ALL_CHECKS
99 cerr <<
"Point " << MM <<
" not found in other domains, for Domain_shell_outer_adapted::import" << endl ;
105 Point num (parts[0]->get_space().get_domain(zedoms(current))->
absol_to_num(MM)) ;
109 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) ;
116 res.
cmp[nc]->set_domain(numdom).set(pos) = val ;
122 res.
set_basis(numdom) = CARTESIAN_BASIS ;
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.
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 &) const
Computes the numerical coordinates from the physical ones.
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...