Skip to content

Commit

Permalink
benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed May 27, 2024
1 parent f5ceb54 commit 56da231
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ def _elevate_degree(mesh, degree, label):
r_ = np.sqrt((f.dat.data_with_halos[bc.nodes, 0] - Cx) ** 2 + ((f.dat.data_with_halos[bc.nodes, 1] - Cy) ** 2))
f.dat.data_with_halos[bc.nodes, 0] = (f.dat.data_with_halos[bc.nodes, 0] - Cx) * (r / r_) + Cy
f.dat.data_with_halos[bc.nodes, 1] = (f.dat.data_with_halos[bc.nodes, 1] - Cy) * (r / r_) + Cy
mesh = Mesh(f)
return mesh
return Mesh(f)


T = 20 # 10.0 # 12.0
Expand All @@ -178,7 +177,7 @@ def _elevate_degree(mesh, degree, label):
ntimesteps = int(T / dt_float)
t = Constant(0.0)
dim = 2
nref = 2 # # 2 - 5 tested for CSM 1 and 2
nref = 0 # # 2 - 5 tested for CSM 1 and 2
h = 0.1 / 2 ** nref
degree = 3 #3 # 2 - 4
if True:
Expand All @@ -201,9 +200,11 @@ def _elevate_degree(mesh, degree, label):
"""

mesh_f = Submesh(mesh, dmcommon.CELL_SETS_LABEL, label_fluid, mesh.topological_dimension())
mesh_f = _elevate_degree(mesh_f, degree, label_circle)
x_f, y_f = SpatialCoordinate(mesh_f)
n_f = FacetNormal(mesh_f)
mesh_s = Submesh(mesh, dmcommon.CELL_SETS_LABEL, label_struct, mesh.topological_dimension())
mesh_s = _elevate_degree(mesh_s, degree, label_struct_base)
x_s, y_s = SpatialCoordinate(mesh_s)
n_s = FacetNormal(mesh_s)
dx = Measure("dx", domain=mesh)
Expand Down Expand Up @@ -236,7 +237,6 @@ def _elevate_degree(mesh, degree, label):
axes.legend()
plt.savefig('mesh_s.pdf')

import pdb;pdb.set_trace()

case = "FSI3"

Expand Down
Binary file modified mesh_f.pdf
Binary file not shown.
Binary file modified mesh_orig.pdf
Binary file not shown.
Binary file modified mesh_s.pdf
Binary file not shown.

0 comments on commit 56da231

Please sign in to comment.