fix(meshGeneration): changed file extension to vtk and 3D
This commit is contained in:
@@ -8,7 +8,7 @@ def generate_spherical_mesh(radius=1, meshSize=0.1):
|
|||||||
# Create a spherical (ball) geometry centered at (0,0,0)
|
# Create a spherical (ball) geometry centered at (0,0,0)
|
||||||
sphere = geo.add_ball([0, 0, 0], radius)
|
sphere = geo.add_ball([0, 0, 0], radius)
|
||||||
# Generate a 2D mesh (i.e. surface mesh) of the sphere
|
# Generate a 2D mesh (i.e. surface mesh) of the sphere
|
||||||
myMesh = geo.generate_mesh(dim=2)
|
myMesh = geo.generate_mesh(dim=3)
|
||||||
return myMesh
|
return myMesh
|
||||||
|
|
||||||
def write_mfem_mesh(meshData, filename):
|
def write_mfem_mesh(meshData, filename):
|
||||||
@@ -21,4 +21,4 @@ if __name__ == '__main__':
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
meshData = generate_spherical_mesh(args.radius, args.meshSize)
|
meshData = generate_spherical_mesh(args.radius, args.meshSize)
|
||||||
write_mfem_mesh(meshData, 'sphere.mesh')
|
write_mfem_mesh(meshData, 'sphere.vtk')
|
||||||
Binary file not shown.
BIN
utils/meshGeneration/sphere.vtk
Normal file
BIN
utils/meshGeneration/sphere.vtk
Normal file
Binary file not shown.
Reference in New Issue
Block a user