dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
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>

Inheritance diagram for Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >:
Inheritance graph

Public Types

typedef GridType::Traits::LocalIdSet LocalIdSet
 

Public Member Functions

 AdaptationManager (GridType &grid, RestProlOperatorImp &rpOp, int balanceCounter, const ParameterReader &parameter=Parameter::container())
 constructor of AdaptationManager
 
 AdaptationManager (GridType &grid, RestProlOperatorImp &rpOp, const ParameterReader &parameter=Parameter::container())
 constructor of AdaptationManager
 
 ~AdaptationManager ()
 destructor decreasing reference counter
 
virtual bool loadBalance ()
 call load balance, returns true if grid was changed
 
virtual double loadBalanceTime () const
 time that last load balance cycle took
 
virtual void adapt ()
 on call of this method the internal adaptation operator is called.
 
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
 
virtual const char * methodName () const
 returns name of adaptation method
 
virtual bool adaptive () const
 returns true if adaptation manager as adaptation method different to NONE
 
template<class DiscrOpType >
void saveObjPointer (DiscrOpType *discrOp)
 Store new generated DiscreteOperator Pointer.
 
template<class DiscrOpType , class LocalOpType >
void saveObjPointer (DiscrOpType *discrOp, LocalOpType *lop)
 
void communicate () const
 
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
 

Protected Member Functions

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

Static Protected Member Functions

static DofManagerTypegetDofManager (const GridType &grid)
 

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.
 
std::vector< LocalDataCollectorPairType > localList_
 
std::vector< DataCollectorPairType > collList_
 
std::set< const IsDiscreteFunction * > listOfFcts_
 
CommunicationManagerList commList_
 
double balanceTime_
 

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.

Member Typedef Documentation

◆ LocalIdSet

template<class GridType , class RestProlOperatorImp >
typedef GridType::Traits::LocalIdSet Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::LocalIdSet
inherited

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

◆ 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

◆ ~AdaptationManager()

template<class GridType , class RestProlOperatorImp >
Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::~AdaptationManager ( )
inline

destructor decreasing reference counter

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.

◆ addDiscreteFunction() [1/2]

template<class GridType >
template<class DiscreteFunctionType >
void Dune::Fem::LoadBalancer< GridType >::addDiscreteFunction ( DiscreteFunctionType &  df)
inlineinherited

add discrete function to data inliner/xtractor list

◆ addDiscreteFunction() [2/2]

template<class GridType >
template<class DiscreteFunctionType , class ContainsCheck >
void Dune::Fem::LoadBalancer< GridType >::addDiscreteFunction ( DiscreteFunctionType &  df,
const ContainsCheck &  containsCheck 
)
inlineinherited

add discrete function to data inliner/xtractor list

◆ addToLoadBalancer()

template<class GridType >
template<class DiscreteFunctionType >
void Dune::Fem::LoadBalancer< GridType >::addToLoadBalancer ( DiscreteFunctionType &  df)
inlineinherited

add discrete function to data inliner/xtractor list

◆ backup()

template<class GridType , class RestProlOperatorImp >
void Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::backup ( ) const
inlinevirtual

backup internal data

Implements Dune::Fem::PersistentObject.

◆ balanceCounter()

template<class GridType , class RestProlOperatorImp >
int Dune::Fem::AdaptationManager< GridType, RestProlOperatorImp >::balanceCounter ( ) const
inlinevirtual

returns actual balanceCounter for checkpointing

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

◆ communicate()

template<class GridType >
void Dune::Fem::LoadBalancer< GridType >::communicate ( ) const
inlineinherited

◆ getDofManager()

template<class GridType , class RestProlOperatorImp >
static DofManagerType & Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::getDofManager ( const GridType &  grid)
inlinestaticprotectedinherited

◆ 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

◆ insertSubData()

virtual void Dune::Fem::PersistentObject::insertSubData ( )
inlineprotectedvirtualinherited

◆ 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

returns name of adaptation method

Returns
name of adaptation method

Reimplemented from Dune::Fem::AdaptationManagerInterface.

◆ pointer()

virtual void * Dune::Fem::PersistentObject::pointer ( )
inlineprotectedvirtualinherited

◆ removeSubData()

virtual void Dune::Fem::PersistentObject::removeSubData ( )
inlineprotectedvirtualinherited

◆ restore()

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

retore internal data

Implements Dune::Fem::PersistentObject.

◆ saveObjPointer() [1/2]

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

Store new generated DiscreteOperator Pointer.

◆ saveObjPointer() [2/2]

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

Store new generated DiscreteOperator Pointer and the LocalOperator pointer

Member Data Documentation

◆ adaptationMethod_

template<class GridType >
AdaptationMethodType Dune::Fem::AdaptationMethod< GridType >::adaptationMethod_
protectedinherited

method identifier

◆ adaptTime_

template<class GridType , class RestProlOperatorImp >
double Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::adaptTime_
protectedinherited

time that adaptation took

◆ balanceTime_

template<class GridType >
double Dune::Fem::LoadBalancer< GridType >::balanceTime_
protectedinherited

◆ collList_

template<class GridType >
std::vector< DataCollectorPairType > Dune::Fem::LoadBalancer< GridType >::collList_
protectedinherited

◆ commList_

template<class GridType >
CommunicationManagerList Dune::Fem::LoadBalancer< GridType >::commList_
mutableprotectedinherited

◆ dm_ [1/2]

template<class GridType , class RestProlOperatorImp >
DofManagerType& Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::dm_
protectedinherited

DofManager corresponding to grid.

◆ dm_ [2/2]

template<class GridType >
DofManagerType& Dune::Fem::LoadBalancer< GridType >::dm_
protectedinherited

DofManager corresponding to grid.

◆ grid_ [1/2]

template<class GridType , class RestProlOperatorImp >
GridType& Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::grid_
protectedinherited

corresponding grid

◆ grid_ [2/2]

template<class GridType >
GridType& Dune::Fem::LoadBalancer< GridType >::grid_
protectedinherited

corresponding grid

◆ listOfFcts_

template<class GridType >
std::set< const IsDiscreteFunction * > Dune::Fem::LoadBalancer< GridType >::listOfFcts_
protectedinherited

◆ localList_

template<class GridType >
std::vector< LocalDataCollectorPairType > Dune::Fem::LoadBalancer< GridType >::localList_
protectedinherited

◆ rpOp_

template<class GridType , class RestProlOperatorImp >
RestProlOperatorImp& Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::rpOp_
protectedinherited

Restriction and Prolongation Operator.

◆ wasChanged_

template<class GridType , class RestProlOperatorImp >
bool Dune::Fem::AdaptationManagerBase< GridType, RestProlOperatorImp >::wasChanged_
mutableprotectedinherited

flag for restriction


The documentation for this class was generated from the following file: