BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
default_collection_of_shapeset_transformations.hpp
1 // Copyright (C) 2011-2012 by the BEM++ Authors
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 // THE SOFTWARE.
20 
21 #ifndef fiber_default_collection_of_shapeset_transformations_hpp
22 #define fiber_default_collection_of_shapeset_transformations_hpp
23 
24 #include "collection_of_basis_transformations.hpp"
25 
26 namespace Fiber
27 {
28 
76 template <typename Functor>
78  public CollectionOfBasisTransformations<typename Functor::CoordinateType>
79 {
81 public:
82  typedef typename Base::CoordinateType CoordinateType;
83  typedef typename Base::ComplexType ComplexType;
84 
85  explicit DefaultCollectionOfShapesetTransformations(const Functor& functor) :
86  m_functor(functor)
87  {}
88 
89  virtual int transformationCount() const;
90  virtual int argumentDimension() const;
91  virtual int resultDimension(int transformationIndex) const;
92  virtual void addDependencies(size_t& basisDeps, size_t& geomDeps) const;
93 
94 private:
95  template <typename ValueType>
96  void evaluateImpl(
97  const BasisData<ValueType>& basisData,
98  const GeometricalData<CoordinateType>& geomData,
99  CollectionOf3dArrays<ValueType>& result) const;
100 
101  virtual void evaluateImplReal(
102  const BasisData<CoordinateType>& basisData,
103  const GeometricalData<CoordinateType>& geomData,
105 
106  virtual void evaluateImplComplex(
107  const BasisData<ComplexType>& basisData,
108  const GeometricalData<CoordinateType>& geomData,
109  CollectionOf3dArrays<ComplexType>& result) const;
110 
111 private:
112  Functor m_functor;
113 };
114 
115 } // namespace Fiber
116 
117 #include "default_collection_of_shapeset_transformations_imp.hpp"
118 
119 #endif
Storage of geometrical data.
Definition: geometrical_data.hpp:54
Definition: collection_of_3d_arrays.hpp:39
Default implementation of a collection of shape function transformations.
Definition: default_collection_of_shapeset_transformations.hpp:77
virtual int resultDimension(int transformationIndex) const
Return the number of components of the result of i&#39;th transformation.
Definition: default_collection_of_shapeset_transformations_imp.hpp:49
Collection of shape function transformations.
Definition: collection_of_basis_transformations.hpp:36
virtual void addDependencies(size_t &basisDeps, size_t &geomDeps) const
Retrieve the types of data on which the transformations depend.
Definition: default_collection_of_shapeset_transformations_imp.hpp:27
Storage of values and/or derivatives of shape functions.
Definition: basis_data.hpp:44
virtual int transformationCount() const
Return the number of transformations belonging to the collection.
Definition: default_collection_of_shapeset_transformations_imp.hpp:35
virtual int argumentDimension() const
Return the number of components of shape functions acted upon.
Definition: default_collection_of_shapeset_transformations_imp.hpp:42