BEM++  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
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_collection_of_shapeset_transformations_hpp
22 #define fiber_collection_of_shapeset_transformations_hpp
23 
24 #include "../common/common.hpp"
25 
26 #include "scalar_traits.hpp"
27 
28 namespace Fiber
29 {
30 
32 template <typename T> class CollectionOf3dArrays;
33 template <typename ValueType> class BasisData;
34 template <typename CoordinateType> class GeometricalData;
63 template <typename CoordinateType_>
65 {
66 public:
67  typedef CoordinateType_ CoordinateType;
68  typedef typename ScalarTraits<CoordinateType>::ComplexType ComplexType;
69 
72  {}
73 
75  virtual int transformationCount() const = 0;
76 
83  virtual int argumentDimension() const = 0;
84 
95  virtual int resultDimension(int i) const = 0;
96 
113  virtual void addDependencies(size_t& basisDeps, size_t& geomDeps) const = 0;
114 
141  void evaluate(
142  const BasisData<CoordinateType>& basisData,
143  const GeometricalData<CoordinateType>& geomData,
144  CollectionOf3dArrays<CoordinateType>& result) const {
145  evaluateImplReal(basisData, geomData, result);
146  }
147 
153  void evaluate(
154  const BasisData<ComplexType>& basisData,
155  const GeometricalData<CoordinateType>& geomData,
156  CollectionOf3dArrays<ComplexType>& result) const {
157  evaluateImplComplex(basisData, geomData, result);
158  }
159 
160 private:
190  virtual void evaluateImplReal(
191  const BasisData<CoordinateType>& basisData,
192  const GeometricalData<CoordinateType>& geomData,
193  CollectionOf3dArrays<CoordinateType>& result) const = 0;
194 
199  virtual void evaluateImplComplex(
200  const BasisData<ComplexType>& basisData,
201  const GeometricalData<CoordinateType>& geomData,
202  CollectionOf3dArrays<ComplexType>& result) const = 0;
203 };
204 
205 } // namespace Fiber
206 
207 #endif
208 
Traits of scalar types.
Definition: scalar_traits.hpp:40
void evaluate(const BasisData< CoordinateType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< CoordinateType > &result) const
Evaluate transformations of real-valued shape functions.
Definition: collection_of_shapeset_transformations.hpp:141
virtual void evaluateImplComplex(const BasisData< ComplexType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ComplexType > &result) const =0
Evaluate transformations of complex-valued shape functions.
void evaluate(const BasisData< ComplexType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< ComplexType > &result) const
Evaluate transformations of complex-valued shape functions.
Definition: collection_of_shapeset_transformations.hpp:153
Storage of geometrical data.
Definition: geometrical_data.hpp:54
Definition: collection_of_3d_arrays.hpp:39
virtual int argumentDimension() const =0
Return the number of components of shape functions acted upon.
Collection of shape function transformations.
Definition: collection_of_shapeset_transformations.hpp:64
virtual void evaluateImplReal(const BasisData< CoordinateType > &basisData, const GeometricalData< CoordinateType > &geomData, CollectionOf3dArrays< CoordinateType > &result) const =0
Evaluate transformations of real-valued shape functions.
Storage of values and/or derivatives of shape functions.
Definition: basis_data.hpp:44
virtual int resultDimension(int i) const =0
Return the number of components of the result of i&#39;th transformation.
virtual void addDependencies(size_t &basisDeps, size_t &geomDeps) const =0
Retrieve the types of data on which the transformations depend.
virtual ~CollectionOfShapesetTransformations()
Destructor.
Definition: collection_of_shapeset_transformations.hpp:71
virtual int transformationCount() const =0
Return the number of transformations belonging to the collection.