dune-grid  2.2.0
Modules | Functions
dune-grid
Collaboration diagram for dune-grid:

Modules

 The Grid Interface
 Interfaces needed when working with a Dune::Grid.
 Mappers
 Grid Implementations
 A list of the different Implementations of the Dune Grid Interface.
 I/O
 Grid Developer API
 Interfaces needed to implement a new Dune::Grid.
 Refinement

Functions

template<class G >
void Dune::gridinfo (const G &grid, std::string prefix="")
 A function to print some information about the grid as a whole.
template<class G >
void Dune::gridlevellist (const G &grid, int level, std::string prefix)
 A function to print info about a grid level and its entities.
template<class G >
void Dune::gridleaflist (const G &grid, std::string prefix)
 A function to print info about a leaf grid and its entities.

Detailed Description

    The Dune Grid module defines a general interface to a parallel, in general
nonconforming, locally refined and hierarchical
    finite element mesh.  The interface is independent of dimension and
    element type.

Terminology

Entity

    An entity is a geometric object that is part of a grid. It is 
generalized polytope that has the same dimensionality as the grid
or a lower dimension.

Dimension

    A grid has a fixed dimension \form#27 which is the number of coordinates
required to specify any point in the grid. The dimension is a template parameter
of a grid.

Codimension of an entity

    Each entity has a codimension \form#28 where \form#29 (the dimension of the grid).
    An entity with codimension \form#30 in a grid of dimension \form#31 is a \form#32-dimensional
    object. 

Subentity

    Entities are hierarchically constructed in the sense that entities of
    codimension 0 are made up of entities of codimension 1 which are themselves
    made up of entities of codimension 2 etc. until entities of codimension \form#33
    which consist of entities of codimension \form#31.

Element

    An element is an entity of codimension 0.

Vertex

    A vertex is an entity of codimension \form#31 (the same as the grid's dimension).

World dimension

    Each grid has a world dimension \form#34 with \form#35. This is the number
of coordinates of the positions of the grid's vertices.

Hierarchical grid

    The %Dune grid interface describes not only a single grid but a sequence of 
    grids with different resolution. This is achieved by beginning with an
    intentionally coarse grid, the so-called macro grid. Then each
element may be individually subdivided to yield new (smaller) elements. 
    This construction is recursive such that each macro element and
    all the elements that resulted from subdividing it form a tree structure.

Grid refinement

    The grid can only be modified in special phases, the so-called refinement phase.
    In between refinement phases the entities of the grid can not be modified in any way.
    During refinement currently only the hierachic subdivision can be modified.

Grid level

    All elements of the macro grid form level 0 of the grid structure. All
    elements that are obtained from an \form#36-fold subdivision of a macro
    element form level \form#36 of the grid structure.

Leaf grid

    All elements of a grid that are not subdivided any further make up
    the leaf grid. The leaf grid is the mesh with the finest resolution.

Assignable

    A type is said to be assignable if it has a (public) copy constructor and
    assignment operator. Note that this definition requires always both methods.

Default-constructible

    A type is said to be default-constructible if it has a constructor without arguments.

Copy-constructible from type X

    A type is said to be copy constructible from some other type X if it has
    a copy constructor that takes a reference to an object of type X.

Equality-comparable

    A type is said to be equality-comparable if it has an operator==.

LessThan-comparable

    A type is lessthan-comparable if it has an operator<.

Iterator

    A type is dereferenceable if it has an operator* that delivers
    a reference to a value type.

Iterator

    An iterator is a type that can be dereferenced to yield an object of 
    its value type, i.e. it behaves like a pointer, and that can be incremented to
    point to the next element in a linear sequence. In that respect it is comparable to
    ForwardIterator in the Standard Template Library.

Mutable iterator

    An iterator is called mutable if the value it refers to can be changed, i.e. it is
    assignable.

Immutable iterator

    An iterator is called immutable if the value referenced by the iterator can not
    be changed, i. e. the value is not assignable and only methods marked const on the value
    can be called.

Model

    A type M is called a model of another type X if it implements all the methods
    of X with the intended semantics. Typically X is a type that describes an interface.

Types common to all grid implementations

    - Dune::ReferenceElement describes the topology and geometry of standard entities.
    Any given entity of the grid can be completely specified by a reference element
    and a map from this reference element to world coordinate space.

    - Dune::GeometryType defines names for the reference elements.

    - Dune::CollectiveCommunication defines an interface to global communication
    operations in a portable and transparent way. In particular also for sequential grids.

