21 #ifndef fiber_modified_helmholtz_3d_hypersingular_integrand_functor_2_hpp
22 #define fiber_modified_helmholtz_3d_hypersingular_integrand_functor_2_hpp
24 #include "../common/common.hpp"
27 #include "collection_of_3d_arrays.hpp"
28 #include "geometrical_data.hpp"
29 #include "conjugate.hpp"
36 template <
typename BasisFunctionType_,
typename KernelType_,
41 typedef BasisFunctionType_ BasisFunctionType;
42 typedef KernelType_ KernelType;
43 typedef ResultType_ ResultType;
46 void addGeometricalDependencies(
size_t& testGeomDeps,
size_t& trialGeomDeps)
const {
47 testGeomDeps |= NORMALS;
48 trialGeomDeps |= NORMALS;
51 template <
template <
typename T>
class CollectionOf2dSlicesOfConstNdArrays>
57 const CollectionOf2dSlicesOfConstNdArrays<KernelType>& kernelValues)
const {
58 const int dimWorld = 3;
61 assert(kernelValues.size() >= 2);
62 assert(kernelValues[0].extent(0) == 1);
63 assert(kernelValues[0].extent(1) == 1);
64 assert(kernelValues[1].extent(0) == 1);
65 assert(kernelValues[1].extent(1) == 1);
69 assert(testTransfValues.size() >= 2);
70 assert(trialTransfValues.size() >= 2);
75 assert(testValues.extent(0) == 1);
76 assert(trialValues.extent(0) == 1);
77 assert((
int)testSurfaceCurls.extent(0) == dimWorld);
78 assert((
int)trialSurfaceCurls.extent(0) == dimWorld);
84 BasisFunctionType dotProduct0 = 0.;
85 for (
int dim = 0; dim < dimWorld; ++dim)
86 dotProduct0 += conjugate(testSurfaceCurls(dim)) * trialSurfaceCurls(dim);
87 ResultType term0 = kernelValues[0](0, 0) * dotProduct0;
88 CoordinateType dotProduct1 = 0.;
89 for (
int dim = 0; dim < dimWorld; ++dim)
90 dotProduct1 += testGeomData.normal(dim) * trialGeomData.normal(dim);
91 ResultType term1 = kernelValues[1](0, 0) *
92 (dotProduct1 * conjugate(testValues(0)) * trialValues(0));
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
Functor evaluating the integrand of the hypersingular operator for the modified Helmholtz equation in...
Definition: modified_helmholtz_3d_hypersingular_integrand_functor_2.hpp:38
Access to slices of geometrical data.
Definition: geometrical_data.hpp:88