diff --git a/benchmark.py b/benchmark.py index 9de0b0e208..7883d642ae 100644 --- a/benchmark.py +++ b/benchmark.py @@ -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 @@ -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: @@ -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) @@ -236,7 +237,6 @@ def _elevate_degree(mesh, degree, label): axes.legend() plt.savefig('mesh_s.pdf') -import pdb;pdb.set_trace() case = "FSI3" diff --git a/mesh_f.pdf b/mesh_f.pdf index 781c5ab4e6..30f9f6e799 100644 Binary files a/mesh_f.pdf and b/mesh_f.pdf differ diff --git a/mesh_orig.pdf b/mesh_orig.pdf index db1521e243..0cf82ef517 100644 Binary files a/mesh_orig.pdf and b/mesh_orig.pdf differ diff --git a/mesh_s.pdf b/mesh_s.pdf index 81d54b0b3b..9c2ac8828d 100644 Binary files a/mesh_s.pdf and b/mesh_s.pdf differ