Commit ade37550 authored by Lukas Riedel's avatar Lukas Riedel 📝

Remove folder dune/dorie/grid-test

parent 9c71a006
......@@ -2,7 +2,6 @@ add_subdirectory(interface)
add_subdirectory(solver)
add_subdirectory(impl)
add_subdirectory(test)
add_subdirectory(grid-test)
add_executable("dorie" dorie.cc)
dune_target_link_libraries(dorie dorie-impl ${DUNE_LIBS})
......
# add_executable(grid-test grid-test.cc)
# dune_target_link_libraries(grid-test ${DUNE_LIBS})
\ No newline at end of file
import h5py
import numpy as np
# create the array
arr = np.identity(10, dtype=np.int_)
f = h5py.File('cell_ids.h5', 'w')
f.create_dataset("cell_ids", data=arr)
f.close()
\ No newline at end of file
import pygmsh
import numpy as np
msh = 0.1 # define mesh size
geo = pygmsh.built_in.Geometry()
# -- Geometry
# set points
p1 = geo.add_point([0.0, 0.0, 0.0], msh)
p2 = geo.add_point([2.0, 0.0, 0.0], msh)
p3 = geo.add_point([2.0, 1.5, 0.0], msh)
p4 = geo.add_point([2.0, 2.0, 0.0], msh)
p5 = geo.add_point([0.0, 2.0, 0.0], msh)
p6 = geo.add_point([0.0, 1.0, 0.0], msh)
# connect lines
l1 = geo.add_line(p1, p2)
l2 = geo.add_line(p2, p3)
l3 = geo.add_line(p3, p4)
l4 = geo.add_line(p4, p5)
l5 = geo.add_line(p5, p6)
l6 = geo.add_line(p6, p1)
l7 = geo.add_line(p3, p6)
# define line loops
ll1 = geo.add_line_loop((l1, l2, l7, l6))
ll2 = geo.add_line_loop((l3, l4, l5, -l7))
# define surfaces
s1 = geo.add_plane_surface(ll1)
s2 = geo.add_plane_surface(ll2)
# -- Physical
# lines
pl1 = geo.add_physical_line((l1), label=1)
pl2 = geo.add_physical_line([l2, l3], label=2)
pl3 = geo.add_physical_line((l4), label=3)
pl4 = geo.add_physical_line([l5, l6], label=4)
# surfaces
ps1 = geo.add_physical_surface((s1), label=5)
ps2 = geo.add_physical_surface((s2), label=6)
with open("file.geo", "w") as f:
f.write(geo.get_code())
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment