Skip to main content
2 of 2
added 101 characters in body
user21
  • 40.7k
  • 8
  • 114
  • 170

Unfortunately, that is not possible directly right now. However, you can do it manually. For that you would regenerate the mesh with ToElementMesh and specify a BoundaryMarkerFunction and a PointMarkerFunction. So, the None needs to be replaced with a function that does what you want. (See the documentation of ToElementMesh in the options section to see how those are written)

m2 = ToElementMesh["Coordinates" -> mesh["Coordinates"], 
  "MeshElements" -> mesh["MeshElements"], 
  "BoundaryMarkerFunction" -> None, "PointMarkerFunction" -> None]

Update: The direct setting of boundary and point markers will possible in version 13.3 (not in 13.2).

user21
  • 40.7k
  • 8
  • 114
  • 170