DUNE-FEM (unstable)

Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp > Class Template Reference

This class manages the adaptation process including a load balancing after the adaptation step. This class is created by the AdaptationManager for each grid instance. See AdaptationManager for details. More...

#include <dune/fem/space/common/adaptationmanager.hh>

Public Member Functions

 AdaptationManager (GridType &grid, RestProlOperatorImp &rpOp, int balanceCounter, const ParameterReader &parameter=Parameter::container())
 constructor of AdaptationManager More...
 
 AdaptationManager (GridType &grid, RestProlOperatorImp &rpOp, const ParameterReader &parameter=Parameter::container())
 constructor of AdaptationManager More...
 
 ~AdaptationManager ()
 destructor decreasing reference counter
 
virtual bool loadBalance ()
 call load balance, returns true if grid was changed More...
 
virtual double loadBalanceTime () const
 time that last load balance cycle took More...
 
virtual void adapt ()
 on call of this method the internal adaptation operator is called. More...
 
int balanceCounter () const
 returns actual balanceCounter for checkpointing
 
void backup () const
 backup internal data
 
void restore ()
 retore internal data
 
RestProlOperatorImp & getRestProlOp ()
 
virtual double adaptationTime () const
 time that last adaptation cycle took More...
 
virtual const char * methodName () const
 returns name of adaptation method More...
 
virtual bool adaptive () const
 returns true if adaptation manager as adaptation method different to NONE More...
 
virtual bool isCallBackAdaptation () const
 return true if callback adaptation is used. More...
 
template<class DiscrOpType >
void saveObjPointer (DiscrOpType *discrOp)
 Store new generated DiscreteOperator Pointer.
 
template<class DiscrOpType , class LocalOpType >
void saveObjPointer (DiscrOpType *discrOp, LocalOpType *lop)
 
template<class DiscreteFunctionType >
void addToLoadBalancer (DiscreteFunctionType &df)
 add discrete function to data inliner/xtractor list
 
template<class DiscreteFunctionType >
void addDiscreteFunction (DiscreteFunctionType &df)
 add discrete function to data inliner/xtractor list
 
template<class DiscreteFunctionType , class ContainsCheck >
void addDiscreteFunction (DiscreteFunctionType &df, const ContainsCheck &containsCheck)
 add discrete function to data inliner/xtractor list
 

Static Public Attributes

static const int defaultMethod = 1
 default method is generic
 

Protected Member Functions

virtual void insertSubData ()
 insert possible sub data of object
 
virtual void removeSubData ()
 remove possible sub data of object
 

Protected Attributes

GridType & grid_
 corresponding grid
 
DofManagerTypedm_
 DofManager corresponding to grid.
 
RestProlOperatorImp & rpOp_
 Restriction and Prolongation Operator.
 
double adaptTime_
 time that adaptation took
 
bool wasChanged_
 flag for restriction
 
AdaptationMethodType adaptationMethod_
 method identifier
 
GridType & grid_
 corresponding grid
 
DofManagerTypedm_
 DofManager corresponding to grid.
 

Detailed Description

template<class GridType, class RestProlOperatorImp>
class Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >

This class manages the adaptation process including a load balancing after the adaptation step. This class is created by the AdaptationManager for each grid instance. See AdaptationManager for details.

Constructor & Destructor Documentation

◆ AdaptationManager() [1/2]

template<class GridType , class RestProlOperatorImp >
Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::AdaptationManager ( GridType &  grid,
RestProlOperatorImp &  rpOp,
int  balanceCounter,
const ParameterReader &  parameter = Parameter::container() 
)
inline

constructor of AdaptationManager

The following optional parameters are used:

# 0 == none, 1 == generic, 2 == call back (only AlbertaGrid and ALUGrid)
fem.adaptation.method: 1 # default value
# balance every x-th call to adapt, 0 means no balancing
fem.loadbalancing.step: 1 # default value
Parameters
gridGrid that adaptation is done for
rpOprestriction and prlongation operator that describes how the user data is projected to other grid levels
balanceCounterstart counter for balance cycle (default = 0)
parameterParameter class holding parameters

References DUNE_THROW, and Dune::Fem::Parameter::verbose().

◆ AdaptationManager() [2/2]

template<class GridType , class RestProlOperatorImp >
Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::AdaptationManager ( GridType &  grid,
RestProlOperatorImp &  rpOp,
const ParameterReader &  parameter = Parameter::container() 
)
inline

constructor of AdaptationManager

The following optional parameters are used:

# 0 == none, 1 == generic, 2 == call back (only AlbertaGrid and ALUGrid)
fem.adaptation.method: 1 # default value
# balance every x-th call to adapt, 0 means no balancing
fem.loadbalancing.step: 1 # default value
Parameters
gridGrid that adaptation is done for
rpOprestriction and prlongation operator that describes how the user data is projected to other grid levels
parameterParameter class holding parameters

Member Function Documentation

◆ adapt()

template<class GridType , class RestProlOperatorImp >
virtual void Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::adapt ( )
inlinevirtual

on call of this method the internal adaptation operator is called.

Reimplemented from Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >.

◆ adaptationTime()

template<class GridType , class RestProlOperatorImp >
virtual double Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::adaptationTime ( ) const
inlinevirtualinherited

time that last adaptation cycle took

Reimplemented from Dune::Fem::AdaptationManagerInterface.

◆ adaptive()

template<class GridType >
virtual bool Dune::Fem::AdaptationMethod< GridType >::adaptive ( ) const
inlinevirtualinherited

returns true if adaptation manager as adaptation method different to NONE

Returns
true if adaptation method is not NONE, false otherwise

Reimplemented from Dune::Fem::AdaptationManagerInterface.

References Dune::Fem::AdaptationMethod< GridType >::adaptationMethod_, and Dune::Fem::AdaptationMethod< GridType >::none.

◆ getRestProlOp()

template<class GridType , class RestProlOperatorImp >
RestProlOperatorImp & Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::getRestProlOp ( )
inlineinherited

no public method, but has to be public, because all AdaptationManagers must be able to call this method and the template parameters are allways different

◆ isCallBackAdaptation()

template<class GridType >
virtual bool Dune::Fem::AdaptationMethod< GridType >::isCallBackAdaptation ( ) const
inlinevirtualinherited

◆ loadBalance()

template<class GridType , class RestProlOperatorImp >
virtual bool Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::loadBalance ( )
inlinevirtual

call load balance, returns true if grid was changed

Returns
true if grid was changed, false otherwise

Reimplemented from Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >.

◆ loadBalanceTime()

template<class GridType , class RestProlOperatorImp >
virtual double Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::loadBalanceTime ( ) const
inlinevirtual

time that last load balance cycle took

Reimplemented from Dune::Fem::LoadBalancer< GridType >.

◆ methodName()

template<class GridType >
virtual const char * Dune::Fem::AdaptationMethod< GridType >::methodName ( ) const
inlinevirtualinherited

◆ saveObjPointer()

template<class DiscrOpType , class LocalOpType >
void Dune::Fem::ObjPointerStorage::saveObjPointer ( DiscrOpType *  discrOp,
LocalOpType *  lop 
)
inlineinherited

Store new generated DiscreteOperator Pointer and the LocalOperator pointer

References Dune::Fem::ObjPointerStorage::saveObjPointer().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)