21 #ifndef fiber_test_scalar_kernel_trial_integrand_functor_hpp
22 #define fiber_test_scalar_kernel_trial_integrand_functor_hpp
24 #include "../common/common.hpp"
27 #include "collection_of_3d_arrays.hpp"
28 #include "geometrical_data.hpp"
29 #include "conjugate.hpp"
30 #include "scalar_traits.hpp"
41 template <
typename BasisFunctionType_,
typename KernelType_,
46 typedef BasisFunctionType_ BasisFunctionType;
47 typedef KernelType_ KernelType;
48 typedef ResultType_ ResultType;
51 void addGeometricalDependencies(
size_t& testGeomDeps,
size_t& trialGeomDeps)
const {
55 template <
template <
typename T>
class CollectionOf2dSlicesOfConstNdArrays>
61 const CollectionOf2dSlicesOfConstNdArrays<KernelType>& kernelValues)
const {
63 assert(kernelValues.size() >= 1);
64 assert(kernelValues[0].extent(0) == 1);
65 assert(kernelValues[0].extent(1) == 1);
69 assert(testValues.size() >= 1);
70 assert(trialValues.size() >= 1);
71 const size_t transCount = testValues.size();
72 assert(trialValues.size() == transCount);
73 if (kernelValues.size() > 1)
74 assert(kernelValues.size() == transCount);
76 ResultType result = 0.;
77 for (
size_t transIndex = 0; transIndex < transCount; ++transIndex) {
78 const size_t transDim = testValues[transIndex].extent(0);
79 assert(trialValues[transIndex].extent(0) == transDim);
80 BasisFunctionType dotProduct = 0.;
81 for (
size_t dim = 0; dim < transDim; ++dim)
82 dotProduct += conjugate(testValues[transIndex](dim)) *
83 trialValues[transIndex](dim);
85 result += dotProduct * kernelValues[0](0, 0);
87 result += dotProduct * kernelValues[transIndex](0, 0);
Traits of scalar types.
Definition: scalar_traits.hpp:40
Definition: collection_of_3d_arrays.hpp:151
Functor evaluating the integrand of most standard boundary integral operators.
Definition: test_scalar_kernel_trial_integrand_functor.hpp:43
Access to slices of geometrical data.
Definition: geometrical_data.hpp:88