dune-grid  2.2.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends | List of all members
Dune::UGGrid< dim > Class Template Reference

[ provides Dune::Grid ] More...

#include <dune/grid/uggrid.hh>

Inheritance diagram for Dune::UGGrid< dim >:
Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > > Dune::Grid< dim, dimworld, ct, GridFamily >

Public Types

enum  RefinementType { LOCAL, COPY }
 The different forms of grid refinement that UG supports. More...
enum  ClosureType { GREEN, NONE }
 Decide whether to add a green closure to locally refined grid sections or not. More...
typedef UGGridFamily< dim, dim > GridFamily
 type of the used GridFamily for this grid
typedef UGGridFamily< dim, dim >
::Traits 
Traits
typedef UG::DOUBLE ctype
 The type used to store coordinates.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

Public Member Functions

 UGGrid ()
 Default constructor.
 ~UGGrid ()
 Destructor.
int maxLevel () const
template<int codim>
Traits::template Codim< codim >
::LevelIterator 
lbegin (int level) const
 Iterator to first entity of given codim on level.
template<int codim>
Traits::template Codim< codim >
::LevelIterator 
lend (int level) const
 one past the end on this level
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.
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >
::template Partition< PiType >
::LevelIterator 
lend (int level) const
 one past the end on this level
template<int codim>
Traits::template Codim< codim >
::LeafIterator 
leafbegin () const
 Iterator to first leaf entity of given codim.
template<int codim>
Traits::template Codim< codim >
::LeafIterator 
leafend () const
 one past the end of the sequence of leaf entities
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >
::template Partition< PiType >
::LeafIterator 
leafbegin () const
 Iterator to first leaf entity of given codim.
template<int codim, PartitionIteratorType PiType>
Traits::template Codim< codim >
::template Partition< PiType >
::LeafIterator 
leafend () const
 one past the end of the sequence of leaf entities
template<int codim>
Traits::template Codim< codim >
::EntityPointer 
entityPointer (const UGGridEntitySeed< codim, const UGGrid< dim > > &seed) const
 Create an EntityPointer from an EntitySeed.
int size (int level, int codim) const
 Number of grid entities per level and codim.
int size (int codim) const
 number of leaf entities per codim in this process
int size (int level, GeometryType type) const
 number of entities per level and geometry type in this process
int size (GeometryType type) const
 number of leaf entities per geometry type in this process
size_t numBoundarySegments () const
 Return the number of boundary segments.
const Traits::GlobalIdSetglobalIdSet () const
 Access to the GlobalIdSet.
const Traits::LocalIdSetlocalIdSet () const
 Access to the LocalIdSet.
const Traits::LevelIndexSetlevelIndexSet (int level) const
 Access to the LevelIndexSets.
const Traits::LeafIndexSetleafIndexSet () const
 Access to the LeafIndexSet.
unsigned int overlapSize (int codim) const
 Size of the overlap on the leaf level.
unsigned int ghostSize (int codim) const
 Size of the ghost cell layer on the leaf level.
unsigned int overlapSize (int level, int codim) const
 Size of the overlap on a given level.
unsigned int ghostSize (int level, int codim) const
 Size of the ghost cell layer on a given level.
bool loadBalance ()
 Default load balancing.
template<class DataHandle >
bool loadBalance (DataHandle &data)
 Re-balances the load each process has to handle for a parallel grid, the DataHandle data works like the data handle for the communicate methods. If grid has changed , true is returned.
bool loadBalance (int strategy, int minlevel, int depth, int maxlevel, int minelement)
 Distributes this grid over the available nodes in a distributed machine.
template<class DataHandle >
void communicate (DataHandle &dataHandle, InterfaceType iftype, CommunicationDirection dir, int level) const
 The communication interface for all codims on a given level.
template<class DataHandle >
void communicate (DataHandle &dataHandle, InterfaceType iftype, CommunicationDirection dir) const
 The communication interface for all codims on the leaf level.
const CollectiveCommunication
< UGGrid > & 
comm () const
void getChildrenOfSubface (const typename Traits::template Codim< 0 >::EntityPointer &e, int elementSide, int maxl, std::vector< typename Traits::template Codim< 0 >::EntityPointer > &childElements, std::vector< unsigned char > &childElementSides) const
 Rudimentary substitute for a hierarchic iterator on faces.
void setRefinementType (RefinementType type)
 Sets the type of grid refinement.
void setClosureType (ClosureType type)
 Sets the type of grid refinement closure.
