DUNE-FEM (unstable)

evaluatecallerdefaultimpl.hh
1#ifndef DUNE_FEM_SAPCE_EVALUATECALLERDEFAULTIMPL_HH
2#define DUNE_FEM_SAPCE_EVALUATECALLERDEFAULTIMPL_HH
3
4#include <iostream>
5
6#include <dune/fem/space/basisfunctionset/evaluatecallerdeclaration.hh>
7
8namespace Dune {
9namespace Fem {
10namespace Codegen {
11
13//
14// evaluate and store results in a vector
15//
17template <class BaseFunctionSet, class Geometry, int dimRange, int numRows, int numCols>
18struct EvaluateRanges
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
35template <class BaseFunctionSet, int dimRange, int numRows, int numCols>
36struct 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//
58template <class BaseFunctionSet, class Geometry,
59 int dimRange, int numRows, int numCols>
60struct EvaluateJacobians
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
78template <class BaseFunctionSet,
79 int dimRange, int numRows, int numCols>
80struct 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//
103template <class BaseFunctionSet, class Geometry,
104 int dimRange, int numRows, int numCols>
105struct AxpyRanges
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
122template <class BaseFunctionSet,
123 int dimRange, int numRows, int numCols>
124struct 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
145template <class BaseFunctionSet, class Geometry,
146 int dimRange, int numRows, int numCols>
147struct AxpyJacobians
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
165template <class BaseFunctionSet,
166 int dimRange, int numRows, int numCols>
167struct 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
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)