MeshKernel
|
Orthogonalizion (optimize the aspect ratios) and mesh smoothing (optimize internal face angles or area). More...
#include <OrthogonalizationAndSmoothing.hpp>
Public Member Functions | |
OrthogonalizationAndSmoothing (Mesh2D &mesh, std::unique_ptr< Smoother > smoother, std::unique_ptr< Orthogonalizer > orthogonalizer, std::unique_ptr< Polygons > polygon, std::unique_ptr< LandBoundaries > landBoundaries, LandBoundaries::ProjectToLandBoundaryOption projectToLandBoundaryOption, const OrthogonalizationParameters &orthogonalizationParameters) | |
std::unique_ptr< UndoAction > | Initialize () |
Initializes the object. | |
void | Compute () |
Executes the entire algorithm. | |
void | PrepareOuterIteration () |
Prepares the outer iteration, calculates orthogonalizer and smoother coefficients and assable the linear system. | |
void | Solve () |
Performs an inner iteration, update the mesh node positions. | |
void | FinalizeOuterIteration () |
Finalize the outer iteration, computes new mu and face areas, masscenters, circumcenters. | |
Orthogonalizion (optimize the aspect ratios) and mesh smoothing (optimize internal face angles or area).
This class implements the mesh orthogonalization and smoothing algorithm as described in D-Flow FM technical manual (consult this manual for the mathematical details on the equations). The algorithm operates on mesh2d and is composed of two differential equations: the first equation maximizes orthogonalization between edges and flow edges and the second equation reduces the differences of the internal mesh angles (mesh smoothness). For this reason, the OrthogonalizationAndSmoothing class is composed of a smoother and an orthogonalizer, where the nodal contributions are computed by separate classes. Essentially, the algorithm executes the following steps:
LandBoundaries::FindNearestMeshBoundary
).OrthogonalizationAndSmoothing::SnapMeshToOriginalMeshBoundary
). In case a projection to land boundary is requested, the mesh nodes are projected to the land boundaries. An OpenMP parallelization is used in OrthogonalizationAndSmoothing::Solve
because the update of the nodal coordinates is made iteration-independent. meshkernel::OrthogonalizationAndSmoothing::OrthogonalizationAndSmoothing | ( | Mesh2D & | mesh, |
std::unique_ptr< Smoother > | smoother, | ||
std::unique_ptr< Orthogonalizer > | orthogonalizer, | ||
std::unique_ptr< Polygons > | polygon, | ||
std::unique_ptr< LandBoundaries > | landBoundaries, | ||
LandBoundaries::ProjectToLandBoundaryOption | projectToLandBoundaryOption, | ||
const OrthogonalizationParameters & | orthogonalizationParameters | ||
) |
Set the parameters
[in] | mesh | The mesh to orthogonalize |
[in] | smoother | The mesh to smoother |
[in] | orthogonalizer | The mesh to orthogonalizer |
[in] | polygon | The polygon where orthogonalization should occur |
[in] | landBoundaries | The land boundaries |
[in] | projectToLandBoundaryOption | Snap to land boundaries (1) or not (0) |
[in] | orthogonalizationParameters | The orthogonalization parameters |