5 #define NO_INSTANCE std::cout<<"Constructing model object from template class:"<<std::endl \
6 <<"return static_cast<Model_Base*>(new ModelTemplate<CompKernelTemplate<" \
8 <<nDOF_mesh_trial_elementIn<<"," \
9 <<nDOF_trial_elementIn<<"," \
10 <<nDOF_test_elementIn<<">," \
12 <<nQuadraturePoints_elementIn<<"," \
13 <<nDOF_mesh_trial_elementIn<<"," \
14 <<nDOF_trial_elementIn<<"," \
15 <<nDOF_test_elementIn<<"," \
16 <<nQuadraturePoints_elementBoundaryIn<<">());" \
17 <<std::endl<<std::flush
21 template<
class Model_Base,
22 template<
class CompKernelType,
24 int nQuadraturePoints_element,
25 int nDOF_mesh_trial_element,
26 int nDOF_trial_element,
27 int nDOF_test_element,
28 int nQuadraturePoints_elementBoundary>
31 int nDOF_mesh_trial_element,
32 int nDOF_trial_element,
33 int nDOF_test_element>
34 class CompKernelTemplate>
36 int nQuadraturePoints_elementIn,
37 int nDOF_mesh_trial_elementIn,
38 int nDOF_trial_elementIn,
39 int nDOF_test_elementIn,
40 int nQuadraturePoints_elementBoundaryIn,
43 if (CompKernelFlag == 0)
47 if (nDOF_mesh_trial_elementIn == nDOF_trial_elementIn)
49 if (nDOF_mesh_trial_elementIn == 4)
51 if (nQuadraturePoints_elementIn == 5)
52 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,4,4>,3,5,4,4,4,4>());
53 else if (nQuadraturePoints_elementIn == 4)
54 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,4,4>,3,4,4,4,4,3>());
55 else if (nQuadraturePoints_elementIn == 15 && nQuadraturePoints_elementBoundaryIn == 7)
56 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,4,4>,3,15,4,4,4,7>());
57 else if (nQuadraturePoints_elementIn == 24 && nQuadraturePoints_elementBoundaryIn == 12)
58 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,4,4>,3,24,4,4,4,12>());
65 else if (nDOF_mesh_trial_elementIn == 8)
67 if (nQuadraturePoints_elementIn == 8)
69 if ( nQuadraturePoints_elementBoundaryIn == 4)
70 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,8,8,8>,3,8,8,8,8,4>());
139 else if (nDOF_mesh_trial_elementIn == 4)
141 if (nDOF_trial_elementIn == 10)
143 if (nQuadraturePoints_elementIn == 4 && nQuadraturePoints_elementBoundaryIn == 3)
145 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,10,10>,3,4,4,10,10,3>());
155 else if (nQuadraturePoints_elementIn == 15 && nQuadraturePoints_elementBoundaryIn == 7)
157 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,10,10>,3,15,4,10,10,7>());
159 else if (nQuadraturePoints_elementIn == 24 && nQuadraturePoints_elementBoundaryIn == 12)
161 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,4,10,10>,3,24,4,10,10,12>());
179 else if (nDOF_mesh_trial_elementIn == 8)
181 if (nDOF_trial_elementIn == 27)
183 if (nQuadraturePoints_elementIn == 125)
184 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<3,8,27,27>,3,125,8,27,27,25>());
211 template<
class Model_Base,
212 template<
class CompKernelType,
214 int nQuadraturePoints_element,
215 int nDOF_mesh_trial_element,
216 int nDOF_trial_element,
217 int nDOF_test_element,
218 int nQuadraturePoints_elementBoundary>
221 int nDOF_mesh_trial_element,
222 int nDOF_trial_element,
223 int nDOF_test_element>
224 class CompKernelTemplate>
226 int nQuadraturePoints_elementIn,
227 int nDOF_mesh_trial_elementIn,
228 int nDOF_trial_elementIn,
229 int nDOF_test_elementIn,
230 int nQuadraturePoints_elementBoundaryIn,
233 if (CompKernelFlag == 0)
237 if (nDOF_mesh_trial_elementIn == nDOF_trial_elementIn)
239 if (nDOF_mesh_trial_elementIn == 3)
241 if (nQuadraturePoints_elementIn == 1)
243 if (nQuadraturePoints_elementBoundaryIn == 1)
244 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,1,3,3,3,1>());
251 else if (nQuadraturePoints_elementIn == 3)
253 if (nQuadraturePoints_elementBoundaryIn == 2)
254 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,3,3,3,3,2>());
261 else if (nQuadraturePoints_elementIn == 4)
263 if (nQuadraturePoints_elementBoundaryIn == 3)
264 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,4,3,3,3,3>());
271 else if (nQuadraturePoints_elementIn == 6)
273 if (nQuadraturePoints_elementBoundaryIn == 4)
274 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,6,3,3,3,4>());
281 else if (nQuadraturePoints_elementIn == 7)
283 if (nQuadraturePoints_elementBoundaryIn == 5)
284 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,7,3,3,3,5>());
291 else if (nQuadraturePoints_elementIn == 12)
293 if (nQuadraturePoints_elementBoundaryIn == 6)
294 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,3,3>,2,12,3,3,3,6>());
355 else if(nDOF_mesh_trial_elementIn == 4)
357 if (nQuadraturePoints_elementIn == 4)
359 if (nQuadraturePoints_elementBoundaryIn == 2)
360 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,4,4,4>,2,4,4,4,4,2>());
379 else if (nDOF_mesh_trial_elementIn == 3)
381 if (nDOF_trial_elementIn == 6)
383 if (nQuadraturePoints_elementIn == 1)
385 if (nQuadraturePoints_elementBoundaryIn == 1)
386 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,6,6>,2,1,3,6,6,1>());
423 else if (nQuadraturePoints_elementIn == 7)
425 if (nQuadraturePoints_elementBoundaryIn == 5)
427 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,6,6>,2,7,3,6,6,5>());
435 else if (nQuadraturePoints_elementIn == 12)
437 if (nQuadraturePoints_elementBoundaryIn == 6)
439 return static_cast<Model_Base*
>(
new ModelTemplate<CompKernelTemplate<2,3,6,6>,2,12,3,6,6,6>());