From 0250c3d2e999e0e8e819e3169451a679449ee7c2 Mon Sep 17 00:00:00 2001 From: Thomas Gibson <gibsonthomas1120@hotmail.com> Date: Sun, 30 May 2021 14:56:08 -0500 Subject: [PATCH] Find a working constant for advection model --- grudge/dt_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grudge/dt_utils.py b/grudge/dt_utils.py index 19487c19..08d2f958 100644 --- a/grudge/dt_utils.py +++ b/grudge/dt_utils.py @@ -64,6 +64,7 @@ def dt_non_geometric_factor(dcoll: DiscretizationCollection, dd=None) -> float: discr = dcoll.discr_from_dd(dd) min_delta_rs = [] + c = 4/7 for mgrp in discr.mesh.groups: nodes = np.asarray(list(zip(*mgrp.unit_nodes))) nnodes = mgrp.nunit_nodes @@ -73,11 +74,11 @@ def dt_non_geometric_factor(dcoll: DiscretizationCollection, dd=None) -> float: if mgrp.order == 0: assert nnodes == 1 min_delta_rs.append( - 2/3 * np.linalg.norm(nodes[0] - mgrp.vertex_unit_coordinates()[0]) + c * np.linalg.norm(nodes[0] - mgrp.vertex_unit_coordinates()[0]) ) else: min_delta_rs.append( - 2/3 * min( + c * min( np.linalg.norm(nodes[i] - nodes[j]) for i in range(nnodes) for j in range(nnodes) if i != j ) -- GitLab