11 #ifndef BEMBEL_SRC_POTENTIAL_DISCRETEPOTENTIAL_HPP_
12 #define BEMBEL_SRC_POTENTIAL_DISCRETEPOTENTIAL_HPP_
20 template <
typename Derived,
typename LinOp>
34 ansatz_space_ = ansatz_space;
49 evaluate(
const Eigen::Matrix<double, Eigen::Dynamic, 3> &points) {
50 auto FunctionSpaceVectorDimension =
51 getFunctionSpaceVectorDimension<LinearOperatorTraits<LinOp>::Form>();
59 const ElementTree &element_tree = super_space.get_mesh().get_element_tree();
62 auto polynomial_degree = super_space.get_polynomial_degree();
63 auto polynomial_degree_plus_one_squared =
64 (polynomial_degree + 1) * (polynomial_degree + 1);
72 potential.resize(points.rows(),
84 my_potential.resize(points.rows(),
86 my_potential.setZero();
87 for (
auto element = element_tree.
cpbegin();
88 element != element_tree.
cpend(); ++element) {
89 #pragma omp single nowait
92 for (
auto j = 0; j < Q.w_.size(); ++j) {
93 super_space.map2surface(
94 *element, Q.xi_.col(j),
95 element->get_h() * element->get_h() * Q.w_(j), &qp);
96 for (
auto i = 0; i < points.rows(); ++i) {
97 my_potential.row(i) += pot_.evaluateIntegrand_impl(
98 fun_ev_, *element, points.row(i), qp);
104 potential += my_potential;
111 void set_cauchy_data(
112 const Eigen::Matrix<
typename LinearOperatorTraits<LinOp>::Scalar,
113 Eigen::Dynamic, 1> &cauchy_data) {
114 fun_ev_.set_function(cauchy_data);
116 void set_degree(
const int °) { deg_ = deg; }
120 Derived &get_potential() {
return pot_; }
127 AnsatzSpace<LinOp> ansatz_space_;
128 FunctionEvaluator<LinOp> fun_ev_;
int get_polynomial_degree() const
Retrieves the polynomial degree of this AnsatzSpace.
const SuperSpace< Derived > & get_superspace() const
Retrieves the reference to the SuperSpace associated with this AnsatzSpace.
void init_DiscretePotential(const AnsatzSpace< LinOp > &ansatz_space)
This class organizes an element structure on a Geometry object and handles refinement.
ElementTreeNode::const_iterator cpbegin() const
Returns an iterator to the beginning of the sequence represented by the leafs as ElementTreeNodes of ...
ElementTreeNode::const_iterator cpend() const
Returns an iterator one past the end of the sequence represented by the leafs as ElementTreeNodes of ...
int get_number_of_elements() const
Return number of elements in the ElementTree.
Eigen::Matrix< double, 12, 1 > SurfacePoint
typedef of SurfacePoint
Routines for the evalutation of pointwise errors.
struct containing specifications on the linear operator has to be specialized or derived for any part...
Base case for specifying the return type of the potential.
struct containing specifications on the functional has to be specialized or derived for any particula...