DUNE-ACFEM (2.5.1)

discretefunctionselector.hh
1#ifndef __DUNE_ACFEM_DISCRETE_FUNCTION_SELECTOR_HH__
2#define __DUNE_ACFEM_DISCRETE_FUNCTION_SELECTOR_HH__
3
4#include <dune/fem/gridpart/adaptiveleafgridpart.hh>
5#include <dune/fem/space/lagrange.hh>
6#include <dune/fem/space/discontinuousgalerkin.hh>
7#include <dune/fem/function/adaptivefunction.hh>
8#include <dune/fem/function/blockvectorfunction.hh>
9
10#include "solverselector.hh"
11
12namespace Dune {
13
14 namespace ACFem {
15
23 template<class DiscreteFunctionSpaceType, SolverFamily::Family family>
24 struct DiscreteFunctionSelector;
25
26 template<class DiscreteFunctionSpaceType>
27 struct DiscreteFunctionSelector<DiscreteFunctionSpaceType, SolverFamily::ISTL>
28 {
29 typedef Dune::Fem::ISTLBlockVectorDiscreteFunction<DiscreteFunctionSpaceType> DiscreteFunctionType;
30 };
31
32 template<class DiscreteFunctionSpaceType>
33 struct DiscreteFunctionSelector<DiscreteFunctionSpaceType, SolverFamily::FEM>
34 {
35 typedef Dune::Fem::AdaptiveDiscreteFunction<DiscreteFunctionSpaceType> DiscreteFunctionType;
36 };
37
38 template<class DiscreteFunctionSpaceType>
39 struct DiscreteFunctionSelector<DiscreteFunctionSpaceType, SolverFamily::PETSC>
40 {
41 typedef Dune::Fem::PetscDiscreteFunction<DiscreteFunctionSpaceType> DiscreteFunctionType;
42 };
43
55 template<class Grid, class FunctionSpace, unsigned PolOrder, SolverFamily::Family family = SolverFamily::family>
57 {
58 typedef Grid GridType;
59 typedef FunctionSpace FunctionSpaceType;
60
62 enum { polynomialOrder = PolOrder };
63
64 typedef Dune::Fem::AdaptiveLeafGridPart<GridType, Dune::InteriorBorder_Partition> GridPartType;
65 typedef Dune::Fem::LagrangeDiscreteFunctionSpace<FunctionSpaceType, GridPartType, PolOrder> DiscreteFunctionSpaceType;
66
67 typedef typename DiscreteFunctionSelector<DiscreteFunctionSpaceType, family>::DiscreteFunctionType DiscreteFunctionType;
68 };
69
81 template<class Grid, class FunctionSpace, unsigned PolOrder, SolverFamily::Family family = SolverFamily::family>
83 {
84 typedef Grid GridType;
85 typedef FunctionSpace FunctionSpaceType;
86
87 enum { polynomialOrder = PolOrder };
88
89 typedef Dune::Fem::AdaptiveLeafGridPart<GridType, Dune::InteriorBorder_Partition> GridPartType;
90 typedef Dune::Fem::DiscontinuousGalerkinSpace<FunctionSpaceType, GridPartType, PolOrder> DiscreteFunctionSpaceType;
91
92 typedef typename DiscreteFunctionSelector<DiscreteFunctionSpaceType, family>::DiscreteFunctionType DiscreteFunctionType;
93 };
94
106 template<class Grid, class FunctionSpace, unsigned PolOrder, SolverFamily::Family family = SolverFamily::family>
108 {
109 typedef Grid GridType;
110 typedef FunctionSpace FunctionSpaceType;
111
112 enum { polynomialOrder = PolOrder };
113
114 typedef Dune::Fem::AdaptiveLeafGridPart<GridType, Dune::InteriorBorder_Partition> GridPartType;
115 typedef Dune::Fem::LagrangeDiscontinuousGalerkinSpace<FunctionSpaceType, GridPartType, PolOrder> DiscreteFunctionSpaceType;
116
117 typedef typename DiscreteFunctionSelector<DiscreteFunctionSpaceType, family>::DiscreteFunctionType DiscreteFunctionType;
118 };
119
121
122 } // ACFem::
123
124} // Dune::
125
126#endif // __DUNE_ACFEM_DISCRETE_FUNCTION_SELECTOR_HH__
Helper class which defines likey discrete function types.
Definition: discretefunctionselector.hh:83
Helper class which defines likey discrete function types.
Definition: discretefunctionselector.hh:108
Helper class which defines likey discrete function types.
Definition: discretefunctionselector.hh:57
FunctionSpace FunctionSpaceType
Type of underlying function space.
Definition: discretefunctionselector.hh:59
Grid GridType
Type of underlying grid.
Definition: discretefunctionselector.hh:58
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)