dune-grid  2.7.0
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily > Class Template Reference

#include <dune/grid/common/geometry.hh>

Inheritance diagram for Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >:
Inheritance graph

Classes

class  ReturnImplementationType
 Helper class to choose correct implementation return type for getRealImplementation. More...
 
class  ReturnImplementationType< const T >
 

Public Types

typedef GridFamily::Traits Traits
 The traits of this class. More...
 

Public Member Functions

Traits::LevelGridView levelGridView (int level) const
 View for a grid level for All_Partition. More...
 
Traits::LeafGridView leafGridView () const
 View for the leaf grid for All_Partition. More...
 
bool mark (int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
 Marks an entity to be refined/coarsened in a subsequent adapt. More...
 
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 returns adaptation mark for given entity, i.e. here the default implementation returns 0. More...
 
bool adapt ()
 Refine all positive marked leaf entities coarsen all negative marked entities if possible. More...
 
bool preAdapt ()
 returns true, if at least one entity is marked for adaption More...
 
void postAdapt ()
 clean up some markers More...
 
bool loadBalance ()
 default implementation of load balance does nothing and returns false More...
 
template<class DataHandle >
bool loadBalance (DataHandle &data)
 default implementation of load balance does nothing and returns false More...
 

Protected Member Functions

template<class InterfaceType >
 DUNE_DEPRECATED_MSG ("use the facade class' `impl()` method instead") static typename std
 return real implementation of interface class More...
 

Detailed Description

template<int dim, int dimworld, class ct, class GridFamily>
class Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >

A Grid is a container of grid entities. Given a dimension dim these entities have a codimension codim with 0 <= codim <= dim.

The Grid is assumed to be hierachically refined and nested. It enables iteration over entities of a given level and codimension.

The grid can be non-matching.

All information is provided to allocate degrees of freedom in appropriate vector data structures (which are not part of this module).

Template class Grid defines a "base class" for all grids.

Classes implementing the Grid Interface
For installation instructions for external grid managers see http://www.dune-project.org/external_libraries/index.html .

Member Typedef Documentation

◆ Traits

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::Traits

The traits of this class.

Presents the typedefs as described in GridTraits.

Member Function Documentation

◆ adapt()

template<int dim, int dimworld, class ct , class GridFamily >
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::adapt ( )
inline

Refine all positive marked leaf entities coarsen all negative marked entities if possible.

Returns
true if a least one entity was refined
Note
this default implementation always returns false so grid with no adaptation doesn't need to implement these methods

◆ DUNE_DEPRECATED_MSG()

template<int dim, int dimworld, class ct , class GridFamily >
template<class InterfaceType >
Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::DUNE_DEPRECATED_MSG ( "use the facade class' `impl()` method instead"  )
inlineprotected

return real implementation of interface class

◆ getMark()

template<int dim, int dimworld, class ct , class GridFamily >
int Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::getMark ( const typename Traits::template Codim< 0 >::Entity e) const
inline

returns adaptation mark for given entity, i.e. here the default implementation returns 0.

Parameters
[in]eEntity for which adaptation mark should be determined
Returns
int adaptation mark, here the default value 0 is returned

◆ leafGridView()

template<int dim, int dimworld, class ct , class GridFamily >
Traits::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::leafGridView ( ) const
inline

View for the leaf grid for All_Partition.

◆ levelGridView()

template<int dim, int dimworld, class ct , class GridFamily >
Traits::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::levelGridView ( int  level) const
inline

View for a grid level for All_Partition.

◆ loadBalance() [1/2]

template<int dim, int dimworld, class ct , class GridFamily >
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::loadBalance ( )
inline

default implementation of load balance does nothing and returns false

◆ loadBalance() [2/2]

template<int dim, int dimworld, class ct , class GridFamily >
template<class DataHandle >
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::loadBalance ( DataHandle &  data)
inline

default implementation of load balance does nothing and returns false

◆ mark()

template<int dim, int dimworld, class ct , class GridFamily >
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark ( int  refCount,
const typename Traits ::template Codim< 0 >::Entity e 
)
inline

Marks an entity to be refined/coarsened in a subsequent adapt.

Parameters
[in]refCountNumber of subdivisions that should be applied. Negative value means coarsening.
[in]eEntity to Entity that should be refined
Returns
true if Entity was marked, false otherwise.
Note
  • default implementation is: return false; for grids with no adaptation.
  • for the grid programmer: this method is implemented as a template method, because the Entity type is not defined when the class is instantiated You won't need this trick in the implementation. In your implementation you should use it as
    bool mark( int refCount,
    typename Traits::template Codim<0>::Entity & e ).
    This template method will vanish due to the inheritance rules.

◆ postAdapt()

template<int dim, int dimworld, class ct , class GridFamily >
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::postAdapt ( )
inline

clean up some markers

◆ preAdapt()

template<int dim, int dimworld, class ct , class GridFamily >
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::preAdapt ( )
inline

returns true, if at least one entity is marked for adaption


The documentation for this class was generated from the following files:
Dune::GridDefaultImplementation::mark
bool mark(int refCount, const typename Traits ::template Codim< 0 >::Entity &e)
Marks an entity to be refined/coarsened in a subsequent adapt.
Definition: common/grid.hh:908