dune-grid  2.4
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::OneDGrid Class Reference

One-dimensional adaptive grid. More...

#include <dune/grid/onedgrid.hh>

Inheritance diagram for Dune::OneDGrid:
Inheritance graph

Public Types

enum  RefinementType { LOCAL, COPY }
 The different forms of grid refinement supported by OneDGrid. More...
 
typedef double ctype
 The type used to store coordinates. More...
 
typedef OneDGridFamily< dim, dimworld > GridFamily
 GridFamily of OneDGrid. More...
 
typedef OneDGridFamily< dim, dimworld >::Traits Traits
 
Exported constants
enum  { dimension =dim }
 A constant that exports the template parameter dim. More...
 
enum  { dimensionworld =dimworld }
 A constant that exports the template parameter dimworld. More...
 
Exported types
typedef Partition< All_Partition >::LevelGridView LevelGridView
 View types for All_Partition. More...
 
typedef Partition< All_Partition >::LeafGridView LeafGridView
 
typedef GridFamily::Traits::LeafIntersection LeafIntersection
 A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view. More...
 
typedef GridFamily::Traits::LevelIntersection LevelIntersection
 A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view. More...
 
typedef GridFamily::Traits::LeafIntersectionIterator LeafIntersectionIterator
 A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements. More...
 
typedef GridFamily::Traits::LevelIntersectionIterator LevelIntersectionIterator
 A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level. More...
 
typedef GridFamily::Traits::HierarchicIterator HierarchicIterator
 A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0. More...
 
typedef GridFamily::Traits::LevelIndexSet LevelIndexSet
 A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level. More...
 
typedef GridFamily::Traits::LeafIndexSet LeafIndexSet
 A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid. More...
 
typedef GridFamily::Traits::GlobalIdSet GlobalIdSet
 A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive. More...
 
typedef GridFamily::Traits::LocalIdSet LocalIdSet
 A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive. More...
 
typedef GridFamily::Traits::CollectiveCommunication CollectiveCommunication
 A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective communication on the set of processes used by the grid. More...
 

Public Member Functions

 OneDGrid (const std::vector< ctype > &coords)
 Constructor with an explicit set of coordinates. More...
 
 OneDGrid (int numElements, const ctype &leftBoundary, const ctype &rightBoundary)
 Constructor for a uniform grid. More...
 
 ~OneDGrid ()
 Destructor. More...
 
int maxLevel () const
 Return maximum level defined in this grid. More...
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lbegin (int level) const
 Iterator to first entity of given codim on level. More...
 
template<int codim>
Traits::template Codim< codim >::LevelIterator lend (int level) const
 one past the end on this level More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lbegin (int level) const
 Iterator to first entity of given codim on level. More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LevelIterator lend (int level) const
 one past the end on this level More...
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafbegin () const
 Iterator to first entity of given codim on leaf level. More...
 
template<int codim>
Traits::template Codim< codim >::LeafIterator leafend () const
 one past the end on leaf level More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafbegin () const
 Iterator to first entity of given codim on level. More...
 
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >::template Partition< PiType >::LeafIterator leafend () const
 one past the end on this level More...
 
int size (int level, int codim) const
 Number of grid entities per level and codim. More...
 
int size (int codim) const
 number of leaf entities per codim in this process More...
 
int size (int level, GeometryType type) const
 number of entities per level and geometry type in this process More...
 
int size (GeometryType type) const
 number of leaf entities per geometry type in this process More...
 
size_t numBoundarySegments () const
 Return the number of coarse grid boundary segments. More...
 
int overlapSize (int codim) const
 The processor overlap for parallel computing. Always zero because this is a strictly sequential grid. More...
 
int ghostSize (int codim) const
 The processor ghost overlap for parallel computing. Always zero because this is a strictly sequential grid. More...
 
int overlapSize (int level, int codim) const
 The processor overlap for parallel computing. Always zero because this is a strictly sequential grid. More...
 
int ghostSize (int level, int codim) const
 The processor ghost overlap for parallel computing. Always zero because this is a strictly sequential grid. More...
 
