Skip to main content
added 101 characters in body
Source Link
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).

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]

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).

Source Link
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]