void setPosition (const typename Traits::template Codim< dim >::EntityPointer &e, const FieldVector< double, dim > &pos)
 Sets a vertex to a new position.
void globalRefine (int n)
 Does uniform refinement.
void saveState (const std::string &filename) const
 Save entire grid hierarchy to disk.
void loadState (const std::string &filename)
 Read entire grid hierarchy from disk.
Traits::template Partition
< pitype >::LevelGridView 
levelView (int level) const
 View for a grid level.
Traits::template Partition
< All_Partition >
::LevelGridView 
levelView (int level) const
 View for a grid level for All_Partition.
Traits::template Partition
< pitype >::LeafGridView 
leafView () const
 View for the leaf grid.
Traits::template Partition
< All_Partition >
::LeafGridView 
leafView () const
 View for the leaf grid for All_Partition.
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const
void communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const
template<class EntitySeed >
Codim< EntitySeed::codimension >
::EntityPointer 
entityPointer (const EntitySeed &seed) const
 obtain EntityPointer from EntitySeed.
Grid Refinement Methods
bool mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e)
 Mark element for refinement.
bool mark (const typename Traits::template Codim< 0 >::Entity &e, typename UG_NS< dim >::RefinementRule rule, int side=0)
 Mark method accepting a UG refinement rule.
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 Query whether element is marked for refinement.
bool preAdapt ()
 returns true, if some elements might be coarsend during grid adaption, here always returns true
bool adapt ()
 Triggers the grid refinement process.
void postAdapt ()
 Clean up refinement markers.
Coarse Grid Creation Methods
void createLGMGrid (const std::string &name)
 When UGGrid has been configured to use the LGM domain manager, this routine sets up a grid from an LGM and an NG file.
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.
int getMark (const typename Codim< 0 >::Entity &e) const
 returns adaptation mark for given entity

Static Public Member Functions

static void setDefaultHeapSize (unsigned size)
 Sets the default heap size.

Protected Member Functions

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

Static Protected Member Functions

static
ReturnImplementationType
< InterfaceType >
::ImplementationType & 
getRealImplementation (InterfaceType &i)
 return real implementation of interface class

Friends

class UGGridGeometry< 0, dim, const UGGrid< dim > >
class UGGridGeometry< dim, dim, const UGGrid< dim > >
class UGGridGeometry< 1, 2, const UGGrid< dim > >
class UGGridGeometry< 2, 3, const UGGrid< dim > >
class UGGridEntity< 0, dim, const UGGrid< dim > >
class UGGridEntity< dim, dim, const UGGrid< dim > >
class UGGridHierarchicIterator< const UGGrid< dim > >
class UGGridLeafIntersection< const UGGrid< dim > >
class UGGridLevelIntersection< const UGGrid< dim > >
class UGGridLeafIntersectionIterator< const UGGrid< dim > >
class UGGridLevelIntersectionIterator< const UGGrid< dim > >
class UGGridLevelIndexSet< const UGGrid< dim > >
class UGGridLeafIndexSet< const UGGrid< dim > >
class UGGridIdSet< const UGGrid< dim >, false >
class UGGridIdSet< const UGGrid< dim >, true >
class GridFactory< UGGrid< dim > >
class UGGridLeafIterator
class UGGridLevelIterator
class UGGridEntityPointer
class UGGrid< 2 >
class UGGrid< 3 >

Detailed Description

template<int dim>
class Dune::UGGrid< dim >

[ provides Dune::Grid ]

