1 #ifndef DUNE_FEM_CREATEPASS_HH
2 #define DUNE_FEM_CREATEPASS_HH
37 template<
class Model ,
template <
class,
class,
int>
class PassType ,
int pId = -1 >
53 std::shared_ptr< const DiscreteFunctionSpaceType >
space_;
68 :
CreatePass( const_cast< Model & >( model ), space )
75 template <
class PreviousPass>
79 typedef PassType< Model , PreviousPass , passId > RealPassType;
85 ObjPtrType* obj =
new ObjPtrType(
pass);
91 obj->saveObjPointer(prevObj);
96 template <
class PreviousPass>
100 typedef PassType< Model , PreviousPass , passId > RealPassType;
106 ObjPtrType* obj =
new ObjPtrType(
pass);
112 obj->saveObjPointer(prevObj);
133 template <
class DiscreteModelImp,
class SelectorImp>
136 public DiscreteModelImp
139 typedef DiscreteModelImp BaseType;
155 template <
class Model,
class SelectorImp,
template <
class,
class>
class PassType>
171 std::shared_ptr< const DiscreteFunctionSpaceType >
space_;
198 template <
class PreviousPass>
202 typedef PassType<DiscreteModelType,PreviousPass> RealPassType;
208 ObjPtrType* obj =
new ObjPtrType(
pass,
model_ );
217 obj->saveObjPointer(prevObj);
222 template <
class PreviousPass>
226 typedef PassType<DiscreteModelType,PreviousPass> RealPassType;
232 ObjPtrType* obj =
new ObjPtrType(
pass,
model_);
241 obj->saveObjPointer(prevObj);
265 template <
class Model,
template <
class,
class,
int>
class PassType,
284 std::shared_ptr< DiscreteFunctionSpaceType >
space_;
303 template <
class PreviousPass>
307 typedef PassType<Model,PreviousPass,passId> RealPassType;
313 ObjPtrType* obj =
new ObjPtrType(pass);
319 obj->saveObjPointer(prevObj);
324 template <
class PreviousPass>
328 typedef PassType<Model,PreviousPass,passId> RealPassType;
334 ObjPtrType* obj =
new ObjPtrType(pass);
340 obj->saveObjPointer(prevObj);
356 template <
int startPassId = -1>
361 template <
class DestinationType>
368 StartPassType* startPass =
new StartPassType ();
371 ObjPtrType* obj =
new ObjPtrType(startPass);
379 template <
class LastModel>
383 return ml.createLast( createStartPass<typename LastModel :: DestinationType> () );
387 template <
class FirstModel,
393 return ml.createLast( mf.create( createStartPass<typename LastModel :: DestinationType>() ) );
397 template <
class Mod0,
405 return mlast.createLast(
407 m0.create( createStartPass<typename LastModel :: DestinationType> () )
413 template <
class Mod0,
423 return mlast.createLast( m2.create( m1.create(
424 m0.create( createStartPass<typename LastModel :: DestinationType> () )
429 template <
class Mod0,
446 m0.create( createStartPass<typename LastModel :: DestinationType> () )
451 template <
class Mod0,
471 m0.create( createStartPass<typename LastModel :: DestinationType> () )
475 template <
class Mod0,
498 m0.create( createStartPass<typename LastModel :: DestinationType> () )
503 template <
class Mod0,
529 m0.create( createStartPass<typename LastModel :: DestinationType> () )
533 template <
class Mod0,
562 m0.create( createStartPass<typename LastModel :: DestinationType> () )
Definition: bindguard.hh:11
static std::shared_ptr< T > referenceToSharedPtr(T &t)
Definition: memory.hh:19
Definition: objpointer.hh:42
interface for time evolution operators
Definition: spaceoperatorif.hh:105
virtual const DestinationType * destination() const
return reference to pass's local memory
Definition: spaceoperatorif.hh:208
only for keeping the pointer
Definition: spaceoperatorif.hh:215
OperatorType & pass() const
return reference to pass
Definition: spaceoperatorif.hh:246
only for keeping the pointer
Definition: spaceoperatorif.hh:258
apply wrapper
Definition: spaceoperatorif.hh:320
End marker for a compile-time list of passes.
Definition: common/pass.hh:47
CreatePass takes a discrete model and a PassType (like LocalDGPass) and creates with the parameter Pr...
Definition: createpass.hh:39
SpaceOperatorInterface< DestinationType > SpaceOperatorIFType
type of space operator
Definition: createpass.hh:50
Model ::Traits ::DiscreteFunctionType DestinationType
destination type
Definition: createpass.hh:47
CreatePass(Model &model, const DiscreteFunctionSpaceType &space)
Definition: createpass.hh:60
CreatePass(const Model &model, const DiscreteFunctionSpaceType &space)
Definition: createpass.hh:67
std::shared_ptr< const DiscreteFunctionSpaceType > space_
Definition: createpass.hh:53
SpaceOperatorIFType * passPointer_
Definition: createpass.hh:54
Model & model_
Definition: createpass.hh:52
CreatePass(const CreatePass &)=default
copy constructor
const DestinationType * destination() const
return pointer to destination
Definition: createpass.hh:124
Model ::Traits ::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: createpass.hh:45
SpaceOperatorPtr< PassType< Model, PreviousPass, passId > > * create(SpaceOperatorStorage< PreviousPass > *prevObj)
creation method
Definition: createpass.hh:77
SpaceOperatorIFType * pass()
return pointer to space operator if
Definition: createpass.hh:117
SpaceOperatorWrapper< PassType< Model, PreviousPass, passId > > * createLast(SpaceOperatorStorage< PreviousPass > *prevObj)
last creation method
Definition: createpass.hh:98
@ passId
Definition: createpass.hh:42
DiscreteModelWrapper to combine DiscreteModel and Selector.
Definition: createpass.hh:137
DiscreteModelWrapper(const DiscreteModelWrapper &other)
copy constructor
Definition: createpass.hh:149
DiscreteModelWrapper(const BaseType &base)
constructor calling the copy constructor of the base type
Definition: createpass.hh:144
SelectorImp SelectorType
exporting given type of selector
Definition: createpass.hh:142
create pass with previous unknown selector
Definition: createpass.hh:157
DiscreteModelWrapper< Model, SelectorImp > DiscreteModelType
type of discrete model
Definition: createpass.hh:168
Model ::Traits ::DiscreteFunctionType DestinationType
destination type
Definition: createpass.hh:162
SpaceOperatorWrapper< PassType< DiscreteModelType, PreviousPass > > * createLast(SpaceOperatorStorage< PreviousPass > *prevObj)
last creation method
Definition: createpass.hh:224
SpaceOperatorInterface< DestinationType > SpaceOperatorIFType
type of space operator
Definition: createpass.hh:165
~CreateSelectedPass()
destructor deleting model if still owner
Definition: createpass.hh:191
std::shared_ptr< const DiscreteFunctionSpaceType > space_
Definition: createpass.hh:171
DiscreteModelType * model_
Definition: createpass.hh:170
bool owner_
Definition: createpass.hh:173
CreateSelectedPass(Model &model, const DiscreteFunctionSpaceType &space)
Definition: createpass.hh:179
SpaceOperatorIFType * passPointer_
Definition: createpass.hh:172
SpaceOperatorPtr< PassType< DiscreteModelType, PreviousPass > > * create(SpaceOperatorStorage< PreviousPass > *prevObj)
creation method
Definition: createpass.hh:200
const DestinationType * destination() const
return pointer to destination
Definition: createpass.hh:253
Model ::Traits ::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: createpass.hh:160
SpaceOperatorIFType * pass()
return pointer to space operator if
Definition: createpass.hh:246
CreateSelectedPass(const CreateSelectedPass &org)
copy constructor
Definition: createpass.hh:184
CreateFeaturedPass takes a discrete model and a PassType (like LocalDGEllliptPass) and creates with t...
Definition: createpass.hh:270
SpaceOperatorPtr< PassType< Model, PreviousPass, passId > > * create(SpaceOperatorStorage< PreviousPass > *prevObj)
creation method
Definition: createpass.hh:305
SpaceType DiscreteFunctionSpaceType
type of discrete functions space
Definition: createpass.hh:276
SpaceOperatorInterface< DestinationType > SpaceOperatorIFType
type of space operator
Definition: createpass.hh:281
@ passId
Definition: createpass.hh:273
const DestinationType * destination() const
return pointer to destination
Definition: createpass.hh:345
Model & model_
Definition: createpass.hh:283
SpaceOperatorIFType * passPointer_
Definition: createpass.hh:286
SpaceOperatorWrapper< PassType< Model, PreviousPass, passId > > * createLast(SpaceOperatorStorage< PreviousPass > *prevObj)
last creation method
Definition: createpass.hh:326
CreateFeaturedPass(const CreateFeaturedPass &)=default
copy constructor
Model ::Traits ::DiscreteFunctionType DestinationType
destination type
Definition: createpass.hh:278
CreateFeaturedPass(Model &model, DiscreteFunctionSpaceType &space, std::string paramfile="")
Definition: createpass.hh:293
const std::string paramFile_
Definition: createpass.hh:285
std::shared_ptr< DiscreteFunctionSpaceType > space_
Definition: createpass.hh:284
create pass tree from given list of discrete models the passId is deliviered to the start pass and st...
Definition: createpass.hh:358
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(FirstModel &mf, LastModel &ml)
create 2 passes
Definition: createpass.hh:390
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, Mod3 &m3, Mod4 &m4, Mod5 &m5, LastModel &mlast)
create 7 passes
Definition: createpass.hh:483
static SpaceOperatorStorage< StartPass< DestinationType, startPassId > > * createStartPass()
method that creates first pass
Definition: createpass.hh:362
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, Mod3 &m3, Mod4 &m4, Mod5 &m5, Mod6 &m6, Mod7 &m7, LastModel &mlast)
create 9 passes
Definition: createpass.hh:543
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(LastModel &ml)
create 1 pass
Definition: createpass.hh:381
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, LastModel &mlast)
create 3 passes
Definition: createpass.hh:401
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, Mod3 &m3, Mod4 &m4, Mod5 &m5, Mod6 &m6, LastModel &mlast)
create 8 passes
Definition: createpass.hh:512
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, Mod3 &m3, LastModel &mlast)
create 5 passes
Definition: createpass.hh:435
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, Mod3 &m3, Mod4 &m4, LastModel &mlast)
create 6 passes
Definition: createpass.hh:458
static SpaceOperatorInterface< typename LastModel ::DestinationType > * create(Mod0 &m0, Mod1 &m1, Mod2 &m2, LastModel &mlast)
create 4 passes
Definition: createpass.hh:418