const Traits::GlobalIdSetglobalIdSet () const
 Get the set of global ids. More...
 
const Traits::LocalIdSetlocalIdSet () const
 Get the set of local ids. More...
 
const Traits::LevelIndexSetlevelIndexSet (int level) const
 Get an index set for the given level. More...
 
const Traits::LeafIndexSetleafIndexSet () const
 Get an index set for the leaf level. More...
 
bool mark (int refCount, const Traits::Codim< 0 >::Entity &e)
 Mark entity for refinement. More...
 
int getMark (const Traits::Codim< 0 >::Entity &e) const
 return current adaptation marker of given entity More...
 
bool preAdapt ()
 Does nothing except return true if some element has been marked for refinement. More...
 
bool adapt ()
 Triggers the grid refinement process. More...
 
void postAdapt ()
 Adaptation post-processing: Reset all adaptation state flags. More...
 
void setRefinementType (RefinementType type)
 Sets the type of grid refinement. More...
 
void globalRefine (int refCount)
 Does one uniform refinement step. More...
 
template<class DataHandle >
void communicate (DataHandle &data, InterfaceType iftype, CommunicationDirection dir, int level) const
 
template<class DataHandle >
void communicate (DataHandle &data, InterfaceType iftype, CommunicationDirection dir) const
 
const CollectiveCommunicationcomm () const
 
Traits::template Partition< pitype >::LevelGridView levelGridView (int level) const
 View for a grid level. More...
 
Traits::template Partition< All_Partition >::LevelGridView levelGridView (int level) const
 View for a grid level for All_Partition. More...
 
Traits::template Partition< pitype >::LeafGridView leafGridView () const
 View for the leaf grid. More...
 
Traits::template Partition< All_Partition >::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...
 
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
 
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const
 
bool loadBalance ()
 default implementation of load balance does nothing and returns false More...
 
bool loadBalance (DataHandle &data)
 default implementation of load balance does nothing and returns false More...
 
template<class EntitySeed >
Codim< EntitySeed::codimension >::EntityPointer entityPointer (const EntitySeed &seed) const
 obtain EntityPointer from EntitySeed. More...
 
template<class EntitySeed >
Codim< EntitySeed::codimension >::Entity entity (const EntitySeed &seed) const
 obtain Entity from EntitySeed. More...
 
Adaptivity and grid refinement
bool mark (int refCount, const typename Codim< 0 >::Entity &e)
 Marks an entity to be refined/coarsened in a subsequent adapt. More...
 
int getMark (const typename Codim< 0 >::Entity &e) const
 returns adaptation mark for given entity More...
 

Static Public Member Functions

template<typename Seed >
static Traits::template Codim< Seed::codimension >::EntityPointer entityPointer (const Seed &seed)
 Create an EntityPointer from an EntitySeed. More...
 
template<typename Seed >
static Traits::template Codim< Seed::codimension >::Entity entity (const Seed &seed)
 Create an Entity from an EntitySeed. More...
 

Protected Member Functions

GridImp & asImp ()
 Barton-Nackman trick. More...
 
const GridImp & asImp () const
 Barton-Nackman trick. More...
 

Static Protected Member Functions

static std::conditional< std::is_reference< InterfaceType >::value, typename std::add_lvalue_reference< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type, typename std::remove_const< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type getRealImplementation (InterfaceType &&i)
 return real implementation of interface class More...
 

Detailed Description

One-dimensional adaptive grid.

[ provides Dune::Grid ]

This implementation of the grid interface provides one-dimensional grids only. The OneDGrid can be nonuniform and provides local mesh refinement and coarsening.

Member Typedef Documentation

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::CollectiveCommunication Dune::Grid< dim, dimworld, ct, GridFamily >::CollectiveCommunication
inherited

A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective communication on the set of processes used by the grid.

typedef double Dune::OneDGrid::ctype

The type used to store coordinates.

If you ever want OneDGrid to use a different type for coordinates, you need to change this type and the third template argument of the base class.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::GlobalIdSet Dune::Grid< dim, dimworld, ct, GridFamily >::GlobalIdSet
inherited

A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive.

