Skip to content

Commit

Permalink
Fixes to API for dolfin mesh generation in pysolwave.
Browse files Browse the repository at this point in the history
  • Loading branch information
cianwilson committed May 7, 2024
1 parent 4072e7b commit 10ff5b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tutorials/porositywaves/python/pysolwave/tfsolitarywave.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ def __init__(self, tfml_file,system_name='magma',p_name='Pressure',f_name='Poros
x1 = libspud.get_option("/geometry/mesh::Mesh/source::Rectangle/upper_right")
number_cells = libspud.get_option("/geometry/mesh::Mesh/source::Rectangle/number_cells")
diagonal = libspud.get_option("/geometry/mesh[0]/source[0]/diagonal")
mesh = df.RectangleMesh(x0[0],x0[1],x1[0],x1[1],number_cells[0],number_cells[1],diagonal)
mesh = df.RectangleMesh(df.Point(x0[0],x0[1]),df.Point(x1[0],x1[1]),number_cells[0],number_cells[1],diagonal)
elif meshtype == 'UnitCube':
number_cells = libspud.get_option("/geometry/mesh[0]/source[0]/number_cells")
mesh = df.UnitCubeMesh(number_cells[0],number_cells[1],number_cells[2])
elif meshtype == 'Box':
x0 = libspud.get_option("/geometry/mesh::Mesh/source::Box/lower_back_left")
x1 = libspud.get_option("/geometry/mesh::Mesh/source::Box/upper_front_right")
number_cells = libspud.get_option("/geometry/mesh::Mesh/source::Box/number_cells")
mesh = df.BoxMesh(x0[0],x0[1],x0[2],x1[0],x1[1],x1[2],number_cells[0],number_cells[1],number_cells[2])
mesh = df.BoxMesh(df.Point(x0[0],x0[1],x0[2]),df.Point(x1[0],x1[1],x1[2]),number_cells[0],number_cells[1],number_cells[2])
elif meshtype == 'UnitInterval':
number_cells = libspud.get_option("/geometry/mesh::Mesh/source::UnitInterval/number_cells")
mesh = df.UnitIntervalMesh(number_cells)
Expand Down

0 comments on commit 10ff5b2

Please sign in to comment.