Types making up a grid implementation

Each implementation of the Dune grid interface consist of a number of related types which
    together form a model of the grid interface. These types are the following:

    - %Grid which is a model of Dune::Grid where the template parameters are at least the
    dimension and the world dimension. It is a container of entities that allows to access
    these entities and that knows the number of entities.

    - %Entity which is a model of Dune::Entity. This class is parametrized by dimension and
    codimension. The entity encapsulates the topological part of an entity, i.e. its hierarchical 
    construction from subentities and the relation to other entities. Entities cannot
    be created, copied or modified by the user. They can only be read-accessed through
    immutable iterators.

    - %Geometry which is a model of Dune::Geometry. This class encapsulates the geometric part 
    of an entity by mapping local coordinates in a reference element to world coordinates. 

    - %EntityPointer which is a model of Dune::EntityPointer. This is a dereferenceable
    type that delivers a reference to an entity. Moreover it is immutable, i.e. the
    referenced entity can not be modified.

    - %LevelIterator which is a model of Dune::LevelIterator is an immutable iterator
that provides access to all entities of a given codimension and level of the
    grid. %EntityPointer is copy-constructible from a %LevelIterator.

    - %LeafIterator which is a model of Dune::LeafIterator is an immutable iterator
    that provides access to all entities of a given codimension of the leaf grid.
    %EntityPointer is copy-constructible from a %LeafIterator.

    - %HierarchicIterator which is a model of Dune::HierarchicIterator is an immutable
    iterator that provides access to all entities of codimension 0 that resulted from subdivision
    of a given entity of codimension 0. %EntityPointer is copy-constructible from a 
    %HierarchicIterator.

    - %Intersection which is a model of Dune::Intersection
    provides access an intersection of codimension 1 of two entity of codimension 0
or one entity and the boundary. In a conforming mesh this
    is a face of an element. For two entities with a common intersection
    the %Intersection also provides information about the geometric location
    of the intersection. Furthermore it also provides information about intersections
    of an entity with the internal or external boundaries.

    - %IntersectionIterator which is a model of Dune::IntersectionIterator
    provides access to all intersections of a given entity of codimension 0.

    - %LevelIndexSet and %LeafIndexSet which are both models of Dune::IndexSet are
    used to attach any kind of user-defined data to (subsets of) entities of the grid.
    This data is supposed to be stored in one-dimensional arrays for reasons
    of efficiency.

    - %LocalIdSet and %GlobalIdSet which are both models of Dune::IdSet are used to
    save user data during a grid refinement phase and during dynamic load balancing
    in the parallel case.

Overview of basic capabilities of the types

    <TABLE>
    <TR>
    <TD>Class</TD>
    <TD>Assignable</TD>
    <TD>DefaultConstructible</TD>
    <TD>EqualityComparable</TD>
    <TD>LessThanComparable</TD>
    </TR>
    <TR>
    <TD>Grid</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>Entity</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>GeometryType</TD>
    <TD>yes</TD>
    <TD>yes</TD>
    <TD>yes</TD>
    <TD>yes</TD>
    </TR>
    <TR>
    <TD>Geometry</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>EntityPointer</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>LevelIterator</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>LeafIterator</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>HierarchicIterator</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>Intersection</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>IntersectionIterator</TD>
    <TD>yes</TD>
    <TD>no</TD>
    <TD>yes</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>IndexSet</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    </TR>
    <TR>
    <TD>IdSet</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    <TD>no</TD>
    </TR>
    </TABLE>

Function Documentation

template<class G >
void Dune::gridinfo ( const G &  grid,
std::string  prefix = "" 
)

A function to print some information about the grid as a whole.

template<class G >
void Dune::gridleaflist ( const G &  grid,
std::string  prefix 
)

A function to print info about a leaf grid and its entities.

References Dune::Entity< cd, dim, GridImp, EntityImp >::level(), and Dune::PartitionName().

template<class G >
void Dune::gridlevellist ( const G &  grid,
int  level,
std::string  prefix 
)

A function to print info about a grid level and its entities.

References Dune::Entity< cd, dim, GridImp, EntityImp >::level(), and Dune::PartitionName().