GridFamily of OneDGrid.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::HierarchicIterator Dune::Grid< dim, dimworld, ct, GridFamily >::HierarchicIterator
inherited

A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0.

template<int dim, int dimworld, class ct , class GridFamily >
typedef Partition< All_Partition >:: LeafGridView Dune::Grid< dim, dimworld, ct, GridFamily >::LeafGridView
inherited
template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LeafIndexSet Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIndexSet
inherited

A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LeafIntersection Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIntersection
inherited

A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LeafIntersectionIterator Dune::Grid< dim, dimworld, ct, GridFamily >::LeafIntersectionIterator
inherited

A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements.

template<int dim, int dimworld, class ct , class GridFamily >
typedef Partition< All_Partition >:: LevelGridView Dune::Grid< dim, dimworld, ct, GridFamily >::LevelGridView
inherited

View types for All_Partition.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LevelIndexSet Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIndexSet
inherited

A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LevelIntersection Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIntersection
inherited

A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LevelIntersectionIterator Dune::Grid< dim, dimworld, ct, GridFamily >::LevelIntersectionIterator
inherited

A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level.

template<int dim, int dimworld, class ct , class GridFamily >
typedef GridFamily::Traits::LocalIdSet Dune::Grid< dim, dimworld, ct, GridFamily >::LocalIdSet
inherited

A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive.

Constructor & Destructor Documentation

Dune::OneDGrid::OneDGrid ( const std::vector< ctype > &  coords)

Constructor with an explicit set of coordinates.

Dune::OneDGrid::OneDGrid ( int  numElements,
const ctype leftBoundary,
const ctype rightBoundary 
)

Constructor for a uniform grid.

Dune::OneDGrid::~OneDGrid ( )

Destructor.

Member Function Documentation

bool Dune::OneDGrid::adapt ( )

Triggers the grid refinement process.

template<int dim, int dimworld, class ct , class GridFamily >
GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp ( )
inlineprotectedinherited

Barton-Nackman trick.

