-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
bugSomething isn't workingSomething isn't workingmeshRelated to meshes and mesh generationRelated to meshes and mesh generation
Description
Consider a mesh like the following

This mesh is formed by a 2D cylinder and the 3D volume of such cylinder. Everything is aligned along the z axis. (The julia code that generates this mesh is below, the mesh is example.msh.txt.)
In this case, the bounding box algorithm cannot identify that the cylinder is correctly aligned along the z axis.
The configuration file
{
"Problem": { "Type": "Driven", "Verbose": 2, "Output": "postpro" },
"Model": { "Mesh": "example.msh", "L0": 1.0 },
"Domains": { "Materials": [ { "Attributes": [1] } ] },
"Boundaries":
{
"LumpedPort":
[
{
"Index": 1,
"R": 50.0,
"Excitation": true,
"Attributes": [2],
"Direction": "+Z"
}
]
},
"Solver": { "Order": 2, "Driven": { "Samples": [ { "Type": "Point", "Freq": [1], "SaveStep": 1 } ] } }
}
returns
--> Warning!
User specified direction [0, 0, 1] does not align with either bounding box axis up to 1.000e-01 degrees!
Axis 1: [0.9422609221188195, 0.33487961217098894, 0] (9.000e+01 degrees)
Axis 2: [0.261679420829537, -0.9339460846003359, 0.24345141563363415] (7.591e+01 degrees)
Axis 3: [-0.08170608976776557, 0.22989890303619817, 0.9697786393180738] (1.412e+01 degrees)!
MFEM abort: Specified direction does not align sufficiently with bounding box axes (9.0000000000000000e+01, 7.5909664337573830e+01, 1.4121944350401407e+01 vs. tolerance 1.0000000000000000e+00)!
... in function: palace::UniformElementData::UniformElementData(const std::array<double, 3> &, const mfem::Array<int> &, const mfem::ParMesh &)
... in file: /Users/gbozzola/repos/palace/palace/fem/lumpedelement.cpp:46
Offline discussions with @hughcars identified that there's classes of shapes that do not play well with the current algorithm implemented in BoundingBoxFromPointCloud
.
Code to generate the mesh
using Gmsh
heigth = 0.01
radius = 0.05
gmsh.initialize()
gmsh.model.add("cylinder")
gmsh.option.setNumber("General.Verbosity", 0)
tags = gmsh.model.occ.addCylinder(0, 0, 0, 0, 0, heigth, radius)
kernel.synchronize()
@show domain = gmsh.model.addPhysicalGroup(3, [tags], -1, "cylinder")
@show group = gmsh.model.addPhysicalGroup(2, [tags], -1, "cylinder")
gmsh.model.mesh.setOrder(3)
gmsh.model.mesh.generate(3)
gmsh.option.setNumber("Mesh.MshFileVersion", 2.2)
gmsh.write(joinpath(@__DIR__, "example.msh"))
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmeshRelated to meshes and mesh generationRelated to meshes and mesh generation