1 #ifndef DUNE_FEM_COMBINEDDISCRETFUNCTIONSPACE_HH 2 #define DUNE_FEM_COMBINEDDISCRETFUNCTIONSPACE_HH 6 #include <dune/common/math.hh> 7 #include <dune/common/typetraits.hh> 8 #include <dune/grid/common/grid.hh> 32 template<
class DFSpace1,
class DFSpace2 >
49 template<
int newDimRange >
56 template<
class NewFunctionSpace >
59 typedef typename std::conditional< (NewFunctionSpace::dimRange == 1),
75 const InterfaceType commInterface = InteriorBorder_All_Interface,
76 const CommunicationDirection commDirection = ForwardCommunication )
78 : BaseType( gridPart, commInterface, commDirection )
87 const DiscreteFunctionSpaceType1 &
space1 ()
const 89 return BaseType::template subDiscreteFunctionSpace< 0 >();
95 const DiscreteFunctionSpaceType2 &
space2 ()
const 97 return BaseType::template subDiscreteFunctionSpace< 1 >();
103 template<
class DFunctionSpaceImp1,
104 class DFunctionSpaceImp2,
105 class NewFunctionSpace >
107 DFunctionSpaceImp1, DFunctionSpaceImp2 >, NewFunctionSpace >
110 static const int dimRange1 = DFunctionSpaceImp1::dimRange;
111 static const int dimRange2 = DFunctionSpaceImp2::dimRange;
112 static const int newDimRange = NewFunctionSpace::dimRange;
114 static const int newDimRange1 = (newDimRange * dimRange1)/( dimRange1 + dimRange2 );
115 static const int newDimRange2 = (newDimRange * dimRange2)/( dimRange1 + dimRange2 );
122 typedef typename conditional< (newDimRange == 1), Type1,
129 template<
class SP1,
class SP2 >
146 #endif // #ifndef DUNE_FEM_COMBINDEDDISCRETFUNCTIONSPACE_HH DFSpaceIdentifier type() const
get the type of this discrete function space
Definition: combinedspace/generic.hh:128
Definition: combinedspace/combineddiscretefunctionspace.hh:130
Definition: tuplespace.hh:29
conditional< (newDimRange==1), Type1, CombinedDiscreteFunctionSpace< Type1, Type2 > >::type Type
Definition: combinedspace/combineddiscretefunctionspace.hh:123
Traits::GridPartType GridPartType
Definition: tuplespace.hh:236
ThisType::template ToNewFunctionSpace< NewFunctionSpaceType >::Type Type
Definition: combinedspace/combineddiscretefunctionspace.hh:53
Definition: combinedspace/combineddiscretefunctionspace.hh:47
Definition: discretefunctionspace.hh:126
Definition: combinedspace/combineddiscretefunctionspace.hh:50
DFSpace1 DiscreteFunctionSpaceType1
types of Discrete Subspace
Definition: combinedspace/combineddiscretefunctionspace.hh:41
ToNewDimRangeFunctionSpace< typename BaseType::FunctionSpaceType, newDimRange >::Type NewFunctionSpaceType
Definition: combinedspace/combineddiscretefunctionspace.hh:52
Combined discrete function space.
Definition: combinedspace/combineddiscretefunctionspace.hh:33
const DiscreteFunctionSpaceType1 & space1() const
obtain the first subspace
Definition: combinedspace/combineddiscretefunctionspace.hh:87
Definition: combinedspace/combineddiscretefunctionspace.hh:57
DFSpace2 DiscreteFunctionSpaceType2
Definition: combinedspace/combineddiscretefunctionspace.hh:42
CombinedDiscreteFunctionSpace(GridPartType &gridPart, const InterfaceType commInterface=InteriorBorder_All_Interface, const CommunicationDirection commDirection=ForwardCommunication)
constructor
Definition: combinedspace/combineddiscretefunctionspace.hh:74
const DiscreteFunctionSpaceType2 & space2() const
obtain the second subspace
Definition: combinedspace/combineddiscretefunctionspace.hh:95
Definition: tuplelocalrestrictprolong.hh:32
Definition: coordinate.hh:4
Definition: combinedspace/combineddiscretefunctionspace.hh:46
std::conditional< (NewFunctionSpace::dimRange==1), typename DiscreteFunctionSpaceType1::template ToNewDimRange< 1 >::Type, typename DifferentDiscreteFunctionSpace< ThisType, NewFunctionSpace >::Type >::type Type
Definition: combinedspace/combineddiscretefunctionspace.hh:62
Definition: combinedspace/combineddiscretefunctionspace.hh:45
BaseType::GridPartType GridPartType
Definition: combinedspace/combineddiscretefunctionspace.hh:66
GridPartType & gridPart() const
Definition: discretefunctionspace.hh:714
Definition: combinedspace/generic.hh:52
Definition: common/localrestrictprolong.hh:16
DefaultLocalRestrictProlong(const CombinedDiscreteFunctionSpace< SP1, SP2 > &space)
Definition: combinedspace/combineddiscretefunctionspace.hh:137
convert functions space to space with new dim range
Definition: functionspace.hh:246