MeshKernel
|
A class used to refine a Mesh2D instance. More...
#include <MeshRefinement.hpp>
Public Types | |
enum | RefinementType { WaveCourant = 1, RefinementLevels = 2, RidgeDetection = 3 } |
Enumerator describing the different refinement types. | |
Public Member Functions | |
MeshRefinement (Mesh2D &mesh, std::unique_ptr< MeshInterpolation > interpolant, const MeshRefinementParameters &meshRefinementParameters) | |
The constructor for refining based on samples. More... | |
MeshRefinement (Mesh2D &mesh, std::unique_ptr< MeshInterpolation > interpolant, const MeshRefinementParameters &meshRefinementParameters, bool useNodalRefinement) | |
The constructor for refining based on samples. More... | |
MeshRefinement (Mesh2D &mesh, const Polygons &polygon, const MeshRefinementParameters &meshRefinementParameters) | |
The constructor for refining based on polygons. More... | |
std::unique_ptr< UndoAction > | Compute () |
Compute mesh refinement (refinecellsandfaces2). More... | |
A class used to refine a Mesh2D instance.
Mesh refinement operates on Mesh2D and is based on iteratively splitting the edges until the desired level of refinement or the maximum number of iterations is reached. Refinement can be based on samples or based on a polygon. The refinement based on samples uses the averaging interpolation algorithm to compute the level of refinement from the samples to the centers of the edges. At a high level, the mesh refinement is performed as follow:
As with OrthogonalizationAndSmoothing, MeshRefinement modifies an existing Mesh2D instance.
meshkernel::MeshRefinement::MeshRefinement | ( | Mesh2D & | mesh, |
std::unique_ptr< MeshInterpolation > | interpolant, | ||
const MeshRefinementParameters & | meshRefinementParameters | ||
) |
The constructor for refining based on samples.
[in] | mesh | The mesh to be refined |
[in] | interpolant | The averaging interpolation to use |
[in] | meshRefinementParameters | The mesh refinement parameters |
meshkernel::MeshRefinement::MeshRefinement | ( | Mesh2D & | mesh, |
std::unique_ptr< MeshInterpolation > | interpolant, | ||
const MeshRefinementParameters & | meshRefinementParameters, | ||
bool | useNodalRefinement | ||
) |
The constructor for refining based on samples.
[in] | mesh | The mesh to be refined |
[in] | interpolant | The averaging interpolation to use |
[in] | meshRefinementParameters | The mesh refinement parameters |
[in] | useNodalRefinement | Use nodal refinement |
meshkernel::MeshRefinement::MeshRefinement | ( | Mesh2D & | mesh, |
const Polygons & | polygon, | ||
const MeshRefinementParameters & | meshRefinementParameters | ||
) |
The constructor for refining based on polygons.
[in] | mesh | The mesh to be refined |
[in] | polygon | The polygon where to refine |
[in] | meshRefinementParameters | The mesh refinement parameters |
std::unique_ptr<UndoAction> meshkernel::MeshRefinement::Compute | ( | ) |
Compute mesh refinement (refinecellsandfaces2).
Steps: