moose icon indicating copy to clipboard operation
moose copied to clipboard

Add a mesh generator that can generate a 1D mesh near a boundary

Open GiudGiud opened this issue 5 months ago • 5 comments

Motivation

in a project we have a 2D cylinder going around the geometry, we would like to be able to extract a 1D mesh following this 2D cylinder, which is present in the geometry as a 2D sideset

Design

Add a mesh generator that generates such a 1D mesh following a 1D mesh OR Add a Positions object and some output to put it into a PolyMeshMG

Either way we need to decide how to get the points. It is not a well-posed problem (in that we have more than one way to say this line is the closest to a boundary), thus there are a number of heuristics we could try to make the process easier to tune

Alternatively we could fill the 2D void and take the centroid of the fill mesh. This would work fine too. We don't need 100 solutions either.

Alternatively we could look at the distance to a sideset instead of a nodeset. This is more complicated, we'd need to look at the distance to the sides.

The nice thing with nodeset + centroid is that the centroid is known to minimize the distance to a the nodes in the l2 norm

Impact

Enables easy generation of that 1D mesh

GiudGiud avatar Nov 05 '25 01:11 GiudGiud

so you don't just want LowerDBlockFromSidesetGenerator nor BoundaryInfo::sync?

lindsayad avatar Nov 24 '25 22:11 lindsayad

no the 1D mesh does not exist, we have to look at how the surface looks and create it

GiudGiud avatar Nov 24 '25 22:11 GiudGiud

I believe the lower-D mesh doesn't exist. They generally don't exist before LowerDBlockFromSidesetGenerator or BoundaryInfo::sync are executed either

lindsayad avatar Nov 24 '25 22:11 lindsayad

I'm just asking why it's not good enough to just generate the lower-dimensional manifold directly from the surface

lindsayad avatar Nov 24 '25 22:11 lindsayad

I believe the lower-D mesh doesn't exist.

yes agree in a way. This is different, the 1D mesh is created from the 3D surface made of 2D element faces by computing averages of off it

GiudGiud avatar Nov 24 '25 22:11 GiudGiud

Closing as addressed by #31852

GiudGiud avatar Dec 20 '25 17:12 GiudGiud