mymesh.improvement.Improve#

mymesh.improvement.Improve(M, h, schedule='scfS', repeat=2, labels=None, smoother=None, smooth_kwargs={}, verbose=True, FeatureAngle=25)[source]#

Tetrahedral mesh quality improvement using multiple local operations.

Parameters:
  • M (mymesh.mesh) – Tetrahedral mesh to be improved

  • h (float) – Target element size/edge length

  • schedule (str, optional) –

    Order of operations to perform, specified as a string with each character indicating an operation, by default ‘scfS’.

    Possible operations:

  • repeat (int, optional) – Number of times to repeat the schedule, by default 2

  • labels (str, array_like, or NoneType, optional) – Element labels indicating different regions. If specified, region interfaces will be preserved. This can be specified as an array_like with M.NElem entries or a string corresponding to an entry in M.ElemData, by default None.

  • smoother (str, optional) – Specify which smoothing operation to use, by default None. If not specified, SmartLaplacianSmoothing() is used for tetrahedral meshes and TangentialLaplacianSmoothing() is used for triangular meshes.

  • smooth_kwargs (dict, optional) – Key word arguments to be passed to the smoother, by default {}

  • verbose (bool, optional) – If True, will display progress, by default True

  • FeatureAngle (int, optional) – FeatureAngle : int, optional Angle (in degrees) used to identify features, by default 25. See DetectFeatures() for more information., by default 25

Returns:

Mnew – Tetrahedral mesh after quality improvement

Return type:

mymesh.mesh