Referenced by Dune::Grid< dim, dimworld, ct, GridFamily >::adapt(), Dune::Grid< dim, dimworld, ct, GridFamily >::comm(), Dune::Grid< dim, dimworld, ct, GridFamily >::communicate(), Dune::Grid< dim, dimworld, ct, GridFamily >::entity(), Dune::Grid< dim, dimworld, ct, GridFamily >::entityPointer(), Dune::Grid< dim, dimworld, ct, GridFamily >::getMark(), Dune::Grid< dim, dimworld, ct, GridFamily >::ghostSize(), Dune::Grid< dim, dimworld, ct, GridFamily >::globalIdSet(), Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine(), Dune::Grid< dim, dimworld, ct, GridFamily >::lbegin(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lbegin(), Dune::Grid< dim, dimworld, ct, GridFamily >::leafbegin(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafbegin(), Dune::Grid< dim, dimworld, ct, GridFamily >::leafend(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafend(), Dune::Grid< dim, dimworld, ct, GridFamily >::leafGridView(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafGridView(), Dune::Grid< dim, dimworld, ct, GridFamily >::leafIndexSet(), Dune::Grid< dim, dimworld, ct, GridFamily >::lend(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lend(), Dune::Grid< dim, dimworld, ct, GridFamily >::levelGridView(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelGridView(), Dune::Grid< dim, dimworld, ct, GridFamily >::levelIndexSet(), Dune::Grid< dim, dimworld, ct, GridFamily >::loadBalance(), Dune::Grid< dim, dimworld, ct, GridFamily >::localIdSet(), Dune::Grid< dim, dimworld, ct, GridFamily >::mark(), Dune::Grid< dim, dimworld, ct, GridFamily >::maxLevel(), Dune::Grid< dim, dimworld, ct, GridFamily >::numBoundarySegments(), Dune::Grid< dim, dimworld, ct, GridFamily >::overlapSize(), Dune::Grid< dim, dimworld, ct, GridFamily >::postAdapt(), Dune::Grid< dim, dimworld, ct, GridFamily >::preAdapt(), and Dune::Grid< dim, dimworld, ct, GridFamily >::size().

template<int dim, int dimworld, class ct , class GridFamily >
const GridImp& Dune::Grid< dim, dimworld, ct, GridFamily >::asImp ( ) const
inlineprotectedinherited

Barton-Nackman trick.

const CollectiveCommunication& Dune::OneDGrid::comm ( ) const
inline
template<class DataHandle >
void Dune::OneDGrid::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inline
template<class DataHandle >
void Dune::OneDGrid::communicate ( DataHandle &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inline
void Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inlineinherited

dummy communicate, doing nothing

void Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::communicate ( CommDataHandleIF< DataHandleImp, DataTypeImp > &  data,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inlineinherited

dummy communicate, doing nothing

template<typename Seed >
static Traits::template Codim<Seed::codimension>::Entity Dune::OneDGrid::entity ( const Seed &  seed)
inlinestatic
template<int dim, int dimworld, class ct , class GridFamily >
template<class EntitySeed >
Codim< EntitySeed :: codimension >:: Entity Dune::Grid< dim, dimworld, ct, GridFamily >::entity ( const EntitySeed seed) const
inlineinherited
template<typename Seed >
static Traits::template Codim<Seed::codimension>::EntityPointer Dune::OneDGrid::entityPointer ( const Seed &  seed)
inlinestatic
template<int dim, int dimworld, class ct , class GridFamily >
template<class EntitySeed >
Codim< EntitySeed :: codimension >:: EntityPointer Dune::Grid< dim, dimworld, ct, GridFamily >::entityPointer ( const EntitySeed seed) const
inlineinherited

obtain EntityPointer from EntitySeed.

Deprecated:
This method is deprecated and will be removed after the release of dune-grid 2.4. Please use entity() instead, which will directly return an Entity object that you can then store for later use. The EntityPointer concept in general is deprecated and will not be available after dune-grid 2.4 has been released.
Deprecated:
"entityPointer() is deprecated and will be removed after the release of dune-grid 2.4. Use entity() instead to directly obtain an Entity object."

References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().

int Dune::OneDGrid::getMark ( const Traits::Codim< 0 >::Entity e) const

return current adaptation marker of given entity

Parameters
eEntity to the entity you want to mark
Returns
int current adaptation marker of entity pointer e
template<int dim, int dimworld, class ct , class GridFamily >
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark ( const typename Codim< 0 >::Entity e) const
inlineinherited

returns adaptation mark for given entity

Parameters
[in]eEntity for which adaptation mark should be determined
Returns
int adaptation mark currently set for given Entity e

References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().

int Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::getMark ( const typename Traits::template Codim< 0 >::Entity e) const
inlineinherited

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
static std::conditional< std::is_reference< InterfaceType >::value, typename std::add_lvalue_reference< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type, typename std::remove_const< typename ReturnImplementationType< typename std::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::getRealImplementation ( InterfaceType &&  i)
inlinestaticprotectedinherited

return real implementation of interface class

Referenced by entity(), and entityPointer().

int Dune::OneDGrid::ghostSize ( int  codim) const
inline

The processor ghost overlap for parallel computing. Always zero because this is a strictly sequential grid.

int Dune::OneDGrid::ghostSize ( int  level,
int  codim 
) const
inline

The processor ghost overlap for parallel computing. Always zero because this is a strictly sequential grid.

const Traits::GlobalIdSet& Dune::OneDGrid::globalIdSet ( ) const
inline

Get the set of global ids.

void Dune::OneDGrid::globalRefine ( int  refCount)

Does one uniform refinement step.

Parameters
refCountI don't know what this is good for. It doesn't actually do anything.
template<int codim>
Traits::template Codim<codim>::LevelIterator Dune::OneDGrid::lbegin ( int  level) const

Iterator to first entity of given codim on level.

template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LevelIterator Dune::OneDGrid::lbegin ( int  level) const

Iterator to first entity of given codim on level.

template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::OneDGrid::leafbegin ( ) const

Iterator to first entity of given codim on leaf level.

template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LeafIterator Dune::OneDGrid::leafbegin ( ) const

Iterator to first entity of given codim on level.

template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::OneDGrid::leafend ( ) const

one past the end on leaf level

template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LeafIterator Dune::OneDGrid::leafend ( ) const

one past the end on this level

Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::leafGridView ( ) const
inlineinherited

View for the leaf grid.

Deprecated:
"After DUNE 2.4, grid views will always model the All_Partition. The template method leafGridView< pitype > will be removed without replacement. Use leafGridView() instead."
Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::leafGridView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

const Traits::LeafIndexSet& Dune::OneDGrid::leafIndexSet ( ) const
inline

Get an index set for the leaf level.

Referenced by size().

template<int codim>
Traits::template Codim<codim>::LevelIterator Dune::OneDGrid::lend ( int  level) const

one past the end on this level

template<int codim, PartitionIteratorType PiType>
Traits::template Codim<codim>::template Partition<PiType>::LevelIterator Dune::OneDGrid::lend ( int  level) const

one past the end on this level

Traits::template Partition<pitype>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::levelGridView ( int  level) const
inlineinherited

View for a grid level.

Deprecated:
"After DUNE 2.4, grid views will always model the All_Partition. The template method levelGridView< pitype > will be removed without replacement. Use levelGridView() instead."
Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::levelGridView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

const Traits::LevelIndexSet& Dune::OneDGrid::levelIndexSet ( int  level) const
inline

Get an index set for the given level.

References OneDGridLevelIndexSet< const OneDGrid >.

bool Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::loadBalance ( )
inlineinherited

default implementation of load balance does nothing and returns false

bool Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::loadBalance ( DataHandle &  data)
inlineinherited

default implementation of load balance does nothing and returns false

const Traits::LocalIdSet& Dune::OneDGrid::localIdSet ( ) const
inline

Get the set of local ids.

bool Dune::OneDGrid::mark ( int  refCount,
const Traits::Codim< 0 >::Entity e 
)

Mark entity for refinement.

Parameters
refCountif >0 mark for refinement, if <0 mark for coarsening
eEntity to the entity you want to mark
Returns
True, if marking was successfull
template<int dim, int dimworld, class ct , class GridFamily >
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark ( int  refCount,
const typename Codim< 0 >::Entity e 
)
inlineinherited

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 that should be marked
Returns
true if Entity was marked, false otherwise.

References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().

bool Dune::GridDefaultImplementation< dim, dimworld, double , OneDGridFamily< 1, 1 > >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
)
inlineinherited

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.
int Dune::OneDGrid::maxLevel ( ) const
inline

Return maximum level defined in this grid.

Levels are numbered 0 ... maxlevel with 0 the coarsest level.

size_t Dune::OneDGrid::numBoundarySegments ( ) const
inline

Return the number of coarse grid boundary segments.

For this grid implementation, the return value is always 2, because only connected domains are supported, and then the coarse grid boundary consists of two points.

int Dune::OneDGrid::overlapSize ( int  codim) const
inline

The processor overlap for parallel computing. Always zero because this is a strictly sequential grid.

int Dune::OneDGrid::overlapSize ( int  level,
int  codim 
) const
inline

The processor overlap for parallel computing. Always zero because this is a strictly sequential grid.

void Dune::OneDGrid::postAdapt ( )

Adaptation post-processing: Reset all adaptation state flags.

bool Dune::OneDGrid::preAdapt ( )

Does nothing except return true if some element has been marked for refinement.

void Dune::OneDGrid::setRefinementType ( RefinementType  type)
inline

Sets the type of grid refinement.

int Dune::OneDGrid::size ( int  level,
int  codim 
) const
inline

Number of grid entities per level and codim.

Referenced by size().

int Dune::OneDGrid::size ( int  codim) const
inline

number of leaf entities per codim in this process

References leafIndexSet(), and Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::size().

int Dune::OneDGrid::size ( int  level,
GeometryType  type 
) const
inline

number of entities per level and geometry type in this process

References size().

int Dune::OneDGrid::size ( GeometryType  type) const
inline

number of leaf entities per geometry type in this process

References leafIndexSet(), and Dune::IndexSet< GridImp, IndexSetImp, IndexTypeImp, TypesImp >::size().


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