![]() |
KASKADE 7 development version
|
A grid manager for asymptotically \( G^1 \)-continuous domains. More...
#include <deforminggridmanager.hh>
Public Types | |
| using | Grid |
| the type of managed grid | |
| typedef GridManagerBase< Grid > | Self |
Public Member Functions | |
| DeformingGridManager (std::unique_ptr< Grid > &&grid, ctype featureCurveAngle=1.0, ctype featureEdgeAngle=0.5, bool verbose=false, bool enforceConcurrentReads=false) | |
| Constructor. | |
| DeformingGridManager (std::unique_ptr< Grid > &&grid, GeometricFeatureDetector< Index, ctype, dim > const &featureDetector, bool verbose=false, bool enforceConcurrentReads=false) | |
| virtual void | update () |
| Must be overloaded by derived classes to adjust internal state immediately after mesh refinement. | |
| virtual void | refineGrid (int refCount) |
| virtual bool | adaptGrid () |
| template<class Scalar> | |
| void | correctingDisplacement (FunctionSpaceElement< H1Space< DeformedGrid, Scalar >, dim > &correction) |
| correctingDisplacement provides a displacement function which displaces the points on the boundary of the grid on to the actual domain boundary. | |
| Self & | enforceConcurrentReads (bool enforceConcurrentReads) |
| Tells the grid manager that concurrent reads of the grid are safe. | |
| Self & | setVerbosity (const bool verbosity) |
| sets the verbosity level of the grid manager | |
| bool | gridIsThreadSafe () const |
| Returns true if concurrent read accesses to the grid do not lead to data races. | |
| CellRanges< typename Grid::LeafGridView > const & | cellRanges (typename Grid::LeafGridView const &) const |
| Returns a CellRanges object for the given grid view. The cell ranges are created on demand, with a maximum number of ranges twice the number of cores as reported by the NumaThreadPool. The reference is valid up to the next mesh modification. This method is thread-safe. | |
| EntityNumbering< typename Grid::LeafGridView > const & | entityNumbering (typename Grid::LeafGridView const &) const |
| Returns an EntityNumbering object for the given grid view. | |
Access to the managed grid. | |
| Grid const & | grid () const |
| Returns a const reference on the owned grid. | |
| std::shared_ptr< Grid const > | gridShared () const |
| Provides a read-only shared pointer to the underlying grid. | |
Grid adaptation | |
| bool | mark (int refCount, typename Grid::template Codim< 0 >::Entity const &cell) |
| Marks the given cell for refinement or coarsening. | |
| size_t | countMarked () const |
| Reports the number of marked elements. | |
| bool | preAdapt () |
| Calls grid.preAdapt(). | |
| void | postAdapt () |
| Calls grid.postAdapt(). | |
| bool | adaptAtOnce () |
| Performs grid refinement. | |
| void | flushMarks () |
| Remove all cell marks from the grid. | |
| bool | adapt () |
| Refines each marked leaf cell of the grid and prolongates registered FE functions to the new leaf grid view. | |
| void | globalRefine (int refCount) |
| Refines each leaf cell of the grid and prolongates registered FE functions to the new leaf grid view. | |
Public Attributes | |
| GridSignals | signals |
Protected Member Functions | |
| void | beforeRefinement () |
| void | afterRefinement () |
Protected Attributes | |
| std::shared_ptr< Grid > | gridptr |
| The grid itself. | |
| bool | verbose |
A grid manager for asymptotically \( G^1 \)-continuous domains.
On construction, a deformation of the grid domain is computed, such that the deformed domain has a \( G^1 \)-continuous boundary. On mesh refinement, the new vertices are moved such that the smooth boundary is interpolated.
Definition at line 117 of file deforminggridmanager.hh.
|
inherited |
the type of managed grid
Definition at line 275 of file gridmanager.hh.
|
inherited |
Definition at line 277 of file gridmanager.hh.
|
inline |
Constructor.
See BoundaryTangents for a detailed description of feature edge definition.
| featureCurveAngle | the angle (in radians) between two feature edges that determines whether they form a differentiable feature curve. Defaults to roughly 57°. |
| featureEdgeAngle | the angle (in radians) between adjacent facets' normals that determines whether they share a feature edge or a normal ( \( G^1 \) continuous) edge. Defaults to roughly 29°. |
Definition at line 141 of file deforminggridmanager.hh.
|
inline |
Definition at line 150 of file deforminggridmanager.hh.
|
inlineinherited |
Refines each marked leaf cell of the grid and prolongates registered FE functions to the new leaf grid view.
Definition at line 419 of file gridmanager.hh.
|
inlineinherited |
Performs grid refinement.
In contrast to adapt(), this method implicitly calls preAdapt() and postAdapt().
Definition at line 394 of file gridmanager.hh.
|
inlinevirtual |
Implements Kaskade::GridManagerBase< Dune::GeometryGrid< Grid, DeformingGridManagerDetail::Deformation< Grid > > >.
Definition at line 166 of file deforminggridmanager.hh.
|
inlineprotectedinherited |
Definition at line 605 of file gridmanager.hh.
|
inlineprotectedinherited |
Definition at line 593 of file gridmanager.hh.
|
inlineinherited |
Returns a CellRanges object for the given grid view. The cell ranges are created on demand, with a maximum number of ranges twice the number of cores as reported by the NumaThreadPool. The reference is valid up to the next mesh modification. This method is thread-safe.
Definition at line 541 of file gridmanager.hh.
|
inline |
correctingDisplacement provides a displacement function which displaces the points on the boundary of the grid on to the actual domain boundary.
This function is zero on all grid vertices, so it is only useful if requested for FE order greater than one. We leave it undefined what values the provided correction has in the interior of the grid.
| correction | FE function of any order >1, will be the computed boundary correction on exit. |
Definition at line 181 of file deforminggridmanager.hh.
|
inlineinherited |
Reports the number of marked elements.
Definition at line 364 of file gridmanager.hh.
|
inlineinherited |
Tells the grid manager that concurrent reads of the grid are safe.
Definition at line 492 of file gridmanager.hh.
Referenced by Kaskade::DeformingGridManager< Grid >::DeformingGridManager(), and Kaskade::DeformingGridManager< Grid >::DeformingGridManager().
|
inlineinherited |
Returns an EntityNumbering object for the given grid view.
Definition at line 573 of file gridmanager.hh.
|
inlineinherited |
Remove all cell marks from the grid.
Definition at line 407 of file gridmanager.hh.
|
inlineinherited |
Refines each leaf cell of the grid and prolongates registered FE functions to the new leaf grid view.
Definition at line 457 of file gridmanager.hh.
|
inlineinherited |
Returns a const reference on the owned grid.
Definition at line 301 of file gridmanager.hh.
Referenced by Kaskade::DeformingGridManager< Grid >::DeformingGridManager(), and Kaskade::DeformingGridManager< Grid >::DeformingGridManager().
|
inlineinherited |
Returns true if concurrent read accesses to the grid do not lead to data races.
This is either the case if the grid implementation itself reports that it's thread-safe, or if the user has explicitly stated that concurrent reads are safe (using enforceConcurrentReads) - even if they actually are not.
The thread-safety reported by this method is used e.g. by the assembler to decide how many threads to use during assembly.
If the grid access may not be thread-safe, consider using GridLocking.
Definition at line 524 of file gridmanager.hh.
|
inlineinherited |
Provides a read-only shared pointer to the underlying grid.
Note that only an immutable grid is provided, such that the responsibility for grid modifications remains with the GridManager object. This is necessary for the GridManager to trigger prolongation/interpolation on grid modification.
This can be useful for retaining the grid even after the GridManager is destructed.
Definition at line 315 of file gridmanager.hh.
|
inlineinherited |
Marks the given cell for refinement or coarsening.
| refCount | if positive, marks for (multiple) refinement; if negative, for (multiple) coarsening. Not every grid implementation accepts multiple refinement/coarsening. |
| cell | the affected cell |
Definition at line 335 of file gridmanager.hh.
|
inlineinherited |
Calls grid.postAdapt().
Definition at line 379 of file gridmanager.hh.
|
inlineinherited |
Calls grid.preAdapt().
Definition at line 370 of file gridmanager.hh.
|
inlinevirtual |
Implements Kaskade::GridManagerBase< Dune::GeometryGrid< Grid, DeformingGridManagerDetail::Deformation< Grid > > >.
Definition at line 161 of file deforminggridmanager.hh.
|
inlineinherited |
sets the verbosity level of the grid manager
The grid manager prints status and progress information to std::cout. The amount of information depends on the verbosity:
Definition at line 507 of file gridmanager.hh.
|
inlinevirtual |
Must be overloaded by derived classes to adjust internal state immediately after mesh refinement.
Implements Kaskade::GridManagerBase< Dune::GeometryGrid< Grid, DeformingGridManagerDetail::Deformation< Grid > > >.
Definition at line 158 of file deforminggridmanager.hh.
|
protectedinherited |
The grid itself.
Definition at line 618 of file gridmanager.hh.
Referenced by Kaskade::DeformingGridManager< Grid >::adaptGrid(), Kaskade::DeformingGridManager< Grid >::correctingDisplacement(), Kaskade::DeformingGridManager< Grid >::DeformingGridManager(), and Kaskade::DeformingGridManager< Grid >::refineGrid().
|
inherited |
Definition at line 621 of file gridmanager.hh.
|
protectedinherited |
Definition at line 636 of file gridmanager.hh.
Referenced by Kaskade::DeformingGridManager< Grid >::DeformingGridManager(), and Kaskade::DeformingGridManager< Grid >::DeformingGridManager().