dune-fem  2.8-git
evaluatecallerdefaultimpl.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_SAPCE_EVALUATECALLERDEFAULTIMPL_HH
2 #define DUNE_FEM_SAPCE_EVALUATECALLERDEFAULTIMPL_HH
3 
4 #include <iostream>
5 
7 
8 namespace Dune {
9 namespace Fem {
10 namespace Codegen {
11 
13 //
14 // evaluate and store results in a vector
15 //
17 template <class BaseFunctionSet, class Geometry, int dimRange, int numRows, int numCols>
19 {
20  template< class QuadratureType,
21  class RangeVectorType,
22  class LocalDofVectorType,
23  class RangeFactorType>
24  static void eval( const QuadratureType& quad,
25  const RangeVectorType& rangeStorage,
26  const LocalDofVectorType& dofs,
27  RangeFactorType &rangeFactors )
28  {
29  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::evaluateRanges< "
30  << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
31  std::abort();
32  }
33 };
34 
35 template <class BaseFunctionSet, int dimRange, int numRows, int numCols>
36 struct EvaluateRanges<BaseFunctionSet, EmptyGeometry, dimRange, numRows, numCols >
37 {
38  template< class QuadratureType,
39  class RangeVectorType,
40  class LocalDofVectorType,
41  class RangeFactorType>
42  static void eval( const QuadratureType& quad,
43  const RangeVectorType& rangeStorage,
44  const LocalDofVectorType& dofs,
45  RangeFactorType &rangeFactors)
46  {
47  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::evaluateRanges< "
48  << "EmptyGeo, " << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
49  std::abort();
50  }
51 };
52 
54 //
55 // --evaluateJacobians
56 //
58 template <class BaseFunctionSet, class Geometry,
59  int dimRange, int numRows, int numCols>
61 {
62  template< class QuadratureType,
63  class JacobianRangeVectorType,
64  class JacobianRangeFactorType,
65  class LocalDofVectorType>
66  static void eval( const QuadratureType& quad,
67  const Geometry& geometry,
68  const JacobianRangeVectorType& jacobianStorage,
69  const LocalDofVectorType& dofs,
70  JacobianRangeFactorType &jacFactors)
71  {
72  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::evaluateJacobians< "
73  << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
74  std::abort();
75  }
76 };
77 
78 template <class BaseFunctionSet,
79  int dimRange, int numRows, int numCols>
80 struct EvaluateJacobians< BaseFunctionSet, EmptyGeometry, dimRange, numRows, numCols >
81 {
82  template< class QuadratureType,
83  class JacobianRangeVectorType,
84  class JacobianRangeFactorType,
85  class LocalDofVectorType>
86  static void eval( const QuadratureType&,
87  const EmptyGeometry&,
88  const JacobianRangeVectorType&,
89  const LocalDofVectorType&,
90  const JacobianRangeFactorType& )
91  {
92  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::evaluateJacobians< "
93  << "EmptyGeo, " << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
94  std::abort();
95  }
96 };
97 
99 //
100 // --axpyRanges -- add a vector of ranges to the dof vector
101 //
103 template <class BaseFunctionSet, class Geometry,
104  int dimRange, int numRows, int numCols>
106 {
107  template< class QuadratureType,
108  class RangeVectorType,
109  class RangeFactorType,
110  class LocalDofVectorType>
111  static void axpy( const QuadratureType& quad,
112  const RangeVectorType& rangeStorage,
113  const RangeFactorType &rangeFactors,
114  LocalDofVectorType& dofs)
115  {
116  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::axpyRanges <"
117  << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
118  std::abort();
119  }
120 };
121 
122 template <class BaseFunctionSet,
123  int dimRange, int numRows, int numCols>
124 struct AxpyRanges<BaseFunctionSet, EmptyGeometry, dimRange, numRows, numCols>
125 {
126  template< class QuadratureType,
127  class RangeVectorType,
128  class RangeFactorType,
129  class LocalDofVectorType>
130  static void axpy( const QuadratureType& quad,
131  const RangeVectorType& rangeStorage,
132  const RangeFactorType &rangeFactors,
133  LocalDofVectorType& dofs)
134  {
135  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::axpyRanges <"
136  << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
137  std::abort();
138  }
139 };
140 
141 
143 // applyAxpy Jacobian
145 template <class BaseFunctionSet, class Geometry,
146  int dimRange, int numRows, int numCols>
148 {
149  template< class QuadratureType,
150  class JacobianRangeVectorType,
151  class JacobianRangeFactorType,
152  class LocalDofVectorType>
153  static void axpy( const QuadratureType& quad,
154  const Geometry& geometry,
155  const JacobianRangeVectorType& jacobianStorage,
156  const JacobianRangeFactorType& jacFactors,
157  LocalDofVectorType& dofs)
158  {
159  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::axpyJacobian <"
160  << dimRange << " , " << numRows << " , " << numCols << " >!" << std::endl;
161  std::abort();
162  }
163 };
164 
165 template <class BaseFunctionSet,
166  int dimRange, int numRows, int numCols>
167 struct AxpyJacobians< BaseFunctionSet, EmptyGeometry, dimRange, numRows, numCols >
168 {
169  template< class QuadratureType,
170  class JacobianRangeVectorType,
171  class JacobianRangeFactorType,
172  class LocalDofVectorType>
173  static void axpy( const QuadratureType&,
174  const EmptyGeometry&,
175  const JacobianRangeVectorType&,
176  const JacobianRangeFactorType &,
177  LocalDofVectorType&)
178  {
179  std::cerr << "ERROR: wrong code generated for VectorialBaseFunctionSet::axpyJacobians" << std::endl;
180  std::abort();
181  }
182 };
183 
184 }}}
185 
186 #endif
Definition: bindguard.hh:11
IteratorRange< typename DF::DofIteratorType > dofs(DF &df)
Iterates over all DOFs.
Definition: rangegenerators.hh:76
Definition: evaluatecallerdeclaration.hh:14
Definition: evaluatecallerdefaultimpl.hh:19
static void eval(const QuadratureType &quad, const RangeVectorType &rangeStorage, const LocalDofVectorType &dofs, RangeFactorType &rangeFactors)
Definition: evaluatecallerdefaultimpl.hh:24
Definition: evaluatecallerdefaultimpl.hh:61
static void eval(const QuadratureType &quad, const Geometry &geometry, const JacobianRangeVectorType &jacobianStorage, const LocalDofVectorType &dofs, JacobianRangeFactorType &jacFactors)
Definition: evaluatecallerdefaultimpl.hh:66
Definition: evaluatecallerdefaultimpl.hh:106
static void axpy(const QuadratureType &quad, const RangeVectorType &rangeStorage, const RangeFactorType &rangeFactors, LocalDofVectorType &dofs)
Definition: evaluatecallerdefaultimpl.hh:111
Definition: evaluatecallerdefaultimpl.hh:148
static void axpy(const QuadratureType &quad, const Geometry &geometry, const JacobianRangeVectorType &jacobianStorage, const JacobianRangeFactorType &jacFactors, LocalDofVectorType &dofs)
Definition: evaluatecallerdefaultimpl.hh:153
static void eval(const QuadratureType &quad, const RangeVectorType &rangeStorage, const LocalDofVectorType &dofs, RangeFactorType &rangeFactors)
Definition: evaluatecallerdefaultimpl.hh:42
static void eval(const QuadratureType &, const EmptyGeometry &, const JacobianRangeVectorType &, const LocalDofVectorType &, const JacobianRangeFactorType &)
Definition: evaluatecallerdefaultimpl.hh:86
static void axpy(const QuadratureType &quad, const RangeVectorType &rangeStorage, const RangeFactorType &rangeFactors, LocalDofVectorType &dofs)
Definition: evaluatecallerdefaultimpl.hh:130
static void axpy(const QuadratureType &, const EmptyGeometry &, const JacobianRangeVectorType &, const JacobianRangeFactorType &, LocalDofVectorType &)
Definition: evaluatecallerdefaultimpl.hh:173