1#ifndef __DUNE_ACFEM_MODELADAPTER_HH__
2#define __DUNE_ACFEM_MODELADAPTER_HH__
4#include "operatorparts.hh"
5#include "../modelexpressionbase.hh"
11 template<
class OperatorParts,
class Gr
idPart>
12 class OperatorPartsAdapterModel
13 :
public ModelExpression<OperatorPartsAdapterModel<OperatorParts, GridPart> >
15 typedef OperatorPartsAdapterModel ThisType;
16 typedef DefaultModel<ThisType> BaseType;
17 typedef ModelInterface<ThisType> InterfaceType;
18 typedef ModelTraits<ThisType> TraitsType;
21 typedef OperatorParts OperatorPartsType;
22 typedef typename OperatorPartsType::FunctionSpaceType FunctionSpaceType;
23 typedef GridPart GridPartType;
24 typedef typename BaseType::EntityType EntityType;
26 typedef typename FunctionSpaceType::DomainType DomainType;
27 typedef typename FunctionSpaceType::RangeType RangeType;
28 typedef typename FunctionSpaceType::JacobianRangeType JacobianRangeType;
29 typedef typename FunctionSpaceType::HessianRangeType HessianRangeType;
32 dimDomain = FunctionSpaceType::dimDomain,
33 dimRange = FunctionSpaceType::dimRange
36 typedef typename FunctionSpaceType::DomainFieldType DomainFieldType;
37 typedef typename FunctionSpaceType::RangeFieldType RangeFieldType;
39 OperatorPartsAdapterModel(OperatorPartsType&& parts)
40 : operatorParts_(parts)
43 std::string name()
const {
44 return operatorParts_.name();
47 OperatorPartsType operatorParts()
const {
48 return operatorParts_;
52 OperatorPartsType operatorParts_;
55 template<
class OperatorParts,
class Gr
idPart>
56 struct ModelTraits<OperatorPartsAdapterModel<OperatorParts, GridPart> >
57 :
public DefaultModelTraits<typename OperatorParts::FunctionSpaceType, GridPart>
59 typedef OperatorParts OperatorPartsType;
62 template<
class OperatorParts,
class Gr
idPart>
63 OperatorPartsAdapterModel<OperatorParts, GridPart>
64 operatorPartsAdapterModel(
const OperatorParts& operatorParts,
const GridPart& gridPart)
66 return OperatorPartsAdapterModel<OperatorParts, GridPart>(operatorParts);