9#include <kernel/cubature/driver_factory.hpp>
10#include <kernel/cubature/refine_factory.hpp>
11#include <kernel/cubature/barycentre_driver.hpp>
12#include <kernel/cubature/trapezoidal_driver.hpp>
13#include <kernel/cubature/hammer_stroud_driver.hpp>
14#include <kernel/cubature/lauffer_driver.hpp>
15#include <kernel/cubature/silvester_driver.hpp>
16#include <kernel/cubature/dunavant_driver.hpp>
17#include <kernel/cubature/shunn_ham_driver.hpp>
18#include <kernel/cubature/simplex_scalar_factory.hpp>
19#include <kernel/cubature/tensor_product_factory.hpp>
20#include <kernel/cubature/scalar/factory_wrapper.hpp>
32 class DriverFactoryFunctor
38 explicit DriverFactoryFunctor(Functor_& functor) :
43 template<
template<
typename>
class Driver_>
46 _functor.template factory< DriverFactory<Driver_, Shape_> >();
51 typename ScalarDriver_,
53 bool tensorize_ = ScalarDriver_::tensorize>
54 class TensorProductFunctorHelper;
57 typename ScalarDriver_,
58 bool tensorize_ = ScalarDriver_::tensorize>
59 class SimplexScalarFunctorHelper;
68 template<
typename Shape_>
82 template<
typename Functor_>
83 static void _driver_list(Functor_& )
92 template<
typename Functor_>
93 static void _factory_list(Functor_& )
103 template<
typename Functor_>
104 static void driver(Functor_& functor)
107 _driver_list(functor);
110 template<
typename Functor_>
111 static void factory(Functor_& functor)
114 _factory_list(functor);
117 SimplexScalarFunctor<Functor_> scalar_functor(functor);
118 Scalar::FactoryWrapper::driver(scalar_functor);
121 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
122 _driver_list(driver_functor);
127 template<
typename Functor_>
128 class SimplexScalarFunctor
134 explicit SimplexScalarFunctor(Functor_& functor) :
139 template<
typename ScalarDriver_>
142 Intern::SimplexScalarFunctorHelper<ScalarDriver_>::scalar_driver(_functor);
159 template<
typename Functor_>
160 static void _driver_list(Functor_& functor)
165 functor.template driver<HammerStroudD2Driver>();
166 functor.template driver<HammerStroudD3Driver>();
167 functor.template driver<LaufferD2Driver>();
168 functor.template driver<SilvesterOpenDriver>();
169 functor.template driver<DunavantDriver>();
174 template<
typename Functor_>
175 static void _factory_list(Functor_& )
185 template<
typename Functor_>
186 static void driver(Functor_& functor)
189 _driver_list(functor);
192 template<
typename Functor_>
193 static void factory(Functor_& functor)
196 _factory_list(functor);
199 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
200 _driver_list(driver_functor);
215 template<
typename Functor_>
216 static void _driver_list(Functor_& functor)
221 functor.template driver<HammerStroudD2Driver>();
222 functor.template driver<HammerStroudD3Driver>();
223 functor.template driver<HammerStroudD5Driver>();
224 functor.template driver<LaufferD2Driver>();
225 functor.template driver<LaufferD4Driver>();
226 functor.template driver<ShunnHamDriver>();
231 template<
typename Functor_>
232 static void _factory_list(Functor_& )
242 template<
typename Functor_>
243 static void driver(Functor_& functor)
246 _driver_list(functor);
249 template<
typename Functor_>
250 static void factory(Functor_& functor)
253 _factory_list(functor);
256 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
257 _driver_list(driver_functor);
272 template<
typename Functor_>
273 static void _driver_list(Functor_& )
282 template<
typename Functor_>
283 static void _factory_list(Functor_& )
293 template<
typename Functor_>
294 static void driver(Functor_& functor)
297 _driver_list(functor);
300 template<
typename Functor_>
301 static void factory(Functor_& functor)
304 _factory_list(functor);
307 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
308 _driver_list(driver_functor);
323 template<
typename Functor_>
324 static void _driver_list(Functor_& )
333 template<
typename Functor_>
334 static void _factory_list(Functor_& )
344 template<
typename Functor_>
345 static void driver(Functor_& functor)
348 _driver_list(functor);
351 template<
typename Functor_>
352 static void factory(Functor_& functor)
355 _factory_list(functor);
358 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
359 _driver_list(driver_functor);
374 template<
typename Functor_>
375 static void _driver_list(Functor_& )
384 template<
typename Functor_>
385 static void _factory_list(Functor_& )
395 template<
typename Functor_>
396 static void driver(Functor_& functor)
399 _driver_list(functor);
402 template<
typename Functor_>
403 static void factory(Functor_& functor)
406 _factory_list(functor);
409 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
410 _driver_list(driver_functor);
419 template<
typename Shape_>
434 template<
typename Functor_>
435 static void _driver_list(Functor_& )
445 template<
typename Functor_>
446 static void _factory_list(Functor_& )
456 template<
typename Functor_>
457 static void driver(Functor_& functor)
463 _driver_list(functor);
466 template<
typename Functor_>
467 static void factory(Functor_& functor)
473 _factory_list(functor);
476 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
477 _driver_list(driver_functor);
493 template<
typename Functor_>
494 static void _driver_list(Functor_& )
503 template<
typename Functor_>
504 static void _factory_list(Functor_& )
514 template<
typename Functor_>
515 static void driver(Functor_& functor)
521 _driver_list(functor);
524 template<
typename Functor_>
525 static void factory(Functor_& functor)
531 _factory_list(functor);
534 TensorProductFunctor<Functor_> tensor_functor(functor);
535 Scalar::FactoryWrapper::driver(tensor_functor);
538 Intern::DriverFactoryFunctor<ShapeType, Functor_> driver_functor(functor);
539 _driver_list(driver_functor);
544 template<
typename Functor_>
545 class TensorProductFunctor
551 explicit TensorProductFunctor(Functor_& functor) :
556 template<
typename ScalarDriver_>
559 Intern::TensorProductFunctorHelper<ScalarDriver_, Shape::Hypercube<dim_> >::scalar_driver(_functor);
570 template<
typename Shape_>
575 template<
typename Functor_>
576 static void _driver_list(Functor_& functor)
581 functor.template driver<BarycentreDriver>();
582 functor.template driver<TrapezoidalDriver>();
587 template<
typename Functor_>
588 static void _factory_list(Functor_& )
598 template<
typename Functor_>
599 static void factory_no_refine(Functor_& functor)
605 _factory_list(functor);
608 Intern::DriverFactoryFunctor<Shape_, Functor_> driver_functor(functor);
609 _driver_list(driver_functor);
612 template<
typename Functor_>
613 static void driver(Functor_& functor)
619 _driver_list(functor);
622 template<
typename Functor_>
623 static void factory(Functor_& functor)
626 factory_no_refine(functor);
629 RefineFactoryFunctor<Functor_> refine_functor(functor);
630 factory_no_refine(refine_functor);
635 template<
typename Functor_>
636 class RefineFactoryFunctor
642 explicit RefineFactoryFunctor(Functor_& functor) :
647 template<
typename Factory_>
650 _functor.template factory< RefineFactory<Factory_> >();
660 typename ScalarDriver_,
662 class TensorProductFunctorHelper<ScalarDriver_, Shape_, true>
665 template<
typename Functor_>
666 static void scalar_driver(Functor_& functor)
668 functor.template factory< TensorProductFactory<ScalarDriver_, Shape_> >();
673 typename ScalarDriver_,
675 class TensorProductFunctorHelper<ScalarDriver_, Shape_, false>
678 template<
typename Functor_>
679 static void scalar_driver(Functor_&)
685 template<
typename ScalarDriver_>
686 class SimplexScalarFunctorHelper<ScalarDriver_, true>
689 template<
typename Functor_>
690 static void scalar_driver(Functor_& functor)
692 functor.template factory<SimplexScalarFactory<ScalarDriver_> >();
696 template<
typename ScalarDriver_>
697 class SimplexScalarFunctorHelper<ScalarDriver_, false>
700 template<
typename Functor_>
701 static void scalar_driver(Functor_&)
Explicitly Specialized Cubature Factory Wrapper class template.
Partially Specialized Cubature Factory Wrapper class template.
Generic Cubature Factory Wrapper class template.
Hypercube shape tag struct template.
Simplex shape tag struct template.