Provides the meshes of the finite element toolbox UG. (http://atlas.gcsc.uni-frankfurt.de/~ug/).

This is the implementation of the grid interface using the UG grid management system. UG provides conforming grids in two and three space dimensions. The grids can be mixed, i.e. 2d grids can contain triangles and quadrilaterals and 3d grids can contain tetrahedra and hexahedra and also pyramids and prisms. The grid refinement rules are very flexible. Local adaptive red/green refinement is the default, but a special method in the UGGrid class allows you to directly access a number of anisotropic refinements rules. Last but not least, the UG grid manager is completely parallelized, and you can use boundaries parametrized by either analytical expressions or high-resolution piecewise linear surfaces.

To use this module you need the UG library. See the DUNE installation notes on how to obtain and install it.

In your Dune application, you can now instantiate objects of the type UGGrid<2> or UGGrid<3>. You can have more than one, if you choose. It is even possible to have 2d and 3d grids at the same time, even though the original UG system never intended to support this!

See the documentation for the factory class GridFactory<UGGrid<dimworld> > to learn how to create UGGrid objects.

Please send any questions, suggestions, or bug reports to the Dune mailing list dune@.nosp@m.dune.nosp@m.-proj.nosp@m.ect..nosp@m.org

For installation instructions see http://www.dune-project.org/external_libraries/install_ug.html .

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.

template<int dim>
typedef UG::DOUBLE Dune::UGGrid< dim >::ctype

The type used to store coordinates.

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.

template<int dim>
typedef UGGridFamily<dim,dim> Dune::UGGrid< dim >::GridFamily

type of the used GridFamily for this grid

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.

template<int dim>
typedef UGGridFamily<dim,dim>::Traits Dune::UGGrid< dim >::Traits

Member Enumeration Documentation

template<int dim, int dimworld, class ct, class GridFamily>
anonymous enum
inherited

A constant that exports the template parameter dim.

Enumerator:
dimension 

The dimension of the grid.

template<int dim, int dimworld, class ct, class GridFamily>
anonymous enum
inherited

A constant that exports the template parameter dimworld.

Enumerator:
dimensionworld 

The dimension of the world the grid lives in.

template<int dim>
enum Dune::UGGrid::ClosureType

Decide whether to add a green closure to locally refined grid sections or not.

Enumerator:
GREEN 

Standard red/green refinement.

NONE 

No closure, results in nonconforming meshes.

template<int dim>
enum Dune::UGGrid::RefinementType

The different forms of grid refinement that UG supports.

Enumerator:
LOCAL 

New level consists only of the refined elements and the closure.

COPY 

New level consists of the refined elements and the unrefined ones, too.

Constructor & Destructor Documentation

template<int dim>
Dune::UGGrid< dim >::UGGrid ( )

Default constructor.

Uses the default heapsize, which can be set using the static method setDefaultHeapSize().

template<int dim>
Dune::UGGrid< dim >::~UGGrid ( )

Destructor.

Member Function Documentation

template<int dim>
bool Dune::UGGrid< dim >::adapt ( )

Triggers the grid refinement process.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

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, _ctype, SGridFamily< dim, dimworld, _ctype > >::adapt(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::comm(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::communicate(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::entityPointer(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::getMark(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::ghostSize(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::globalIdSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::globalRefine(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lbegin(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafbegin(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafend(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafIndexSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafView(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::leafView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::lend(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelIndexSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelView(), Dune::GridDefaultImplementation< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::levelView(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::loadBalance(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::localIdSet(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::mark(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::maxLevel(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::numBoundarySegments(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::overlapSize(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::postAdapt(), Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::preAdapt(), and Dune::Grid< dim, dimworld, _ctype, SGridFamily< dim, dimworld, _ctype > >::size().

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

Barton-Nackman trick.

template<int dim>
const CollectiveCommunication<UGGrid>& Dune::UGGrid< dim >::comm ( ) const
inline

the collective communication

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
template<class DataHandle >
void Dune::UGGrid< dim >::communicate ( DataHandle &  dataHandle,
InterfaceType  iftype,
CommunicationDirection  dir,
int  level 
) const
inline

The communication interface for all codims on a given level.

Parameters
dataHandletype used to gather/scatter data in and out of the message buffer
iftypeone of the predifined interface types, throws error if it is not implemented
dirchoose beetween forward and backward communication
levelcommunicate for entities on the given level

Implements a generic communication function sending an object of type P for each entity in the intersection of two processors. P has two methods gather and scatter that implement the protocol. Therefore P is called the "protocol class".

template<int dim>
template<class DataHandle >
void Dune::UGGrid< dim >::communicate ( DataHandle &  dataHandle,
InterfaceType  iftype,
CommunicationDirection  dir 
) const
inline

The communication interface for all codims on the leaf level.

Parameters
dataHandletype used to gather/scatter data in and out of the message buffer
iftypeone of the predifined interface types, throws error if it is not implemented
dirchoose beetween forward and backward communication

Implements a generic communication function sending an object of type P for each entity in the intersection of two processors. P has two methods gather and scatter that implement the protocol. Therefore P is called the "protocol class".

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

dummy communicate, doing nothing

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

dummy communicate, doing nothing

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
void Dune::UGGrid< dim >::createLGMGrid ( const std::string &  name)

When UGGrid has been configured to use the LGM domain manager, this routine sets up a grid from an LGM and an NG file.

template<int dim>
template<int codim>
Traits::template Codim<codim>::EntityPointer Dune::UGGrid< dim >::entityPointer ( const UGGridEntitySeed< codim, const UGGrid< dim > > &  seed) const
inline

Create an EntityPointer from an EntitySeed.

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
template<int dim>
void Dune::UGGrid< dim >::getChildrenOfSubface ( const typename Traits::template Codim< 0 >::EntityPointer e,
int  elementSide,
int  maxl,
std::vector< typename Traits::template Codim< 0 >::EntityPointer > &  childElements,
std::vector< unsigned char > &  childElementSides 
) const

Rudimentary substitute for a hierarchic iterator on faces.

Parameters
e,elementSideGrid face specified by an element and one of its sides
maxlThe finest level that should be traversed by the iterator
[out]childElementsFor each subface: element index, elementSide, and level
[out]childElementSidesIndices for transformation because Dune numbers the faces of several elements differently than UG
template<int dim>
int Dune::UGGrid< dim >::getMark ( const typename Traits::template Codim< 0 >::Entity e) const

Query whether element is marked for refinement.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

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
static ReturnImplementationType<InterfaceType>::ImplementationType& Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim, dim > >::getRealImplementation ( InterfaceType i)
inlinestaticprotectedinherited

return real implementation of interface class

template<int dim>
unsigned int Dune::UGGrid< dim >::ghostSize ( int  codim) const
inline

Size of the ghost cell layer on the leaf level.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
unsigned int Dune::UGGrid< dim >::ghostSize ( int  level,
int  codim 
) const
inline

Size of the ghost cell layer on a given level.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
const Traits::GlobalIdSet& Dune::UGGrid< dim >::globalIdSet ( ) const
inline

Access to the GlobalIdSet.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
void Dune::UGGrid< dim >::globalRefine ( int  n)

Does uniform refinement.

Parameters
nNumber of uniform refinement steps

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
template<int codim>
Traits::template Codim<codim>::LevelIterator Dune::UGGrid< dim >::lbegin ( int  level) const

Iterator to first entity of given codim on level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

Iterator to first entity of given codim on level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::UGGrid< dim >::leafbegin ( ) const
inline

Iterator to first leaf entity of given codim.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

Iterator to first leaf entity of given codim.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
template<int codim>
Traits::template Codim<codim>::LeafIterator Dune::UGGrid< dim >::leafend ( ) const
inline

one past the end of the sequence of leaf entities

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

one past the end of the sequence of leaf entities

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
const Traits::LeafIndexSet& Dune::UGGrid< dim >::leafIndexSet ( ) const
inline

Access to the LeafIndexSet.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::size().

Traits::template Partition<pitype>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim, dim > >::leafView ( ) const
inlineinherited

View for the leaf grid.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::communicate().

Traits::template Partition<All_Partition>::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim, dim > >::leafView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

one past the end on this level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

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

one past the end on this level

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
const Traits::LevelIndexSet& Dune::UGGrid< dim >::levelIndexSet ( int  level) const
inline

Access to the LevelIndexSets.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::size().

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

View for a grid level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::communicate().

Traits::template Partition<All_Partition>::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim, dim > >::levelView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
bool Dune::UGGrid< dim >::loadBalance ( )
inline

Default load balancing.

Bug:
The return value is always 'true'
Returns
true if the grid has changed

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

Referenced by Dune::UGGrid< dimworld >::loadBalance().

template<int dim>
template<class DataHandle >
bool Dune::UGGrid< dim >::loadBalance ( DataHandle &  data)
inline

Re-balances the load each process has to handle for a parallel grid, the DataHandle data works like the data handle for the communicate methods. If grid has changed , true is returned.

Bug:
Not implemented yet!

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
bool Dune::UGGrid< dim >::loadBalance ( int  strategy,
int  minlevel,
int  depth,
int  maxlevel,
int  minelement 
)

Distributes this grid over the available nodes in a distributed machine.

If you want the UG default for the parameters pick

  • strategy = 0
  • minlevel = 1
  • depth = 2
  • maxlevel = 32
  • minelement = 1
Bug:
The return value is always 'true'
Parameters
minlevelThe coarsest grid level that gets distributed
maxleveldoes currently get ignored
template<int dim>
void Dune::UGGrid< dim >::loadState ( const std::string &  filename)

Read entire grid hierarchy from disk.

Test implementation – not working!

template<int dim>
const Traits::LocalIdSet& Dune::UGGrid< dim >::localIdSet ( ) const
inline

Access to the LocalIdSet.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
bool Dune::UGGrid< dim >::mark ( int  refCount,
const typename Traits::template Codim< 0 >::Entity e 
)

Mark element for refinement.

\param refCount <ul>
<li> 1: mark for red refinement </li>
<li> -1: mark for coarsening </li>
<li> 0: delete a possible refinement mark </li>
</ul>
\param e Element to be marked
Returns
  • true, if element was marked
  • false, if nothing changed

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
bool Dune::UGGrid< dim >::mark ( const typename Traits::template Codim< 0 >::Entity e,
typename UG_NS< dim >::RefinementRule  rule,
int  side = 0 
)

Mark method accepting a UG refinement rule.

Parameters
ePointer to the element to be marked for refinement
ruleOne of the UG refinement rules
sideIf rule==UG::D2::BLUE (one quadrilateral is split into two rectangles) you can choose the orientation of the cut by setting side==0 or side==1
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.
template<int dim>
int Dune::UGGrid< dim >::maxLevel ( ) const

Return maximum level defined in this grid. Levels are numbered 0 ... maxlevel with 0 the coarsest level.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::levelIndexSet().

template<int dim>
size_t Dune::UGGrid< dim >::numBoundarySegments ( ) const
inline

Return the number of boundary segments.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
unsigned int Dune::UGGrid< dim >::overlapSize ( int  codim) const
inline

Size of the overlap on the leaf level.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
unsigned int Dune::UGGrid< dim >::overlapSize ( int  level,
int  codim 
) const
inline

Size of the overlap on a given level.

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
void Dune::UGGrid< dim >::postAdapt ( )
template<int dim>
bool Dune::UGGrid< dim >::preAdapt ( )

returns true, if some elements might be coarsend during grid adaption, here always returns true

Reimplemented from Dune::GridDefaultImplementation< dim, dim, double, UGGridFamily< dim, dim > >.

template<int dim>
void Dune::UGGrid< dim >::saveState ( const std::string &  filename) const

Save entire grid hierarchy to disk.

Test implementation – not working!

template<int dim>
void Dune::UGGrid< dim >::setClosureType ( ClosureType  type)
inline

Sets the type of grid refinement closure.

template<int dim>
static void Dune::UGGrid< dim >::setDefaultHeapSize ( unsigned  size)
inlinestatic

Sets the default heap size.

UGGrid keeps an internal heap to allocate memory from, which must be specified on grid creation (at the latest). This sets the default heap size, which is used when no heap size is given to the constructor.

template<int dim>
void Dune::UGGrid< dim >::setPosition ( const typename Traits::template Codim< dim >::EntityPointer e,
const FieldVector< double, dim > &  pos 
)

Sets a vertex to a new position.

Changing a vertex' position changes its position on all grid levels!

template<int dim>
void Dune::UGGrid< dim >::setRefinementType ( RefinementType  type)
inline

Sets the type of grid refinement.

template<int dim>
int Dune::UGGrid< dim >::size ( int  level,
int  codim 
) const

Number of grid entities per level and codim.

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Referenced by Dune::UGGrid< dimworld >::setDefaultHeapSize().

template<int dim>
int Dune::UGGrid< dim >::size ( int  codim) const
inline

number of leaf entities per codim in this process

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
int Dune::UGGrid< dim >::size ( int  level,
GeometryType  type 
) const
inline

number of entities per level and geometry type in this process

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

template<int dim>
int Dune::UGGrid< dim >::size ( GeometryType  type) const
inline

number of leaf entities per geometry type in this process

Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.

Friends And Related Function Documentation

template<int dim>
friend class GridFactory< UGGrid< dim > >
friend
template<int dim>
friend class UGGrid< 2 >
friend
template<int dim>
friend class UGGrid< 3 >
friend
template<int dim>
friend class UGGridEntity< 0, dim, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridEntity< dim, dim, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridEntityPointer
friend
template<int dim>
friend class UGGridGeometry< 0, dim, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridGeometry< 1, 2, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridGeometry< 2, 3, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridGeometry< dim, dim, const UGGrid< dim > >
friend
template<int dim>
friend class UGGridHierarchicIterator< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridIdSet< const UGGrid< dim >, false >
friend
template<int dim>
friend class UGGridIdSet< const UGGrid< dim >, true >
friend
template<int dim>
friend class UGGridLeafIndexSet< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLeafIntersection< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLeafIntersectionIterator< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLeafIterator
friend
template<int dim>
friend class UGGridLevelIndexSet< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLevelIntersection< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLevelIntersectionIterator< const UGGrid< dim > >
friend
template<int dim>
friend class UGGridLevelIterator
friend

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