21 #ifndef fiber_surface_curl_3d_functor_hpp
22 #define fiber_surface_curl_3d_functor_hpp
24 #include "../common/common.hpp"
26 #include "basis_data.hpp"
27 #include "geometrical_data.hpp"
28 #include "collection_of_3d_arrays.hpp"
29 #include "shape_transformation_functor_wrappers.hpp"
31 #include <boost/array.hpp>
36 template <
typename CoordinateType_>
40 typedef CoordinateType_ CoordinateType;
42 int argumentDimension()
const {
return 1; }
43 int resultDimension()
const {
return 3; }
45 void addDependencies(
size_t& basisDeps,
size_t& geomDeps)
const {
46 basisDeps |= DERIVATIVES;
47 geomDeps |= NORMALS | JACOBIAN_INVERSES_TRANSPOSED;
50 template <
typename ValueType>
56 assert(geomData.dimWorld() == 3);
60 boost::array<ValueType, 3> vec;
61 vec[0] = basisData.
derivatives(0, 0) * geomData.jacobianInverseTransposed(0, 0) +
62 basisData.
derivatives(0, 1) * geomData.jacobianInverseTransposed(0, 1);
63 vec[1] = basisData.
derivatives(0, 0) * geomData.jacobianInverseTransposed(1, 0) +
64 basisData.
derivatives(0, 1) * geomData.jacobianInverseTransposed(1, 1);
65 vec[2] = basisData.
derivatives(0, 0) * geomData.jacobianInverseTransposed(2, 0) +
66 basisData.
derivatives(0, 1) * geomData.jacobianInverseTransposed(2, 1);
69 result(0) = geomData.normal(1) * vec[2] - geomData.normal(2) * vec[1];
70 result(1) = geomData.normal(2) * vec[0] - geomData.normal(0) * vec[2];
71 result(2) = geomData.normal(0) * vec[1] - geomData.normal(1) * vec[0];
79 template <
typename CoordinateType_>
82 SurfaceCurl3dElementaryFunctor<CoordinateType_> >
85 typedef CoordinateType_ CoordinateType;
int componentCount() const
Return the number of components of the function.
Definition: basis_data.hpp:111
Functor calculating the surface curl of a scalar field in 3D.
Definition: surface_curl_3d_functor.hpp:80
Definition: surface_curl_3d_functor.hpp:37
Lightweight encapsulation of a 1D slice of a 3D array.
Definition: _3d_array.hpp:155
ValueType derivatives(int dim, int direction) const
Return the value of the dim'th component of the derivative of the function in a given direction...
Definition: basis_data.hpp:106
Access to slices of geometrical data.
Definition: geometrical_data.hpp:88
Access to values and/or derivatives of shape functions.
Definition: basis_data.hpp:91