21 #ifndef fiber_modified_helmholtz_3d_hypersingular_integrand_functor_hpp
22 #define fiber_modified_helmholtz_3d_hypersingular_integrand_functor_hpp
24 #include "../common/common.hpp"
25 #include "../common/deprecated.hpp"
27 #include "collection_of_3d_arrays.hpp"
28 #include "geometrical_data.hpp"
29 #include "conjugate.hpp"
30 #include "geometrical_data.hpp"
42 template <
typename BasisFunctionType_,
typename KernelType_,
47 typedef BasisFunctionType_ BasisFunctionType;
48 typedef KernelType_ KernelType;
49 typedef ResultType_ ResultType;
53 KernelType waveNumber) :
54 m_waveNumber(waveNumber)
57 void addGeometricalDependencies(
size_t& testGeomDeps,
size_t& trialGeomDeps)
const {
58 testGeomDeps |= NORMALS;
59 trialGeomDeps |= NORMALS;
62 KernelType waveNumber()
const {
return m_waveNumber; }
67 template <
template <
typename T>
class CollectionOf2dSlicesOfConstNdArrays>
73 const CollectionOf2dSlicesOfConstNdArrays<KernelType>& kernelValues)
const {
74 const int dimWorld = 3;
77 assert(kernelValues.size() >= 1);
78 assert(kernelValues[0].extent(0) == 1);
79 assert(kernelValues[0].extent(1) == 1);
83 assert(testTransfValues.size() >= 2);
84 assert(trialTransfValues.size() >= 2);
89 assert(testValues.extent(0) == 1);
90 assert(trialValues.extent(0) == 1);
91 assert((
int)testSurfaceCurls.extent(0) == dimWorld);
92 assert((
int)trialSurfaceCurls.extent(0) == dimWorld);
96 ResultType result = 0.;
97 for (
int dim = 0; dim < dimWorld; ++dim)
98 result += testGeomData.normal(dim) * trialGeomData.normal(dim);
99 result *= m_waveNumber * m_waveNumber *
100 conjugate(testValues(0)) * trialValues(0);
101 for (
int dim = 0; dim < dimWorld; ++dim)
102 result += conjugate(testSurfaceCurls(dim)) *
103 trialSurfaceCurls(dim);
104 result *= kernelValues[0](0, 0);
109 KernelType m_waveNumber;
Traits of scalar types.
Definition: scalar_traits.hpp:40
Definition: collection_of_3d_arrays.hpp:151
Lightweight encapsulation of a 1D slice of a constant 3D array.
Definition: _3d_array.hpp:185
#define BEMPP_DEPRECATED
Macro used to mark deprecated functions or classes.
Definition: deprecated.hpp:41
Functor evaluating the integrand of the hypersingular operator for the modified Helmholtz equation in...
Definition: modified_helmholtz_3d_hypersingular_integrand_functor.hpp:44
Access to slices of geometrical data.
Definition: geometrical_data.hpp:88