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

Front-end for the grid manager of the finite element toolbox UG3. More...

#include <dune/grid/uggrid.hh>

Inheritance diagram for Dune::UGGrid< dim >:
Inheritance graph

Public Types

typedef UGGridFamily< dim > GridFamily
 type of the used GridFamily for this grid More...
 
typedef UGGridFamily< dim >::Traits Traits
 
typedef UG::DOUBLE ctype
 The type used to store coordinates. More...
 
typedef unsigned int Rank
 The type used for process ranks. More...
 

Public Member Functions

 UGGrid (UGCommunication comm={})
 Default constructor. More...
 
 ~UGGrid () noexcept(false)
 Destructor. More...
 
int maxLevel () const
 
template<typename Seed >
Traits::template Codim< Seed::codimension >::Entity entity (const Seed &seed) const
 Create an Entity from an EntitySeed. 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 boundary segments. More...
 
const Traits::GlobalIdSetglobalIdSet () const
 Access to the GlobalIdSet. More...
 
const Traits::LocalIdSetlocalIdSet () const
 Access to the LocalIdSet. More...
 
const Traits::LevelIndexSetlevelIndexSet (int level) const
 Access to the LevelIndexSets. More...
 
const Traits::LeafIndexSetleafIndexSet () const
 Access to the LeafIndexSet. More...
 
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...
 
bool loadBalance ()
 default implementation of load balance does nothing and returns false 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 Attributes

Exported constants
static constexpr int dimension
 The dimension of the grid. More...
 
static constexpr int dimensionworld
 The dimension of the world the grid lives in. More...
 

Grid Refinement Methods

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...
 
bool mark (int refCount, const typename Traits::template Codim< 0 >::Entity &e)
 Mark element for refinement. More...
 
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. More...
 
int getMark (const typename Traits::template Codim< 0 >::Entity &e) const
 Query whether element is marked for refinement. More...
 
bool preAdapt ()
 returns true, if some elements might be coarsend during grid adaption, here always returns true More...
 
bool adapt ()
 Triggers the grid refinement process. More...
 
void postAdapt ()
 Clean up refinement markers. More...
 
template<class DataHandle >
bool loadBalance (DataHandle &dataHandle)
 Distributes the grid and some data over the available nodes in a distributed machine. More...
 
bool loadBalance (int minlevel=0)
 Distributes this grid over the available nodes in a distributed machine. More...
 
bool loadBalance (const std::vector< Rank > &targetProcessors, unsigned int fromLevel)
 Distribute this grid over a distributed machine. More...
 
template<class DataHandle >
bool loadBalance (const std::vector< Rank > &targetProcessors, unsigned int fromLevel, DataHandle &dataHandle)
 Distributes the grid over the processes of a parallel machine, and sends data along with it. More...
 
const UGCommunicationcomm () const
 
void getChildrenOfSubface (const typename Traits::template Codim< 0 >::Entity &e, int elementSide, int maxl, std::vector< typename Traits::template Codim< 0 >::Entity > &childElements, std::vector< unsigned char > &childElementSides) const
 Rudimentary substitute for a hierarchic iterator on faces. More...
 
void setRefinementType (RefinementType type)
 Sets the type of grid refinement. More...
 
void setClosureType (ClosureType type)
 Sets the type of grid refinement closure. More...
 
void setPosition (const typename Traits::template Codim< dim >::Entity &e, const FieldVector< double, dim > &pos)
 Sets a vertex to a new position. More...
 
void globalRefine (int n)
 Does uniform refinement. More...
 
void saveState (const std::string &filename) const
 Save entire grid hierarchy to disk. More...
 
void loadState (const std::string &filename)
 Read entire grid hierarchy from disk. More...
 

Exported types

typedef GridFamily::Traits::LeafGridView LeafGridView
 type of view for leaf grid More...
 
typedef GridFamily::Traits::LevelGridView LevelGridView
 type of view for level grid More...
 
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...
 
using Communication = detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, typename GridFamily::Traits >
 A type that is a model of Dune::Communication. It provides a portable way for communication on the set of processes used by the grid. More...
 
using CollectiveCommunication = Communication
 
using Communication_t = typename T::Communication
 
using DeprecatedCollectiveCommunication_t = typename T::CollectiveCommunication
 

Parallel data distribution and communication

Codim< EntitySeed::codimension >::Entity entity (const EntitySeed &seed) const
 obtain Entity from EntitySeed. More...
 
GridImp & asImp ()
 Barton-Nackman trick. More...
 
const GridImp & asImp () const
 Barton-Nackman trick. More...
 

Detailed Description

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

Front-end for the grid manager of the finite element toolbox UG3.

This is the implementation of the grid interface using the UG3 grid management system. It is best described in this paper. To our knowledge, the original code is not available anymore, but the relevant parts have been forked into the Dune module dune-uggrid, available from .

UGGrid 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.

In your Dune application, you can 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.

Member Typedef Documentation

◆ CollectiveCommunication

using Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::CollectiveCommunication = Communication
inherited
Deprecated:
Use Communication instead! Will be removed at some point in the future.

◆ Communication

using Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::Communication = detected_or_fallback_t< DeprecatedCollectiveCommunication_t, Communication_t, typename GridFamily::Traits>
inherited

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

◆ Communication_t

using Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::Communication_t = typename T::Communication
protectedinherited

◆ ctype

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

The type used to store coordinates.

◆ DeprecatedCollectiveCommunication_t

using Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::DeprecatedCollectiveCommunication_t = typename T::CollectiveCommunication
protectedinherited

◆ GlobalIdSet

typedef GridFamily::Traits::GlobalIdSet Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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

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

type of the used GridFamily for this grid

◆ HierarchicIterator

typedef GridFamily::Traits::HierarchicIterator Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LeafGridView

typedef GridFamily::Traits::LeafGridView Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::LeafGridView
inherited

type of view for leaf grid

◆ LeafIndexSet

typedef GridFamily::Traits::LeafIndexSet Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LeafIntersection

typedef GridFamily::Traits::LeafIntersection Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LeafIntersectionIterator

typedef GridFamily::Traits::LeafIntersectionIterator Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LevelGridView

typedef GridFamily::Traits::LevelGridView Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::LevelGridView
inherited

type of view for level grid

◆ LevelIndexSet

typedef GridFamily::Traits::LevelIndexSet Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LevelIntersection

typedef GridFamily::Traits::LevelIntersection Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LevelIntersectionIterator

typedef GridFamily::Traits::LevelIntersectionIterator Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ LocalIdSet

typedef GridFamily::Traits::LocalIdSet Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ Rank

template<int dim>
typedef unsigned int Dune::UGGrid< dim >::Rank

The type used for process ranks.

◆ Traits

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

Member Enumeration Documentation

◆ ClosureType

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.

◆ RefinementType

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

◆ UGGrid()

template<int dim>
Dune::UGGrid< dim >::UGGrid ( UGCommunication  comm = {})

Default constructor.

◆ ~UGGrid()

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

Destructor.

Member Function Documentation

◆ adapt()

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

Triggers the grid refinement process.

◆ asImp() [1/2]

GridImp & Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::asImp ( )
inlineprotectedinherited

Barton-Nackman trick.

◆ asImp() [2/2]

const GridImp & Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::asImp ( ) const
inlineprotectedinherited

Barton-Nackman trick.

◆ comm()

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

the communication

◆ entity() [1/2]

Codim< EntitySeed::codimension >::Entity Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::entity ( const EntitySeed seed) const
inlineinherited

obtain Entity from EntitySeed.

◆ entity() [2/2]

template<int dim>
template<typename Seed >
Traits::template Codim< Seed::codimension >::Entity Dune::UGGrid< dim >::entity ( const Seed &  seed) const
inline

Create an Entity from an EntitySeed.

◆ getChildrenOfSubface()

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

◆ getMark() [1/2]

int Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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

◆ getMark() [2/2]

template<int dim>
int Dune::UGGrid< dim >::getMark ( const typename Traits::template Codim< 0 >::Entity &  e) const

Query whether element is marked for refinement.

◆ globalIdSet()

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

Access to the GlobalIdSet.

◆ globalRefine()

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

Does uniform refinement.

Parameters
nNumber of uniform refinement steps

◆ leafGridView()

Traits::LeafGridView Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim > >::leafGridView ( ) const
inlineinherited

View for the leaf grid for All_Partition.

◆ leafIndexSet()

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

Access to the LeafIndexSet.

◆ levelGridView()

Traits::LevelGridView Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim > >::levelGridView ( int  level) const
inlineinherited

View for a grid level for All_Partition.

◆ levelIndexSet()

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

Access to the LevelIndexSets.

◆ loadBalance() [1/5]

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

default implementation of load balance does nothing and returns false

◆ loadBalance() [2/5]

template<int dim>
bool Dune::UGGrid< dim >::loadBalance ( const std::vector< Rank > &  targetProcessors,
unsigned int  fromLevel 
)

Distribute this grid over a distributed machine.

Parameters
[in]targetProcessorsFor each leaf element the rank of the process the element shall be sent to
[in]fromLevelThe lowest level that gets redistributed (set to 0 when in doubt)

This method allows to (re-)distribute the grid controlled by an external grid repartitioning library. You need to get that library to assign a target rank to each interior element in the leaf grid. With this information in a std::vector, call this method, and UG will do the actual repartitioning. Each leaf element will be sent to the assigned target rank. For all other elements we look at where there children are being sent to. The parent is then sent to where most of its children are (Familienzusammenfuehrung).

The size of the input array targetProcessors is expected to be equal to the number of elements in the 'all'-partition, i.e., the number Interior elements plus the number of Ghost elements. To get the array entry corresponding to an Interior element, a MultipleCodimMultipleGeomTypeMapper with layout class MCMGElementLayout is used. Array entries corresponding to Ghost elements are ignored.

