From f8a03268d9357ec5e80dd78a25e0a0e0c6cecc66 Mon Sep 17 00:00:00 2001 From: jstark <jstark@mpi-cbg.de> Date: Wed, 21 Jul 2021 06:45:11 +0200 Subject: [PATCH] Changed order of gradient for the narrow band and default value of get_upwind_gradient to 1. --- src/FiniteDifference/Upwind_gradient.hpp | 2 +- src/level_set/redistancing_Sussman/NarrowBand.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FiniteDifference/Upwind_gradient.hpp b/src/FiniteDifference/Upwind_gradient.hpp index 047ecd0f..5e9c3868 100644 --- a/src/FiniteDifference/Upwind_gradient.hpp +++ b/src/FiniteDifference/Upwind_gradient.hpp @@ -210,7 +210,7 @@ static bool ghost_width_is_sufficient(gridtype & grid, size_t required_width) * @param grid Grid, on which the gradient should be computed. */ template <size_t Field_in, size_t Sign, size_t Gradient_out, typename gridtype> -void get_upwind_gradient(gridtype & grid, const size_t order=5, const bool one_sided_BC=true) +void get_upwind_gradient(gridtype & grid, const size_t order=1, const bool one_sided_BC=true) { grid.template ghost_get<Field_in>(); grid.template ghost_get<Sign>(); diff --git a/src/level_set/redistancing_Sussman/NarrowBand.hpp b/src/level_set/redistancing_Sussman/NarrowBand.hpp index bb9b46ad..f67a5787 100644 --- a/src/level_set/redistancing_Sussman/NarrowBand.hpp +++ b/src/level_set/redistancing_Sussman/NarrowBand.hpp @@ -340,7 +340,7 @@ private: copy_gridTogrid<Phi_SDF, Phi_SDF_temp>(grid_in, g_temp); // Copy Phi_SDF from the input grid to the temorary grid init_sign_prop<Phi_SDF_temp, Phi_sign_temp>(g_temp); // initialize Phi_sign_temp with the sign of the // input Phi_SDF - get_upwind_gradient<Phi_SDF_temp, Phi_sign_temp, Phi_grad_temp>(g_temp); // Get initial gradients + get_upwind_gradient<Phi_SDF_temp, Phi_sign_temp, Phi_grad_temp>(g_temp, 1, true); // Get initial gradients } /**@brief Checks if a value for Phi_SDF lays within the narrow band. * -- GitLab