MeshKernel
Public Member Functions | List of all members
meshkernel::OrthogonalizationAndSmoothing Class Reference

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.
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ OrthogonalizationAndSmoothing()

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

Parameters
[in]meshThe mesh to orthogonalize
[in]smootherThe mesh to smoother
[in]orthogonalizerThe mesh to orthogonalizer
[in]polygonThe polygon where orthogonalization should occur
[in]landBoundariesThe land boundaries
[in]projectToLandBoundaryOptionSnap to land boundaries (1) or not (0)
[in]orthogonalizationParametersThe orthogonalization parameters

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