In some cases you may also want to leave the lowest levels on one process, to have them all together for multigrid coarse grid corrections. In that case, use the fromLevel parameter with a value other than zero, to redistribute only elements above a certain level.

The fromLevel argument is also needed to allow the compiler to distinguish this method from the loadBalance method with a single template DataHandle argument.

Note
In theory you can assign a target rank to any element on any level, and UG will magically transfer the element to that rank and make everything come out right. This is not supported by the UGGrid interface, because I didn't see a use case for it. If you do need it please ask on the Dune mailing list.
Returns
true

◆ loadBalance() [3/5]

template<int dim>
template<class DataHandle >
bool Dune::UGGrid< dim >::loadBalance ( const std::vector< Rank > &  targetProcessors,
unsigned int  fromLevel,
DataHandle &  dataHandle 
)
inline

Distributes the grid over the processes of a parallel machine, and sends data along with it.

Parameters
[in]targetProcessorsFor each leaf element the rank of the process the element shall be sent to
[in]fromLevelThe lowest level that gets redistributed (set to 0 when in doubt)
[in,out]dataHandleA data handle object that does the gathering and scattering of data
Template Parameters
DataHandleworks like the data handle for the communicate methods.
Returns
true

◆ loadBalance() [4/5]

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

Distributes the grid and some data over the available nodes in a distributed machine.

Template Parameters
DataHandleworks like the data handle for the communicate methods.
Returns
True, if grid has changed, false otherwise

◆ loadBalance() [5/5]

template<int dim>
bool Dune::UGGrid< dim >::loadBalance ( int  minlevel = 0)

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

Bug:
The return value is always 'true'
Parameters
minlevelThe coarsest grid level that gets distributed

◆ loadState()

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

Read entire grid hierarchy from disk.

Test implementation – not working!

◆ localIdSet()

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

Access to the LocalIdSet.

◆ mark() [1/4]

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
eelement 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

The available values for RefinementRule are: (see the RefinementRule enum in ug/gm/gm.h)

2D

  • NO_REFINEMENT
  • COPY
  • RED
  • BLUE
  • COARSE
  • BISECTION_1
  • BISECTION_2_Q
  • BISECTION_2_T1
  • BISECTION_2_T2
  • BISECTION_3

3D

  • NO_REFINEMENT
  • COPY
  • RED
  • COARSE
  • TETRA_RED_HEX
  • PRISM_BISECT_1_2
  • PRISM_QUADSECT
  • PRISM_BISECT_HEX0
  • PRISM_BISECT_HEX1
  • PRISM_BISECT_HEX2
  • PRISM_ROTATE_LEFT
  • PRISM_ROTATE_RGHT
  • PRISM_QUADSECT_HEXPRI0
  • PRISM_RED_HEX
  • PRISM_BISECT_0_1
  • PRISM_BISECT_0_2
  • PRISM_BISECT_0_3
  • HEX_BISECT_0_1
  • HEX_BISECT_0_2
  • HEX_BISECT_0_3
  • HEX_TRISECT_0
  • HEX_TRISECT_5
  • HEX_QUADSECT_0
  • HEX_QUADSECT_1
  • HEX_QUADSECT_2
  • HEX_BISECT_HEXPRI0
  • HEX_BISECT_HEXPRI1

◆ mark() [2/4]

bool Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::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.

◆ mark() [3/4]

bool Dune::GridDefaultImplementation< dim, dimworld, double , UGGridFamily< dim > >::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 ).
    bool mark(int refCount, const typename Traits::template Codim< 0 >::Entity &e)
    Mark element for refinement.
    This template method will vanish due to the inheritance rules.

◆ mark() [4/4]

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

Mark element for refinement.

Parameters
refCount
  • 1: mark for red refinement
  • -1: mark for coarsening
  • 0: delete a possible refinement mark
eElement to be marked
Returns
  • true, if element was marked
  • false, if nothing changed

◆ maxLevel()

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.

◆ numBoundarySegments()

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

Return the number of boundary segments.

◆ postAdapt()

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

Clean up refinement markers.

◆ preAdapt()

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

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

◆ saveState()

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

Save entire grid hierarchy to disk.

Test implementation – not working!

◆ setClosureType()

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

Sets the type of grid refinement closure.

◆ setPosition()

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

Sets a vertex to a new position.

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

◆ setRefinementType()

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

Sets the type of grid refinement.

◆ size() [1/4]

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

number of leaf entities per geometry type in this process

◆ size() [2/4]

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

number of leaf entities per codim in this process

◆ size() [3/4]

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

◆ size() [4/4]

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

Number of grid entities per level and codim.

Member Data Documentation

◆ dimension

constexpr int Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::dimension
staticconstexprinherited

The dimension of the grid.

◆ dimensionworld

constexpr int Dune::Grid< dim, dimworld, double , UGGridFamily< dim > >::dimensionworld
staticconstexprinherited

The dimension of the world the grid lives in.


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