From 3077f81045362b318125772aa780f7308c98d3de Mon Sep 17 00:00:00 2001 From: ejtovar Date: Mon, 8 Feb 2021 16:33:35 -0600 Subject: [PATCH 01/11] fixed some bugs, minor clean up, etc --- proteus/SWFlow/README.md | 2 +- proteus/SWFlow/SWFlowProblem.py | 10 +- proteus/SWFlow/models/GN_sw_n.py | 2 +- proteus/mprans/GN_SW2DCV.h | 1146 ++++++++++---------- proteus/mprans/GN_SW2DCV.py | 200 ++-- proteus/tests/SWFlow/conical_island.py | 13 +- proteus/tests/SWFlow/dSWEs_steady_state.py | 19 +- proteus/tests/SWFlow/dam3Bumps.py | 14 +- proteus/tests/SWFlow/mach_flow.py | 15 +- proteus/tests/SWFlow/obstacle_flow.py | 19 +- proteus/tests/SWFlow/parab1D.py | 3 - proteus/tests/SWFlow/reef_island_runup.py | 12 +- proteus/tests/SWFlow/runup_solitaryWave.py | 16 +- proteus/tests/SWFlow/santos_step.py | 14 +- proteus/tests/SWFlow/seawall.py | 17 +- proteus/tests/SWFlow/solitary_wave.py | 15 +- proteus/tests/SWFlow/transcritical_bump.py | 19 +- proteus/tests/SWFlow/wet_well_balancing.py | 19 +- 18 files changed, 816 insertions(+), 739 deletions(-) diff --git a/proteus/SWFlow/README.md b/proteus/SWFlow/README.md index b362e3fce9..83e3558c00 100644 --- a/proteus/SWFlow/README.md +++ b/proteus/SWFlow/README.md @@ -1,6 +1,6 @@ # Proteus -- SWFlow API -The SWFlow API contains solvers for the the 2D nonlinear Shallow Water Equations, and the 2D dispersive Serre--Saint-Venant equations (also known as Green-Naghdi equations, nonlinear Boussinesq, etc.). Both models are +The SWFlow API contains solvers for the the 2D nonlinear Shallow Water Equations, and the 2D dispersive Serre-Green-Naghdi equations (also known as Green-Naghdi equations, nonlinear Boussinesq, etc.). Both models are numerically solved using continuous, linear finite elements as seen in [Guermond, *et al* 2018](https://doi.org/10.1137/17M1156162), [Guermond *et al* 2019](https://doi.org/10.1016/j.jcp.2019.108917) and [Guermond *et al* 2020]. diff --git a/proteus/SWFlow/SWFlowProblem.py b/proteus/SWFlow/SWFlowProblem.py index 65d36dd846..2ab656d4fa 100644 --- a/proteus/SWFlow/SWFlowProblem.py +++ b/proteus/SWFlow/SWFlowProblem.py @@ -36,7 +36,7 @@ def __init__(self, """ Constructor for structured meshes """ # ***** SET OF ASSERTS ***** # assert sw_model in [ - 0, 1], "sw_model={0,1} for shallow water equations or dispersive shallow water equations respectively" + 0, 1], "sw_model={0,1} for shallow water equations or dispersive Serre-Green-Nagdhi respectively" assert cfl <= 1, "Choose cfl <= 1" assert isinstance( outputStepping, OutputStepping), "Provide an object from the OutputStepping class" @@ -87,8 +87,8 @@ def __init__(self, def assert_initialConditions(self, sw_model, initialConditions): assert 'water_height' in initialConditions, 'Provide water_height in initialConditions' - assert 'x_mom' in initialConditions, 'Provide y_mom in initialConditions' - assert 'y_mom' in initialConditions, 'Provide x_mom in initialConditions' + assert 'x_mom' in initialConditions, 'Provide x_mom in initialConditions' + assert 'y_mom' in initialConditions, 'Provide y_mom in initialConditions' if sw_model == 1: # dispersive SWEs assert 'h_times_eta' in initialConditions, 'Provide auxiliary function h_eta in initialConditions' assert 'h_times_w' in initialConditions, 'Provide auxiliary function h_w in initialConditions' @@ -170,8 +170,8 @@ def getFESpace(self): default_swe_parameters = {'LUMPED_MASS_MATRIX': 0, 'cfl': 0.33, 'SSPOrder': 3, - 'cE': 1} + 'cE': 1.0} default_GN_swe_parameters = {'LUMPED_MASS_MATRIX': 0, 'cfl': 0.33, 'SSPOrder': 3, - 'cE': 1} + 'cE': 1.0} diff --git a/proteus/SWFlow/models/GN_sw_n.py b/proteus/SWFlow/models/GN_sw_n.py index 2c4340e896..cb8864edbf 100644 --- a/proteus/SWFlow/models/GN_sw_n.py +++ b/proteus/SWFlow/models/GN_sw_n.py @@ -86,7 +86,7 @@ # ******************************** # # ********** TOLERANCES ********** # # ******************************** # -nl_atol_res = 1.0e-5 +nl_atol_res = 1.0e-7 nl_rtol_res = 0.0 l_atol_res = 1.0e-7 l_rtol_res = 0.0 diff --git a/proteus/mprans/GN_SW2DCV.h b/proteus/mprans/GN_SW2DCV.h index 003ddc15dd..d76fef8a0a 100644 --- a/proteus/mprans/GN_SW2DCV.h +++ b/proteus/mprans/GN_SW2DCV.h @@ -11,10 +11,8 @@ namespace py = pybind11; -#define GLOBAL_FCT 0 #define POWER_SMOOTHNESS_INDICATOR 2 #define VEL_FIX_POWER 2. -#define REESTIMATE_MAX_EDGE_BASED_CFL 0 #define LAMBDA_MGN 1 #define IF_BOTH_GAMMA_BRANCHES 0 #define LIMITING_ITERATION 2 @@ -22,7 +20,7 @@ namespace py = pybind11; /* inline functions */ namespace proteus { -// for mGN stuff "max" wave speeds. See section 4.4 of first mGN paper by +// for Serre-Green-Naghdi "max" wave speeds. See section 4.4 of JCP 2019 // Guermond, Popov, Tovar, Kees for formulas inline double GN_nu1(const double &g, const double &hL, const double &uL, const double &etaL, const double &meshSizeL) { @@ -38,8 +36,6 @@ inline double GN_nu1(const double &g, const double &hL, const double &uL, } inline double GN_nu3(const double &g, const double &hR, const double &uR, const double &etaR, const double &meshSizeR) { - // See section 4.4 of first mGN paper by Guermond, Popov, Tovar, Kees for - // formulas double augR = LAMBDA_MGN / (3. * meshSizeR) * (6. * hR + 12. * (hR - etaR)); if (etaR >= hR) { @@ -85,84 +81,12 @@ inline double ENTROPY_FLUX2(const double &g, const double &h, const double &hu, g * h * z) * hv * one_over_hReg; } -// FOR ESTIMATING MAX WAVE SPEEDS -inline double f(const double &g, const double &h, const double &hZ) { - return ((h <= hZ) ? 2. * (sqrt(g * h) - sqrt(g * hZ)) - : (h - hZ) * sqrt(0.5 * g * (h + hZ) / h / hZ)); -} -inline double phi(const double &g, const double &h, const double &hL, - const double &hR, const double &uL, const double &uR) { - return (f(g, h, hL) + f(g, h, hR) + uR - uL); -} -inline double fp(const double &g, const double &h, const double &hZ) { - return ((h <= hZ) - ? sqrt(g / h) - : g * (2 * h * h + h * hZ + hZ * hZ) / - (2 * sqrt(2 * g) * h * h * hZ * sqrt(1 / h + 1 / hZ))); -} -inline double phip(const double &g, const double &h, const double &hL, - const double &hR) { - return (fp(g, h, hL) + fp(g, h, hR)); -} -inline double nu1(const double &g, const double &hStar, const double &hL, - const double &uL, const double &one_over_hL) { - return (uL - sqrt(g * hL) * - sqrt((1. + fmax((hStar - hL) / 2. * one_over_hL, 0.0)) * - (1. + fmax((hStar - hL) * one_over_hL, 0.)))); -} -inline double nu3(const double &g, const double &hStar, const double &hR, - const double &uR, const double &one_over_hR) { - return (uR + sqrt(g * hR) * - sqrt((1. + fmax((hStar - hR) / 2. * one_over_hR, 0.0)) * - (1. + fmax((hStar - hR) * one_over_hR, 0.)))); -} -inline double phiDiff(const double &g, const double &h1k, const double &h2k, - const double &hL, const double &hR, const double &uL, - const double &uR) { - return ((phi(g, h2k, hL, hR, uL, uR) - phi(g, h1k, hL, hR, uL, uR)) / - (h2k - h1k)); -} -inline double phiDDiff1(const double &g, const double &h1k, const double &h2k, - const double &hL, const double &hR, const double &uL, - const double &uR) { - return ((phiDiff(g, h1k, h2k, hL, hR, uL, uR) - phip(g, h1k, hL, hR)) / - (h2k - h1k)); -} -inline double phiDDiff2(const double &g, const double &h1k, const double &h2k, - const double &hL, const double &hR, const double &uL, - const double &uR) { - return ((phip(g, h2k, hL, hR) - phiDiff(g, h1k, h2k, hL, hR, uL, uR)) / - (h2k - h1k)); -} -inline double hStarLFromQuadPhiFromAbove(const double &g, const double &hStarL, - const double &hStarR, const double &hL, - const double &hR, const double &uL, - const double &uR) { - return (hStarL - - 2 * phi(g, hStarL, hL, hR, uL, uR) / - (phip(g, hStarL, hL, hR) + - sqrt(std::pow(phip(g, hStarL, hL, hR), 2) - - 4 * phi(g, hStarL, hL, hR, uL, uR) * - phiDDiff1(g, hStarL, hStarR, hL, hR, uL, uR)))); -} -inline double hStarRFromQuadPhiFromBelow(const double &g, const double &hStarL, - const double &hStarR, const double &hL, - const double &hR, const double &uL, - const double &uR) { - return (hStarR - - 2 * phi(g, hStarR, hL, hR, uL, uR) / - (phip(g, hStarR, hL, hR) + - sqrt(std::pow(phip(g, hStarR, hL, hR), 2) - - 4 * phi(g, hStarR, hL, hR, uL, uR) * - phiDDiff2(g, hStarL, hStarR, hL, hR, uL, uR)))); -} -} // end namespace proteus +} // namespace proteus namespace proteus { + class GN_SW2DCV_base { public: - std::valarray Rneg, Rpos, Rneg_heta, Rpos_heta, hLow, huLow, hvLow, - hetaLow, hwLow, hbetaLow, Kmax; virtual ~GN_SW2DCV_base() {} virtual void convexLimiting(arguments_dict &args) = 0; virtual double calculateEdgeBasedCFL(arguments_dict &args) = 0; @@ -194,23 +118,20 @@ class GN_SW2DCV : public GN_SW2DCV_base { double hetaL, double lumpedL, double hR, double huR, double hvR, double hetaR, double lumpedR, - double hEpsL, double hEpsR, - bool debugging) { + double hEps) { double lambda1, lambda3; - - // To avoid division by 0 - double one_over_hL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEpsL), 2.0)); - double one_over_hR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEpsR), 2.0)); + double one_over_hL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEps), 2.0)); + double one_over_hR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEps), 2.0)); double hVelL = nx * huL + ny * hvL; double hVelR = nx * huR + ny * hvR; double velL = one_over_hL * hVelL; double velR = one_over_hR * hVelR; - double etaL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEpsL), 2)) * hetaL; - double etaR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEpsR), 2)) * hetaR; + double etaL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEps), 2)) * hetaL; + double etaR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEps), 2)) * hetaR; double meshSizeL = sqrt(lumpedL); double meshSizeR = sqrt(lumpedR); - /* See equation 4.12 from mGN paper: + /* See equation 4.12 JCP 2019 paper: 1-eigenvalue: uL-sqrt(g*hL)*sqrt(1 + augL) 3-eigenvalue: uR+sqrt(g*hR)*sqrt(1 + augR) */ @@ -252,12 +173,16 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &hw_old = args.array("hw_old"); xt::pyarray &hbeta_old = args.array("hbeta_old"); xt::pyarray &b_dof = args.array("b_dof"); - xt::pyarray &high_order_hnp1 = args.array("high_order_hnp1"); - xt::pyarray &high_order_hunp1 = args.array("high_order_hunp1"); - xt::pyarray &high_order_hvnp1 = args.array("high_order_hvnp1"); + xt::pyarray &high_order_hnp1 = + args.array("high_order_hnp1"); + xt::pyarray &high_order_hunp1 = + args.array("high_order_hunp1"); + xt::pyarray &high_order_hvnp1 = + args.array("high_order_hvnp1"); xt::pyarray &high_order_hetanp1 = args.array("high_order_hetanp1"); - xt::pyarray &high_order_hwnp1 = args.array("high_order_hwnp1"); + xt::pyarray &high_order_hwnp1 = + args.array("high_order_hwnp1"); xt::pyarray &high_order_hbetanp1 = args.array("high_order_hbetanp1"); xt::pyarray &extendedSourceTerm_hu = @@ -273,9 +198,11 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &limited_hnp1 = args.array("limited_hnp1"); xt::pyarray &limited_hunp1 = args.array("limited_hunp1"); xt::pyarray &limited_hvnp1 = args.array("limited_hvnp1"); - xt::pyarray &limited_hetanp1 = args.array("limited_hetanp1"); + xt::pyarray &limited_hetanp1 = + args.array("limited_hetanp1"); xt::pyarray &limited_hwnp1 = args.array("limited_hwnp1"); - xt::pyarray &limited_hbetanp1 = args.array("limited_hbetanp1"); + xt::pyarray &limited_hbetanp1 = + args.array("limited_hbetanp1"); xt::pyarray &csrRowIndeces_DofLoops = args.array("csrRowIndeces_DofLoops"); xt::pyarray &csrColumnOffsets_DofLoops = @@ -284,200 +211,44 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &dH_minus_dL = args.array("dH_minus_dL"); xt::pyarray &muH_minus_muL = args.array("muH_minus_muL"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); int LUMPED_MASS_MATRIX = args.scalar("LUMPED_MASS_MATRIX"); xt::pyarray &dLow = args.array("dLow"); - xt::pyarray &hBT = args.array("hBT"); - xt::pyarray &huBT = args.array("huBT"); - xt::pyarray &hvBT = args.array("hvBT"); - xt::pyarray &hetaBT = args.array("hetaBT"); - xt::pyarray &hwBT = args.array("hwBT"); - xt::pyarray &hbetaBT = args.array("hbetaBT"); - xt::pyarray &new_SourceTerm_hu = args.array("new_SourceTerm_hu"); - xt::pyarray &new_SourceTerm_hv = args.array("new_SourceTerm_hv"); + xt::pyarray &new_SourceTerm_hu = + args.array("new_SourceTerm_hu"); + xt::pyarray &new_SourceTerm_hv = + args.array("new_SourceTerm_hv"); xt::pyarray &new_SourceTerm_heta = args.array("new_SourceTerm_heta"); - xt::pyarray &new_SourceTerm_hw = args.array("new_SourceTerm_hw"); - double size_of_domain = args.scalar("size_of_domain"); - Rneg.resize(numDOFs, 0.0); - Rpos.resize(numDOFs, 0.0); - Rneg_heta.resize(numDOFs, 0.0); - Rpos_heta.resize(numDOFs, 0.0); - hLow.resize(numDOFs, 0.0); - huLow.resize(numDOFs, 0.0); - hvLow.resize(numDOFs, 0.0); - hetaLow.resize(numDOFs, 0.0); - hwLow.resize(numDOFs, 0.0); - hbetaLow.resize(numDOFs, 0.0); - Kmax.resize(numDOFs, 0.0); - - // for relaxation of bounds - std::valarray urelax(0.0, numDOFs); - std::valarray drelax(0.0, numDOFs); - - // for h - std::valarray h_min(0.0, numDOFs); - std::valarray h_max(0.0, numDOFs); - std::valarray delta_Sqd_h(0.0, numDOFs); - std::valarray bar_deltaSqd_h(0.0, numDOFs); - - // for heta - std::valarray heta_min(0.0, numDOFs); - std::valarray heta_max(0.0, numDOFs); - std::valarray delta_Sqd_heta(0.0, numDOFs); - std::valarray bar_deltaSqd_heta(0.0, numDOFs); - - // for kinetic energy - xt::pyarray kin(numDOFs); - xt::pyarray max_of_h_and_hEps(numDOFs); - std::valarray kin_max(0.0, numDOFs); - std::valarray delta_Sqd_kin(0.0, numDOFs); - std::valarray bar_deltaSqd_kin(0.0, numDOFs); + xt::pyarray &new_SourceTerm_hw = + args.array("new_SourceTerm_hw"); + xt::pyarray &hLow = args.array("hLow"); + xt::pyarray &huLow = args.array("huLow"); + xt::pyarray &hvLow = args.array("hvLow"); + xt::pyarray &hetaLow = args.array("hetaLow"); + xt::pyarray &hwLow = args.array("hwLow"); + xt::pyarray &hbetaLow = args.array("hbetaLow"); + xt::pyarray &h_min = args.array("h_min"); + xt::pyarray &h_max = args.array("h_max"); + xt::pyarray &heta_min = args.array("heta_min"); + xt::pyarray &heta_max = args.array("heta_max"); + xt::pyarray &kin_max = args.array("kin_max"); + + // Declare stuff for limiting on h and h*heta + std::valarray Rneg(0.0, numDOFs), Rpos(0.0, numDOFs), + Rneg_heta(0.0, numDOFs), Rpos_heta(0.0, numDOFs); // Create FCT component matrices in vector form - std::valarray FCT_h(0.0, dH_minus_dL.size()); - std::valarray FCT_hu(0.0, dH_minus_dL.size()); - std::valarray FCT_hv(0.0, dH_minus_dL.size()); - std::valarray FCT_heta(0.0, dH_minus_dL.size()); - std::valarray FCT_hw(0.0, dH_minus_dL.size()); - std::valarray FCT_hbeta(0.0, dH_minus_dL.size()); - - // Define kinetic energy, kin = 1/2 q^2 / h - max_of_h_and_hEps = xt::where(h_old > hEps, h_old, hEps); - kin = 0.5 * (hu_old * hu_old + hv_old * hv_old); - kin *= - 2.0 * h_old / (h_old * h_old + max_of_h_and_hEps * max_of_h_and_hEps); - - // We first do the loops to define the relaxation quantities - // First relaxation loop - for (int i = 0; i < numDOFs; i++) { - urelax[i] = - 1.0 + - 2.0 * std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); - drelax[i] = - 1.0 - - 2.0 * std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - if (i != j) { - delta_Sqd_h[i] += h_old[i] - h_old[j]; - delta_Sqd_heta[i] += heta_old[i] - heta_old[j]; - delta_Sqd_kin[i] += kin[i] - kin[j]; - } - } // j loop ends here - } // i loops ends here - - // Second relaxation loop - for (int i = 0; i < numDOFs; i++) { - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - if (i != j) { - bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; - bar_deltaSqd_heta[i] += delta_Sqd_heta[j] + delta_Sqd_heta[i]; - bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; - } - } // j loop ends here - bar_deltaSqd_h[i] = - bar_deltaSqd_h[i] / - (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i]) / 2.0; - bar_deltaSqd_heta[i] = - bar_deltaSqd_heta[i] / - (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i]) / 2.0; - bar_deltaSqd_kin[i] = - bar_deltaSqd_kin[i] / - (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i]) / 2.0; - } // i loops ends here - - //////////////////////////////////////////////////////// - // Loop to define local bounds and low order solution // - //////////////////////////////////////////////////////// - int ij = 0; - for (int i = 0; i < numDOFs; i++) { - - // define m_i - double mi = lumped_mass_matrix[i]; - - /* Initialize hmin, hmax, heta_min, heta_max */ - h_min[i] = h_old[i]; - h_max[i] = h_old[i]; - heta_min[i] = heta_old[i]; - heta_max[i] = heta_old[i]; - - /* Initialize low order solution */ - hLow[i] = h_old[i]; - huLow[i] = hu_old[i]; - hvLow[i] = hv_old[i]; - hetaLow[i] = heta_old[i]; - hwLow[i] = hw_old[i]; - hbetaLow[i] = hbeta_old[i]; - Kmax[i] = kin[i]; - - /* LOOP OVER THE SPARSITY PATTERN (j-LOOP) */ - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - double psi_ij = 0; - double one_over_hBT = - 2.0 * hBT[ij] / - (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); - psi_ij = one_over_hBT * (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / - 2.0; // Eqn (6.31) - - // COMPUTE LOCAL BOUNDS // - Kmax[i] = fmax(psi_ij, Kmax[i]); - h_min[i] = std::min(h_min[i], hBT[ij]); - h_max[i] = std::max(h_max[i], hBT[ij]); - heta_min[i] = std::min(heta_min[i], hetaBT[ij]); - heta_max[i] = std::max(heta_max[i], hetaBT[ij]); - - // Then do relaxation of bounds here. If confused, see (4.12) of Euler - // convex limiting paper. - Kmax[i] = std::min(urelax[i] * Kmax[i], - Kmax[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); - h_min[i] = std::max(drelax[i] * h_min[i], - h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); - h_max[i] = std::min(urelax[i] * h_max[i], - h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); - heta_min[i] = - std::max(drelax[i] * heta_min[i], - heta_min[i] - std::abs(bar_deltaSqd_heta[i]) / 2.0); - heta_max[i] = - std::min(urelax[i] * heta_max[i], - heta_max[i] + std::abs(bar_deltaSqd_heta[i]) / 2.0); - - /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ - // This is low order solution WITHOUT sources - if (i != j) { - hLow[i] += h_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hBT[ij]); - huLow[i] += hu_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * huBT[ij]); - hvLow[i] += hv_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hvBT[ij]); - hetaLow[i] += heta_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hetaBT[ij]); - hwLow[i] += hw_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hwBT[ij]); - hbetaLow[i] += hbeta_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hbetaBT[ij]); - } - // UPDATE ij // - ij += 1; - } // j loop ends here - - // clean up hLow from round off error - if (hLow[i] < hEps) - hLow[i] = 0.0; - } // i loop ends here + std::valarray FCT_h(0.0, dH_minus_dL.size()), + FCT_hu(0.0, dH_minus_dL.size()), FCT_hv(0.0, dH_minus_dL.size()), + FCT_heta(0.0, dH_minus_dL.size()), FCT_hw(0.0, dH_minus_dL.size()), + FCT_hbeta(0.0, dH_minus_dL.size()); //////////////////////////////////////////////////// // Loop to define FCT matrices for each component // //////////////////////////////////////////////////// - ij = 0; + int ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors + // Read some vectors double high_order_hnp1i = high_order_hnp1[i]; double high_order_hunp1i = high_order_hunp1[i]; double high_order_hvnp1i = high_order_hvnp1[i]; @@ -501,7 +272,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { int j = csrColumnOffsets_DofLoops[offset]; - // read some vectors + // Read some vectors double hj = h_old[j]; double hunj = hu_old[j]; double hvnj = hv_old[j]; @@ -510,10 +281,9 @@ class GN_SW2DCV : public GN_SW2DCV_base { double hbetanj = hbeta_old[j]; double Zj = b_dof[j]; double one_over_hjReg = - 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); // hEps + 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); - // COMPUTE STAR SOLUTION // hStar, huStar, hvStar, hetaStar, and - // hwStar, hbetaStar + // Compute star states double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); double huStarij = huni * hStarij * one_over_hiReg; double hvStarij = hvni * hStarij * one_over_hiReg; @@ -567,8 +337,10 @@ class GN_SW2DCV : public GN_SW2DCV_base { dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hbetaStarji - hbetaStarij) + dt * muH_minus_muL[ij] * (hbetanj - hbetani); + // UPDATE ij // ij += 1; + } // j loop ends here } // i loop ends here @@ -591,20 +363,21 @@ class GN_SW2DCV : public GN_SW2DCV_base { double Pnegi = 0., Pposi = 0.; double Pnegi_heta = 0., Pposi_heta = 0.; - // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// + // LOOP OVER THE SPARSITY PATTERN (j-LOOP) for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { int j = csrColumnOffsets_DofLoops[offset]; - // COMPUTE P VECTORS // + // COMPUTE P VECTORS Pnegi += FCT_h[ij] * ((FCT_h[ij] < 0) ? 1. : 0.); Pposi += FCT_h[ij] * ((FCT_h[ij] > 0) ? 1. : 0.); Pnegi_heta += FCT_heta[ij] * ((FCT_heta[ij] < 0) ? 1. : 0.); Pposi_heta += FCT_heta[ij] * ((FCT_heta[ij] > 0) ? 1. : 0.); - // UPDATE ij // + // UPDATE ij ij += 1; + } // j loop ends here /////////////////////// @@ -663,7 +436,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { double ith_Limiter_times_FluxCorrectionMatrix6 = 0.; double ci = - Kmax[i] * hLow[i] - + kin_max[i] * hLow[i] - 0.5 * (huLow[i] * huLow[i] + hvLow[i] * hvLow[i]); // for KE lim. // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// @@ -697,7 +470,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { double hwStarji = hwnj * hStarji * one_over_hjReg; double hbetaStarji = hbetanj * hStarji * one_over_hjReg; - // compute limiter based on water height + // Compute limiter based on water height if (FCT_h[ij] >= 0) { Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[j], Rpos[i])); } else { @@ -721,7 +494,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { double Phv_ij = FCT_hv[ij] / mi / lambdaj; double ai = -0.5 * (Phu_ij * Phu_ij + Phv_ij * Phv_ij); - double bi = Kmax[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); + double bi = + kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); double r1 = ai == 0 ? (bi == 0 ? 1. : -ci / bi) @@ -730,8 +504,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { ? (bi == 0 ? 1. : -ci / bi) : (-bi - std::sqrt(bi * bi - 4 * ai * ci)) / 2. / ai; if (r1 < 0 && r2 < 0) { - r1 = 1.; - r2 = 1.; + r1 = Lij_array[ij]; + r2 = Lij_array[ij]; } double ri = fabs(fmax(r1, r2)); @@ -739,21 +513,22 @@ class GN_SW2DCV : public GN_SW2DCV_base { double lambdai = csrRowIndeces_DofLoops[j + 1] - csrRowIndeces_DofLoops[j] - 1; double mj = lumped_mass_matrix[j]; - double cj = Kmax[j] * hLow[j] - + double cj = kin_max[j] * hLow[j] - 0.5 * (huLow[j] * huLow[j] + hvLow[j] * hvLow[j]); double Ph_ji = -FCT_h[ij] / mj / lambdai; // Aij=-Aji double Phu_ji = -FCT_hu[ij] / mj / lambdai; double Phv_ji = -FCT_hv[ij] / mj / lambdai; double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); - double bj = Kmax[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); + double bj = + kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); r1 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) : (-bj + std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; r2 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) : (-bj - std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; if (r1 < 0 && r2 < 0) { - r1 = 1.; - r2 = 1.; + r1 = Lij_array[ij]; + r2 = Lij_array[ij]; } double rj = fabs(fmax(r1, r2)); @@ -773,9 +548,10 @@ class GN_SW2DCV : public GN_SW2DCV_base { // update ij ij += 1; - } - // update ulow solution + } // end j loop + + // update ulow solution (which is passed in from function call) double one_over_mi = 1.0 / lumped_mass_matrix[i]; hLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix1; huLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix2; @@ -783,9 +559,9 @@ class GN_SW2DCV : public GN_SW2DCV_base { hetaLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix4; hwLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix5; hbetaLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix6; - } // end i loop for computing limiter and sum_j(lij * Aij) + } // end i loop - // update final limted solution, need to change to vector form + // Final loop to define limited solution, maybe should vectorize? for (int i = 0; i < numDOFs; i++) { double one_over_mi = 1.0 / lumped_mass_matrix[i]; limited_hnp1[i] = hLow[i]; @@ -807,24 +583,25 @@ class GN_SW2DCV : public GN_SW2DCV_base { abort(); } else { // clean up uHigh from round off error - if (limited_hnp1[i] < hEps) - limited_hnp1[i] = 0.0; - double aux = fmax(limited_hnp1[i], hEps); - limited_hunp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - std::pow(aux, VEL_FIX_POWER)); - limited_hvnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - std::pow(aux, VEL_FIX_POWER)); - limited_hetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - std::pow(aux, VEL_FIX_POWER)); - limited_hwnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - std::pow(aux, VEL_FIX_POWER)); - limited_hbetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - std::pow(aux, VEL_FIX_POWER)); + // if (limited_hnp1[i] < hEps) { + // limited_hnp1[i] = 0.0; + // limited_hetanp1[i] = 0.0; + // } + + // double aux = fmax(limited_hnp1[i], hEps); + // limited_hunp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + // std::pow(aux, VEL_FIX_POWER)); + // limited_hvnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + // std::pow(aux, VEL_FIX_POWER)); + // limited_hwnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + // std::pow(aux, VEL_FIX_POWER)); + // limited_hbetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) + // / + // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + // std::pow(aux, VEL_FIX_POWER)); } } @@ -853,7 +630,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &csrColumnOffsets_DofLoops = args.array("csrColumnOffsets_DofLoops"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); xt::pyarray &Cx = args.array("Cx"); xt::pyarray &Cy = args.array("Cy"); xt::pyarray &CTx = args.array("CTx"); @@ -861,9 +637,9 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &dLow = args.array("dLow"); double run_cfl = args.scalar("run_cfl"); xt::pyarray &edge_based_cfl = args.array("edge_based_cfl"); - int debug = args.scalar("debug"); double max_edge_based_cfl = 0.; + int ij = 0; for (int i = 0; i < numDOFsPerEqn; i++) { // solution at time tn for the ith DOF @@ -876,6 +652,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + // loop in j (sparsity pattern) int j = csrColumnOffsets_DofLoops[offset]; @@ -894,15 +671,13 @@ class GN_SW2DCV : public GN_SW2DCV_base { double cji_norm = sqrt(CTx[ij] * CTx[ij] + CTy[ij] * CTy[ij]); double nxij = Cx[ij] / cij_norm, nyij = Cy[ij] / cij_norm; double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; - dLow[ij] = - fmax(maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, - hetai, mi, hj, huj, hvj, hetaj, - mj, hEps, hEps, debug) * - cij_norm, // hEps - maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, - hetaj, mj, hi, hui, hvi, hetai, - mi, hEps, hEps, debug) * - cji_norm); // hEps + dLow[ij] = fmax( + maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, hetai, + mi, hj, huj, hvj, hetaj, mj, hEps) * + cij_norm, // hEps + maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, hetaj, + mj, hi, hui, hvi, hetai, mi, hEps) * + cji_norm); // hEps dLowii -= dLow[ij]; } else @@ -924,7 +699,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &h_dof_old = args.array("h_dof_old"); xt::pyarray &hu_dof_old = args.array("hu_dof_old"); xt::pyarray &hv_dof_old = args.array("hv_dof_old"); - xt::pyarray &heta_dof_old = args.array("heta_dof_old"); xt::pyarray &b_dof = args.array("b_dof"); xt::pyarray &Cx = args.array("Cx"); xt::pyarray &Cy = args.array("Cy"); @@ -950,7 +724,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { // To compute: // * Entropy at i-th node std::valarray eta(numDOFsPerEqn); - for (int i = 0; i < numDOFsPerEqn; i++) { // COMPUTE ENTROPY. NOTE: WE CONSIDER A FLAT BOTTOM double hi = h_dof_old[i]; @@ -973,6 +746,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { // speed = sqrt(g max(h_0)), I divide by h_epsilon to get max(h_0) double speed = std::sqrt(g * hEps / eps); + dij_small = 0.0; for (int i = 0; i < numDOFsPerEqn; i++) { @@ -980,7 +754,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { double hi = h_dof_old[i]; double hui = hu_dof_old[i]; double hvi = hv_dof_old[i]; - double hetai = heta_dof_old[i]; double Zi = b_dof[i]; // Define some things using above @@ -988,9 +761,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { 2 * hi / (hi * hi + std::pow(fmax(hi, hEps), 2)); // hEps double ui = hui * one_over_hiReg; double vi = hvi * one_over_hiReg; - double etai = hetai * one_over_hiReg; double mi = lumped_mass_matrix[i]; - double meshSizei = std::sqrt(mi); // initialize etaMax and etaMin etaMax[i] = fabs(eta[i]); @@ -1014,7 +785,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { double hj = h_dof_old[j]; double huj = hu_dof_old[j]; double hvj = hv_dof_old[j]; - double hetaj = heta_dof_old[j]; double Zj = b_dof[j]; // Then define some things here using above @@ -1024,12 +794,15 @@ class GN_SW2DCV : public GN_SW2DCV_base { double vj = hvj * one_over_hjReg; // auxiliary functions to compute fluxes - double aux_h = - (uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]; - double aux_hu = - (uj * huj - ui * hui) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]; - double aux_hv = - (uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi) * Cy[ij]; + double aux_h = (uj * hj) * Cx[ij] + (vj * hj) * Cy[ij]; + double aux_hu = (uj * huj) * Cx[ij] + (vj * huj) * Cy[ij]; + double aux_hv = (uj * hvj) * Cx[ij] + (vj * hvj) * Cy[ij]; + // double aux_h = + // (uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]; + // double aux_hu = + // (uj * huj - ui * hui) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]; + // double aux_hv = + // (uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi) * Cy[ij]; // flux for entropy ith_flux_term1 += aux_h; @@ -1057,9 +830,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { ij += 1; } // end j loop - // Finally dij_small here - dij_small = 1E-14 * dij_small; - // define sum of entprime*flux sum_entprime_flux = (ith_flux_term1 * eta_prime1 + ith_flux_term2 * eta_prime2 + @@ -1073,12 +843,13 @@ class GN_SW2DCV : public GN_SW2DCV_base { double one_over_entNormFactori = 1.0 / rescale; global_entropy_residual[i] = one_over_entNormFactori * fabs(entropy_flux - sum_entprime_flux); - - // COMPUTE SMOOTHNESS INDICATOR // if (hi <= hEps) { global_entropy_residual[i] = 1.0; } - } + } // end i loop + + // Finally dij_small here + dij_small = 1E-14 * dij_small; // ********** END OF LOOP IN DOFs ********** // } // end calculateEV @@ -1087,28 +858,30 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); - double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); - xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -1120,13 +893,11 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -1143,22 +914,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &heta_dof = args.array("heta_dof"); xt::pyarray &hw_dof = args.array("hw_dof"); xt::pyarray &hbeta_dof = args.array("hbeta_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &heta_dof_sge = args.array("heta_dof_sge"); - xt::pyarray &hw_dof_sge = args.array("hw_dof_sge"); - xt::pyarray &hbeta_dof_sge = args.array("hbeta_dof_sge"); - xt::pyarray &q_mass_acc = args.array("q_mass_acc"); - xt::pyarray &q_mom_hu_acc = args.array("q_mom_hu_acc"); - xt::pyarray &q_mom_hv_acc = args.array("q_mom_hv_acc"); - xt::pyarray &q_mass_adv = args.array("q_mass_adv"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -1220,7 +975,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); @@ -1244,7 +1000,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { double cfl_run = args.scalar("cfl_run"); double eps = args.scalar("eps"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); xt::pyarray &hnp1_at_quad_point = args.array("hnp1_at_quad_point"); xt::pyarray &hunp1_at_quad_point = @@ -1281,21 +1036,30 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &normalx = args.array("normalx"); xt::pyarray &normaly = args.array("normaly"); xt::pyarray &dLow = args.array("dLow"); - xt::pyarray &hBT = args.array("hBT"); - xt::pyarray &huBT = args.array("huBT"); - xt::pyarray &hvBT = args.array("hvBT"); - xt::pyarray &hetaBT = args.array("hetaBT"); - xt::pyarray &hwBT = args.array("hwBT"); - xt::pyarray &hbetaBT = args.array("hbetaBT"); int lstage = args.scalar("lstage"); - xt::pyarray &new_SourceTerm_hu = args.array("new_SourceTerm_hu"); - xt::pyarray &new_SourceTerm_hv = args.array("new_SourceTerm_hv"); + xt::pyarray &new_SourceTerm_hu = + args.array("new_SourceTerm_hu"); + xt::pyarray &new_SourceTerm_hv = + args.array("new_SourceTerm_hv"); xt::pyarray &new_SourceTerm_heta = args.array("new_SourceTerm_heta"); - xt::pyarray &new_SourceTerm_hw = args.array("new_SourceTerm_hw"); + xt::pyarray &new_SourceTerm_hw = + args.array("new_SourceTerm_hw"); xt::pyarray &global_entropy_residual = args.array("global_entropy_residual"); double dij_small = args.scalar("dij_small"); + xt::pyarray &hLow = args.array("hLow"); + xt::pyarray &huLow = args.array("huLow"); + xt::pyarray &hvLow = args.array("hvLow"); + xt::pyarray &hetaLow = args.array("hetaLow"); + xt::pyarray &hwLow = args.array("hwLow"); + xt::pyarray &hbetaLow = args.array("hbetaLow"); + xt::pyarray &h_min = args.array("h_min"); + xt::pyarray &h_max = args.array("h_max"); + xt::pyarray &heta_min = args.array("heta_min"); + xt::pyarray &heta_max = args.array("heta_max"); + xt::pyarray &kin_max = args.array("kin_max"); + double size_of_domain = args.scalar("size_of_domain"); // FOR FRICTION// double n2 = std::pow(mannings, 2.); double gamma = 4. / 3; @@ -1336,7 +1100,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { register double h = 0.0, hu = 0.0, hv = 0.0, heta = 0.0, hw = 0.0, hbeta = 0.0, // solution at current time h_old = 0.0, hu_old = 0.0, hv_old = 0.0, heta_old = 0.0, - hw_old = 0.0, hbeta_old = 0.0, // solution at lstage + hw_old = 0.0, + hbeta_old = 0.0, // solution at lstage jac[nSpace * nSpace], jacDet, jacInv[nSpace * nSpace], h_test_dV[nDOF_trial_element], dV, x, y, xt, yt; // get jacobian, etc for mapping reference element @@ -1346,33 +1111,34 @@ class GN_SW2DCV : public GN_SW2DCV_base { // get the physical integration weight dV = fabs(jacDet) * dV_ref[k]; // get the solution at current time - ck.valFromDOF(h_dof.data(), &h_l2g[eN_nDOF_trial_element], - &h_trial_ref[k * nDOF_trial_element], h); + ck.valFromDOF(h_dof.data(), &h_l2g.data()[eN_nDOF_trial_element], + &h_trial_ref.data()[k * nDOF_trial_element], h); ck.valFromDOF(hu_dof.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hu); + &vel_trial_ref.data()[k * nDOF_trial_element], hu); ck.valFromDOF(hv_dof.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hv); - ck.valFromDOF(heta_dof.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], heta); - ck.valFromDOF(hw_dof.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hw); - ck.valFromDOF(hbeta_dof.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hbeta); + &vel_trial_ref.data()[k * nDOF_trial_element], hv); + ck.valFromDOF(heta_dof.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], heta); + ck.valFromDOF(hw_dof.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hw); + ck.valFromDOF(hbeta_dof.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hbeta); // get the solution at the lstage - ck.valFromDOF(h_dof_old.data(), &h_l2g[eN_nDOF_trial_element], - &h_trial_ref[k * nDOF_trial_element], h_old); - ck.valFromDOF(hu_dof_old.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hu_old); - ck.valFromDOF(hv_dof_old.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hv_old); + ck.valFromDOF(h_dof_old.data(), &h_l2g.data()[eN_nDOF_trial_element], + &h_trial_ref.data()[k * nDOF_trial_element], h_old); + ck.valFromDOF(hu_dof_old.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hu_old); + ck.valFromDOF(hv_dof_old.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hv_old); ck.valFromDOF(heta_dof_old.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], heta_old); - ck.valFromDOF(hw_dof_old.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hw_old); - ck.valFromDOF(hbeta_dof_old.data(), &vel_l2g[eN_nDOF_trial_element], - &vel_trial_ref[k * nDOF_trial_element], hbeta_old); + &vel_trial_ref.data()[k * nDOF_trial_element], heta_old); + ck.valFromDOF(hw_dof_old.data(), &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hw_old); + ck.valFromDOF(hbeta_dof_old.data(), + &vel_l2g.data()[eN_nDOF_trial_element], + &vel_trial_ref.data()[k * nDOF_trial_element], hbeta_old); // calculate cell based CFL to keep a reference - calculateCFL(elementDiameter[eN], g, h_old, hu_old, hv_old, hEps, + calculateCFL(elementDiameter.data()[eN], g, h_old, hu_old, hv_old, hEps, q_cfl[eN_k]); // precalculate test function products with integration weights for (int j = 0; j < nDOF_trial_element; j++) @@ -1422,16 +1188,361 @@ class GN_SW2DCV : public GN_SW2DCV_base { if (SECOND_CALL_CALCULATE_RESIDUAL == 0) // This is to save some time { + ///////////////////////////////////////////////////// + // ********** FIRST SET OF LOOP ON DOFs ********** // + ///////////////////////////////////////////////////// + // To compute: + // * Local bounds for limiting + // * Low order solution (in terms of bar states) + + // Here we declare the arrays for local bounds + std::valarray urelax(0.0, numDOFsPerEqn), + drelax(0.0, numDOFsPerEqn); + std::valarray delta_Sqd_h(0.0, numDOFsPerEqn), + bar_deltaSqd_h(0.0, numDOFsPerEqn), + delta_Sqd_heta(0.0, numDOFsPerEqn), + bar_deltaSqd_heta(0.0, numDOFsPerEqn), + delta_Sqd_kin(0.0, numDOFsPerEqn), + bar_deltaSqd_kin(0.0, numDOFsPerEqn); + xt::pyarray kin(numDOFsPerEqn), max_of_h_and_hEps(numDOFsPerEqn); + + // Define kinetic energy, kin = 1/2 q^2 / h + max_of_h_and_hEps = xt::where(h_dof_old > hEps, h_dof_old, hEps); + kin = 0.5 * (hu_dof_old * hu_dof_old + hv_dof_old * hv_dof_old); + kin *= 2.0 * h_dof_old / + (h_dof_old * h_dof_old + max_of_h_and_hEps * max_of_h_and_hEps); + + /* First loop to define: urelax, drelax, delta_Sqd_h, delta_Sqd_heta, + * delta_Sqd_kin */ + for (int i = 0; i < numDOFsPerEqn; i++) { + urelax[i] = + 1.0 + + std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); + drelax[i] = + 1.0 - + std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; + if (i != j) { + delta_Sqd_h[i] += h_dof_old[i] - h_dof_old[j]; + delta_Sqd_heta[i] += heta_dof_old[i] - heta_dof_old[j]; + delta_Sqd_kin[i] += kin[i] - kin[j]; + } + } // j loop ends here + } // i loops ends here + + // Stuff for bar states here (BT = BarTilde) + std::valarray hBT(0.0, dH_minus_dL.size()), + huBT(0.0, dH_minus_dL.size()), hvBT(0.0, dH_minus_dL.size()), + hetaBT(0.0, dH_minus_dL.size()), hwBT(0.0, dH_minus_dL.size()), + hbetaBT(0.0, dH_minus_dL.size()); + + /* Second loop to compute bar states (variable)BT */ + int ij = 0; + for (int i = 0; i < numDOFsPerEqn; i++) { + + // define things at ith node + double hi = h_dof_old[i]; + double hui = hu_dof_old[i]; + double hvi = hv_dof_old[i]; + double hetai = heta_dof_old[i]; + double hwi = hw_dof_old[i]; + double hbetai = hbeta_dof_old[i]; + double Zi = b_dof[i]; + double mi = lumped_mass_matrix[i]; + double one_over_hiReg = + 2.0 * hi / (hi * hi + std::pow(fmax(hi, hEps), 2)); + double ui = hui * one_over_hiReg; + double vi = hvi * one_over_hiReg; + double etai = hetai * one_over_hiReg; + double meshSizei = std::sqrt(mi); + + // We define pTilde at ith node here + double diff_over_h_i = (hetai - hi * hi) * one_over_hiReg; + double pTildei = -(LAMBDA_MGN * g / (3.0 * meshSizei)) * 6.0 * hi * + (hetai - hi * hi); + + if (IF_BOTH_GAMMA_BRANCHES) { + if (hetai > std::pow(hi, 2.0)) { + pTildei = -(LAMBDA_MGN * g / (3.0 * meshSizei)) * 2.0 * + diff_over_h_i * (etai * etai + etai * hi + hi * hi); + } + } + + // define full pressure at ith node for definition of bar states + double pressure_i = 0.5 * g * hi * hi + pTildei; + + // loop over the sparsity pattern of the i-th DOF + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; + + // define things at jth node + double hj = h_dof_old[j]; + double huj = hu_dof_old[j]; + double hvj = hv_dof_old[j]; + double hetaj = heta_dof_old[j]; + double hwj = hw_dof_old[j]; + double hbetaj = hbeta_dof_old[j]; + double Zj = b_dof[j]; + double one_over_hjReg = + 2.0 * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); + double uj = huj * one_over_hjReg; + double vj = hvj * one_over_hjReg; + double etaj = hetaj * one_over_hjReg; + double mj = lumped_mass_matrix[j]; + double meshSizej = std::sqrt(mj); // local mesh size in 2d + + // Here we define pTilde at jth node + double diff_over_h_j = (hetaj - hj * hj) * one_over_hjReg; + double pTildej = -(LAMBDA_MGN * g / (3.0 * meshSizej)) * 6.0 * hj * + (hetaj - hj * hj); + + if (IF_BOTH_GAMMA_BRANCHES) { + if (hetaj > std::pow(hj, 2.0)) { + pTildej = -(LAMBDA_MGN * g / (3.0 * meshSizej)) * 2.0 * + diff_over_h_j * (etaj * etaj + etaj * hj + hj * hj); + } + } + + // define pressure at jth node for bar states + double pressure_j = 0.5 * g * hj * hj + pTildej; + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = hui * hStarij * one_over_hiReg; + double hvStarij = hvi * hStarij * one_over_hiReg; + double hetaStarij = hetai * std::pow(hStarij * one_over_hiReg, 2); + double hwStarij = hwi * hStarij * one_over_hiReg; + double hbetaStarij = hbetai * hStarij * one_over_hiReg; + + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = huj * hStarji * one_over_hjReg; + double hvStarji = hvj * hStarji * one_over_hjReg; + double hetaStarji = hetaj * std::pow(hStarji * one_over_hjReg, 2); + double hwStarji = hwj * hStarji * one_over_hjReg; + double hbetaStarji = hbetaj * hStarji * one_over_hjReg; + + // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin + double muLowij = 0., muLij = 0., dLowij = 0., dLij = 0.; + if (i != j) { + // Put these computations first before it gets messy + bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; + bar_deltaSqd_heta[i] += delta_Sqd_heta[j] + delta_Sqd_heta[i]; + bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; + + if (lstage == 0) + dLowij = dLow[ij]; + else { + double cij_norm = sqrt(Cx[ij] * Cx[ij] + Cy[ij] * Cy[ij]); + double cji_norm = sqrt(CTx[ij] * CTx[ij] + CTy[ij] * CTy[ij]); + double nxij = Cx[ij] / cij_norm, nyij = Cy[ij] / cij_norm; + double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; + dLowij = + fmax(maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, + hvi, hetai, mi, hj, huj, + hvj, hetaj, mj, hEps) * + cij_norm, + maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, + hvj, hetaj, mj, hi, hui, + hvi, hetai, mi, hEps) * + cji_norm); + } + // save dLij + dLij = dLowij; + + // compute muij + muLij = fmax(fmax(0., -(ui * Cx[ij] + vi * Cy[ij])), + fmax(0., (uj * Cx[ij] + vj * Cy[ij]))); + + // Define dLij as max of dLij and muLij + dLij = fmax(dLowij, muLij); + dLow[ij] = fmax(dLij, muLij); + + //////////////////////// + // COMPUTE BAR STATES // + //////////////////////// + double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, + hvBar_ij = 0, hvTilde_ij = 0, hetaBar_ij = 0, + hetaTilde_ij = 0, hwBar_ij = 0, hwTilde_ij = 0, + hbetaBar_ij = 0, hbetaTilde_ij = 0; + + // h component + hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hj - ui * hi) * Cx[ij] + + (vj * hj - vi * hi) * Cy[ij]) + + 0.5 * (hj + hi); + hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hStarji - hj) - (hStarij - hi)); + // hu component + huBar_ij = + -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + + (vj * huj - vi * hui) * Cy[ij]) + + 0.5 * (huj + hui); + huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((huStarji - huj) - (huStarij - hui)); + // hv component + hvBar_ij = + -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hvj - ui * hvi) * Cx[ij] + + (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + + 0.5 * (hvj + hvi); + hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hvStarji - hvj) - (hvStarij - hvi)); + // heta component + hetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hetaj - ui * hetai) * Cx[ij] + + (vj * hetaj - vi * hetai) * Cy[ij]) + + 0.5 * (hetaj + hetai); + hetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hetaStarji - hetaj) - (hetaStarij - hetai)); + // hw component + hwBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hwj - ui * hwi) * Cx[ij] + + (vj * hwj - vi * hwi) * Cy[ij]) + + 0.5 * (hwj + hwi); + hwTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hwStarji - hwj) - (hwStarij - hwi)); + // hbeta component + hbetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hbetaj - ui * hbetai) * Cx[ij] + + (vj * hbetaj - vi * hbetai) * Cy[ij]) + + 0.5 * (hbetaj + hbetai); + hbetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hbetaStarji - hbetaj) - (hbetaStarij - hbetai)); + + // Here we define uBar + uTilde + hBT[ij] = hBar_ij + hTilde_ij; + huBT[ij] = huBar_ij + huTilde_ij; + hvBT[ij] = hvBar_ij + hvTilde_ij; + hetaBT[ij] = hetaBar_ij + hetaTilde_ij; + hwBT[ij] = hwBar_ij + hwTilde_ij; + hbetaBT[ij] = hbetaBar_ij + hbetaTilde_ij; + } else { + // i==j + // Bar states by definition satisfy Utilde_ii + Ubar_ii = U_i + hBT[ij] = hi; + huBT[ij] = hui; + hvBT[ij] = hvi; + hetaBT[ij] = hetai; + hwBT[ij] = hwi; + hbetaBT[ij] = hbetai; + } + + // UPDATE ij // + ij += 1; + } // j loop ends here + + // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin + bar_deltaSqd_h[i] = + bar_deltaSqd_h[i] / + (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1) / + 2.0; + bar_deltaSqd_heta[i] = + bar_deltaSqd_heta[i] / + (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1) / + 2.0; + bar_deltaSqd_kin[i] = + bar_deltaSqd_kin[i] / + (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1) / + 2.0; + + } // i loops ends here + + /* Then final loop of first set to get local bounds */ + ij = 0; + for (int i = 0; i < numDOFsPerEqn; i++) { + + // define m_i + double mi = lumped_mass_matrix[i]; + + /* Initialize hmin, hmax, heta_min, heta_max */ + h_min[i] = h_dof_old[i]; + h_max[i] = h_dof_old[i]; + heta_min[i] = heta_dof_old[i]; + heta_max[i] = heta_dof_old[i]; + + /* Initialize low order solution */ + hLow[i] = h_dof_old[i]; + huLow[i] = hu_dof_old[i]; + hvLow[i] = hv_dof_old[i]; + hetaLow[i] = heta_dof_old[i]; + hwLow[i] = hw_dof_old[i]; + hbetaLow[i] = hbeta_dof_old[i]; + kin_max[i] = kin[i]; + + // loop in j (sparsity pattern) + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + + int j = csrColumnOffsets_DofLoops[offset]; + + double psi_ij = 0; + double one_over_hBT = + 2.0 * hBT[ij] / + (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); + psi_ij = one_over_hBT * (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / + 2.0; // Eqn (6.31) + + // COMPUTE LOCAL BOUNDS // + kin_max[i] = fmax(psi_ij, kin_max[i]); + h_min[i] = std::min(h_min[i], hBT[ij]); + h_max[i] = std::max(h_max[i], hBT[ij]); + heta_min[i] = std::min(heta_min[i], hetaBT[ij]); + heta_max[i] = std::max(heta_max[i], hetaBT[ij]); + + // Then do relaxation of bounds here. If confused, see convex + // limiting paper + kin_max[i] = + std::min(urelax[i] * kin_max[i], + kin_max[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); + h_min[i] = std::max(drelax[i] * h_min[i], + h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); + h_max[i] = std::min(urelax[i] * h_max[i], + h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); + heta_min[i] = + std::max(drelax[i] * heta_min[i], + heta_min[i] - std::abs(bar_deltaSqd_heta[i]) / 2.0); + heta_max[i] = + std::min(urelax[i] * heta_max[i], + heta_max[i] + std::abs(bar_deltaSqd_heta[i]) / 2.0); + + /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ + // This is low order solution WITHOUT sources + if (i != j) { + hLow[i] += h_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hBT[ij]); + huLow[i] += hu_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * huBT[ij]); + hvLow[i] += hv_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hvBT[ij]); + hetaLow[i] += heta_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hetaBT[ij]); + hwLow[i] += hw_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hwBT[ij]); + hbetaLow[i] += hbeta_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hbetaBT[ij]); + } + // UPDATE ij // + ij += 1; + } // j loop ends here + + // clean up hLow from round off error + if (hLow[i] < hEps) + hLow[i] = 0.0; + } // i loop ends here - /////////////////////////////////////////////// - // ********** FIRST LOOP ON DOFs ********** // - /////////////////////////////////////////////// + //////////////////////////////////////////////////////// + // ********** Second set of loops on dofs ********** // + /////////////////////////////////////////////////////// // To compute: // * Hyperbolic part of the flux // * Extended source terms // * Smoothness indicator - int ij = 0; + ij = 0; std::valarray hyp_flux_h(numDOFsPerEqn), hyp_flux_hu(numDOFsPerEqn), hyp_flux_hv(numDOFsPerEqn), hyp_flux_heta(numDOFsPerEqn), hyp_flux_hw(numDOFsPerEqn), @@ -1439,7 +1550,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { etaMax(numDOFsPerEqn), etaMin(numDOFsPerEqn); for (int i = 0; i < numDOFsPerEqn; i++) { - // solution at time tn for the ith DOF double hi = h_dof_old[i]; double hui = hu_dof_old[i]; @@ -1482,7 +1592,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { fmax(hi_to_the_gamma, xi * g * n2 * dt * veli_norm))); extendedSourceTerm_hu[i] = friction_aux * hui; extendedSourceTerm_hv[i] = friction_aux * hvi; - // For use in the convex limiting functionT + // For use in the convex limiting function new_SourceTerm_hu[i] = -friction_aux * hui; new_SourceTerm_hv[i] = -friction_aux * hvi; } @@ -1652,7 +1762,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { ij = 0; for (int i = 0; i < numDOFsPerEqn; i++) { - double hi = h_dof_old[i]; double hui = hu_dof_old[i]; double hvi = hv_dof_old[i]; @@ -1764,17 +1873,19 @@ class GN_SW2DCV : public GN_SW2DCV_base { double cji_norm = sqrt(CTx[ij] * CTx[ij] + CTy[ij] * CTy[ij]); double nxij = Cx[ij] / cij_norm, nyij = Cy[ij] / cij_norm; double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; - dLowij = fmax(maxWaveSpeedSharpInitialGuess( - g, nxij, nyij, hi, hui, hvi, hetai, mi, hj, huj, - hvj, hetaj, mj, hEps, hEps, false) * - cij_norm, - maxWaveSpeedSharpInitialGuess( - g, nxji, nyji, hj, huj, hvj, hetaj, mj, hi, hui, - hvi, hetai, mi, hEps, hEps, false) * - cji_norm); + dLowij = + fmax(maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, + hvi, hetai, mi, hj, huj, + hvj, hetaj, mj, hEps) * + cij_norm, + maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, + hvj, hetaj, mj, hi, hui, + hvi, hetai, mi, hEps) * + cji_norm); } // this is standard low-order dij, can you use dLij = - // dLowij*fmax(psi[i],psi[j]) if want smoothness based as low order + // dLowij*fmax(psi[i],psi[j]) if want smoothness based as low + // order dLij = dLowij; /////////////////////////////////////// @@ -1791,67 +1902,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { // Then save dLow for limiting step, maybe a bit confusing dLow[ij] = fmax(dLij, muLij); - //////////////////////// - // COMPUTE BAR STATES // - //////////////////////// - double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, - hvBar_ij = 0, hvTilde_ij = 0, hetaBar_ij = 0, - hetaTilde_ij = 0, hwBar_ij = 0, hwTilde_ij = 0, - hbetaBar_ij = 0, hbetaTilde_ij = 0; - - // h component - hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hj - ui * hi) * Cx[ij] + - (vj * hj - vi * hi) * Cy[ij]) + - 0.5 * (hj + hi); - hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hStarji - hj) - (hStarij - hi)); - // hu component - huBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + - (vj * huj - vi * hui) * Cy[ij]) + - 0.5 * (huj + hui); - huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((huStarji - huj) - (huStarij - hui)); - // hv component - hvBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hvj - ui * hvi) * Cx[ij] + - (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + - 0.5 * (hvj + hvi); - hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hvStarji - hvj) - (hvStarij - hvi)); - // heta component - hetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hetaj - ui * hetai) * Cx[ij] + - (vj * hetaj - vi * hetai) * Cy[ij]) + - 0.5 * (hetaj + hetai); - hetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hetaStarji - hetaj) - (hetaStarij - hetai)); - // hw component - hwBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hwj - ui * hwi) * Cx[ij] + - (vj * hwj - vi * hwi) * Cy[ij]) + - 0.5 * (hwj + hwi); - hwTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hwStarji - hwj) - (hwStarij - hwi)); - // hbeta component - hbetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hbetaj - ui * hbetai) * Cx[ij] + - (vj * hbetaj - vi * hbetai) * Cy[ij]) + - 0.5 * (hbetaj + hbetai); - hbetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hbetaStarji - hbetaj) - (hbetaStarij - hbetai)); - - // Here we define uBar + uTilde - hBT[ij] = hBar_ij + hTilde_ij; - huBT[ij] = huBar_ij + huTilde_ij; - hvBT[ij] = hvBar_ij + hvTilde_ij; - hetaBT[ij] = hetaBar_ij + hetaTilde_ij; - hwBT[ij] = hwBar_ij + hwTilde_ij; - hbetaBT[ij] = hbetaBar_ij + hbetaTilde_ij; - /////////////////////// // ENTROPY VISCOSITY // /////////////////////// @@ -1892,13 +1942,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { // Uj-Ui will be zero muH_minus_muL[ij] = 0.; // Not true but the prod of this times // Uj-Ui will be zero - // Bar states by definition satisfy Utilde_ii + Ubar_ii = U_i - hBT[ij] = hi; - huBT[ij] = hui; - hvBT[ij] = hvi; - hetaBT[ij] = hetai; - hwBT[ij] = hwi; - hbetaBT[ij] = hbetai; } // update ij @@ -2031,28 +2074,34 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); + xt::pyarray &mesh_velocity_dof = + args.array("mesh_velocity_dof"); double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -2064,13 +2113,11 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -2081,18 +2128,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &heta_dof = args.array("heta_dof"); xt::pyarray &hw_dof = args.array("hw_dof"); xt::pyarray &hbeta_dof = args.array("hbeta_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &heta_dof_sge = args.array("heta_dof_sge"); - xt::pyarray &hw_dof_sge = args.array("hw_dof_sge"); - xt::pyarray &hbeta_dof_sge = args.array("hbeta_dof_sge"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -2113,24 +2148,28 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &csrRowIndeces_h_h = args.array("csrRowIndeces_h_h"); xt::pyarray &csrColumnOffsets_h_h = args.array("csrColumnOffsets_h_h"); - xt::pyarray &csrRowIndeces_h_hu = args.array("csrRowIndeces_h_hu"); + xt::pyarray &csrRowIndeces_h_hu = + args.array("csrRowIndeces_h_hu"); xt::pyarray &csrColumnOffsets_h_hu = args.array("csrColumnOffsets_h_hu"); - xt::pyarray &csrRowIndeces_h_hv = args.array("csrRowIndeces_h_hv"); + xt::pyarray &csrRowIndeces_h_hv = + args.array("csrRowIndeces_h_hv"); xt::pyarray &csrColumnOffsets_h_hv = args.array("csrColumnOffsets_h_hv"); xt::pyarray &csrRowIndeces_h_heta = args.array("csrRowIndeces_h_heta"); xt::pyarray &csrColumnOffsets_h_heta = args.array("csrColumnOffsets_h_heta"); - xt::pyarray &csrRowIndeces_h_hw = args.array("csrRowIndeces_h_hw"); + xt::pyarray &csrRowIndeces_h_hw = + args.array("csrRowIndeces_h_hw"); xt::pyarray &csrColumnOffsets_h_hw = args.array("csrColumnOffsets_h_hw"); xt::pyarray &csrRowIndeces_h_hbeta = args.array("csrRowIndeces_h_hbeta"); xt::pyarray &csrColumnOffsets_h_hbeta = args.array("csrColumnOffsets_h_hbeta"); - xt::pyarray &csrRowIndeces_hu_h = args.array("csrRowIndeces_hu_h"); + xt::pyarray &csrRowIndeces_hu_h = + args.array("csrRowIndeces_hu_h"); xt::pyarray &csrColumnOffsets_hu_h = args.array("csrColumnOffsets_hu_h"); xt::pyarray &csrRowIndeces_hu_hu = @@ -2153,7 +2192,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { args.array("csrRowIndeces_hu_hbeta"); xt::pyarray &csrColumnOffsets_hu_hbeta = args.array("csrColumnOffsets_hu_hbeta"); - xt::pyarray &csrRowIndeces_hv_h = args.array("csrRowIndeces_hv_h"); + xt::pyarray &csrRowIndeces_hv_h = + args.array("csrRowIndeces_hv_h"); xt::pyarray &csrColumnOffsets_hv_h = args.array("csrColumnOffsets_hv_h"); xt::pyarray &csrRowIndeces_hv_hu = @@ -2200,7 +2240,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { args.array("csrRowIndeces_heta_hbeta"); xt::pyarray &csrColumnOffsets_heta_hbeta = args.array("csrColumnOffsets_heta_hbeta"); - xt::pyarray &csrRowIndeces_hw_h = args.array("csrRowIndeces_hw_h"); + xt::pyarray &csrRowIndeces_hw_h = + args.array("csrRowIndeces_hw_h"); xt::pyarray &csrColumnOffsets_hw_h = args.array("csrColumnOffsets_hw_h"); xt::pyarray &csrRowIndeces_hw_hu = @@ -2280,7 +2321,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); @@ -2401,28 +2443,34 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); + xt::pyarray &mesh_velocity_dof = + args.array("mesh_velocity_dof"); double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -2434,13 +2482,11 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -2448,15 +2494,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &h_dof = args.array("h_dof"); xt::pyarray &hu_dof = args.array("hu_dof"); xt::pyarray &hv_dof = args.array("hv_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -2478,21 +2515,25 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &csrRowIndeces_h_h = args.array("csrRowIndeces_h_h"); xt::pyarray &csrColumnOffsets_h_h = args.array("csrColumnOffsets_h_h"); - xt::pyarray &csrRowIndeces_h_hu = args.array("csrRowIndeces_h_hu"); + xt::pyarray &csrRowIndeces_h_hu = + args.array("csrRowIndeces_h_hu"); xt::pyarray &csrColumnOffsets_h_hu = args.array("csrColumnOffsets_h_hu"); - xt::pyarray &csrRowIndeces_h_hv = args.array("csrRowIndeces_h_hv"); + xt::pyarray &csrRowIndeces_h_hv = + args.array("csrRowIndeces_h_hv"); xt::pyarray &csrColumnOffsets_h_hv = args.array("csrColumnOffsets_h_hv"); xt::pyarray &csrRowIndeces_h_heta = args.array("csrRowIndeces_h_heta"); xt::pyarray &csrColumnOffsets_h_heta = args.array("csrColumnOffsets_h_heta"); - xt::pyarray &csrRowIndeces_h_hw = args.array("csrRowIndeces_h_hw"); + xt::pyarray &csrRowIndeces_h_hw = + args.array("csrRowIndeces_h_hw"); xt::pyarray &csrColumnOffsets_h_hw = args.array("csrColumnOffsets_h_hw"); // hu - xt::pyarray &csrRowIndeces_hu_h = args.array("csrRowIndeces_hu_h"); + xt::pyarray &csrRowIndeces_hu_h = + args.array("csrRowIndeces_hu_h"); xt::pyarray &csrColumnOffsets_hu_h = args.array("csrColumnOffsets_hu_h"); xt::pyarray &csrRowIndeces_hu_hu = @@ -2512,7 +2553,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &csrColumnOffsets_hu_hw = args.array("csrColumnOffsets_hu_hw"); // hv - xt::pyarray &csrRowIndeces_hv_h = args.array("csrRowIndeces_hv_h"); + xt::pyarray &csrRowIndeces_hv_h = + args.array("csrRowIndeces_hv_h"); xt::pyarray &csrColumnOffsets_hv_h = args.array("csrColumnOffsets_hv_h"); xt::pyarray &csrRowIndeces_hv_hu = @@ -2553,7 +2595,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &csrColumnOffsets_heta_hw = args.array("csrColumnOffsets_heta_hw"); // hw - xt::pyarray &csrRowIndeces_hw_h = args.array("csrRowIndeces_hw_h"); + xt::pyarray &csrRowIndeces_hw_h = + args.array("csrRowIndeces_hw_h"); xt::pyarray &csrColumnOffsets_hw_h = args.array("csrColumnOffsets_hw_h"); xt::pyarray &csrRowIndeces_hw_hu = @@ -2608,7 +2651,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); diff --git a/proteus/mprans/GN_SW2DCV.py b/proteus/mprans/GN_SW2DCV.py index 0d0818ce15..352ec03dc0 100644 --- a/proteus/mprans/GN_SW2DCV.py +++ b/proteus/mprans/GN_SW2DCV.py @@ -88,7 +88,6 @@ def choose_dt(self): argsDict["csrRowIndeces_DofLoops"] = rowptr_cMatrix argsDict["csrColumnOffsets_DofLoops"] = colind_cMatrix argsDict["hEps"] = self.transport.hEps - argsDict["hReg"] = self.transport.hReg argsDict["Cx"] = Cx argsDict["Cy"] = Cy argsDict["CTx"] = CTx @@ -96,7 +95,6 @@ def choose_dt(self): argsDict["dLow"] = self.transport.dLow argsDict["run_cfl"] = self.runCFL argsDict["edge_based_cfl"] = self.transport.edge_based_cfl - argsDict["debug"] = 0 adjusted_maxCFL = self.transport.dsw_2d.calculateEdgeBasedCFL(argsDict) maxCFL = max(maxCFL, max(adjusted_maxCFL, @@ -266,12 +264,11 @@ def setFromOptions(self, nOptions): class Coefficients(proteus.TransportCoefficients.TC_base): """ - The coefficients for the modified Green-Naghdi equations (dispersive SWEs) + The coefficients for the modified Serre-Green-Naghdi equations (dispersive SWEs) """ def __init__(self, bathymetry, - nu=1.004e-6, g=9.8, nd=2, sd=True, @@ -291,7 +288,6 @@ def __init__(self, self.useRBLES = useRBLES self.useMetrics = useMetrics self.sd = sd - self.nu = nu self.g = g self.nd = nd self.cE = cE @@ -416,7 +412,6 @@ def preStep(self, t, firstStep=False): # Init reflectingBoundaryIndex for partial reflecting boundaries self.model.reflectingBoundaryIndex = np.where(np.isin(self.model.mesh.nodeMaterialTypes, 99))[0].tolist() - # then redefine as numpy array self.model.reflectingBoundaryIndex = np.array(self.model.reflectingBoundaryIndex) # self.model.h_dof_old[:] = self.model.u[0].dof @@ -619,12 +614,6 @@ def __init__(self, # To compute edge_based_cfl from within choose_dt of RKEV self.edge_based_cfl = np.zeros(self.u[0].dof.shape) self.dLow = None - self.hBT = None - self.huBT = None - self.hvBT = None - self.hetaBT = None - self.hwBT = None - self.hbetaBT = None # Old DOFs # NOTE (Mql): It is important to link h_dof_old by reference with u[0].dof (and so on). # This is because I need the initial condition to be passed to them as well (before calling calculateResidual). @@ -639,12 +628,6 @@ def __init__(self, # Vector for mass matrix self.check_positivity_water_height = True # mesh - self.h_dof_sge = self.u[0].dof.copy() - self.hu_dof_sge = self.u[1].dof.copy() - self.hv_dof_sge = self.u[2].dof.copy() - self.heta_dof_sge = self.u[3].dof.copy() - self.hw_dof_sge = self.u[4].dof.copy() - self.hbeta_dof_sge = self.u[5].dof.copy() self.q['x'] = np.zeros((self.mesh.nElements_global, self.nQuadraturePoints_element, 3), 'd') self.ebqe['x'] = np.zeros((self.mesh.nExteriorElementBoundaries_global, self.nElementBoundaryQuadraturePoints_elementBoundary, 3), 'd') self.ebq_global[('totalFlux', 0)] = np.zeros((self.mesh.nElementBoundaries_global, self.nElementBoundaryQuadraturePoints_elementBoundary), 'd') @@ -807,7 +790,21 @@ def __init__(self, # Global C Matrices (mql) self.cterm_global = None self.cterm_transpose_global = None - # For FCT + # For convex limiting + self.dH_minus_dL = None + self.muH_minus_muL = None + self.size_of_domain = None + self.hLow = None + self.huLow = None + self.hvLow = None + self.hetaLow = None + self.hwLow = None + self.hbetaLow = None + self.h_min = None + self.h_max = None + self.heta_min = None + self.heta_max = None + self.kin_max = None self.extendedSourceTerm_hu = None self.extendedSourceTerm_hv = None self.extendedSourceTerm_heta = None @@ -820,10 +817,6 @@ def __init__(self, # for EV self.dij_small = None self.global_entropy_residual = None - - self.dH_minus_dL = None - self.muH_minus_muL = None - self.size_of_domain = None # for relaxation of bounds # NORMALS self.COMPUTE_NORMALS = 1 self.normalx = None @@ -1026,20 +1019,23 @@ def FCTStep(self): argsDict["dH_minus_dL"] = self.dH_minus_dL argsDict["muH_minus_muL"] = self.muH_minus_muL argsDict["hEps"] = self.hEps - argsDict["hReg"] = self.hReg argsDict["LUMPED_MASS_MATRIX"] = self.coefficients.LUMPED_MASS_MATRIX argsDict["dLow"] = self.dLow - argsDict["hBT"] = self.hBT - argsDict["huBT"] = self.huBT - argsDict["hvBT"] = self.hvBT - argsDict["hetaBT"] = self.hetaBT - argsDict["hwBT"] = self.hwBT - argsDict["hbetaBT"] = self.hbetaBT argsDict["new_SourceTerm_hu"] = self.new_SourceTerm_hu argsDict["new_SourceTerm_hv"] = self.new_SourceTerm_hv argsDict["new_SourceTerm_heta"] = self.new_SourceTerm_heta argsDict["new_SourceTerm_hw"] = self.new_SourceTerm_hw - argsDict["size_of_domain"] = self.size_of_domain + argsDict["hLow"] = self.hLow + argsDict["huLow"] = self.huLow + argsDict["hvLow"] = self.hvLow + argsDict["hetaLow"] = self.hetaLow + argsDict["hwLow"] = self.hwLow + argsDict["hbetaLow"] = self.hbetaLow + argsDict["h_min"] = self.h_min + argsDict["h_max"] = self.h_max + argsDict["heta_min"] = self.heta_min + argsDict["heta_max"] = self.heta_max + argsDict["kin_max"] = self.kin_max self.dsw_2d.convexLimiting(argsDict) # Pass the post processed hnp1 solution to global solution u @@ -1059,8 +1055,6 @@ def computeEV(self): argsDict["h_dof_old"] = self.h_dof_old argsDict["hu_dof_old"] = self.hu_dof_old argsDict["hv_dof_old"] = self.hv_dof_old - argsDict["heta_dof_old"] = self.heta_dof_old - argsDict["hw_dof_old"] = self.hw_dof_old argsDict["b_dof"] = self.coefficients.b.dof argsDict["Cx"] = self.Cx argsDict["Cy"] = self.Cy @@ -1355,17 +1349,22 @@ def initDataStructures(self): # boundary Index: I do this in preStep since I need normalx and normaly to be initialized first # Allocate space for dLow (for the first stage in the SSP method) self.dLow = np.zeros(self.Cx.shape, 'd') - self.hBT = np.zeros(self.Cx.shape, 'd') - self.huBT = np.zeros(self.Cx.shape, 'd') - self.hvBT = np.zeros(self.Cx.shape, 'd') - self.hetaBT = np.zeros(self.Cx.shape, 'd') - self.hwBT = np.zeros(self.Cx.shape, 'd') - self.hbetaBT = np.zeros(self.Cx.shape, 'd') # get coordinates of DOFs self.getDOFsCoord() # some vectors for convex limiting self.dH_minus_dL = np.zeros(self.Cx.shape, 'd') self.muH_minus_muL = np.zeros(self.Cx.shape, 'd') + self.hLow = np.zeros(self.u[0].dof.shape, 'd') + self.huLow = np.zeros(self.u[0].dof.shape, 'd') + self.hvLow = np.zeros(self.u[0].dof.shape, 'd') + self.hetaLow = np.zeros(self.u[0].dof.shape, 'd') + self.hwLow = np.zeros(self.u[0].dof.shape, 'd') + self.hbetaLow = np.zeros(self.u[0].dof.shape, 'd') + self.h_min = np.zeros(self.u[0].dof.shape, 'd') + self.h_max = np.zeros(self.u[0].dof.shape, 'd') + self.heta_min = np.zeros(self.u[0].dof.shape, 'd') + self.heta_max = np.zeros(self.u[0].dof.shape, 'd') + self.kin_max = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_hu = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_hv = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_heta = np.zeros(self.u[0].dof.shape, 'd') @@ -1384,6 +1383,51 @@ def initDataStructures(self): nghosts = self.u[0].par_dof.nghosts subdomain2global=self.u[0].femSpace.dofMap.subdomain2global # + self.par_hLow = LAT.ParVec_petsc4py(self.hLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_huLow = LAT.ParVec_petsc4py(self.huLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hvLow = LAT.ParVec_petsc4py(self.hvLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hetaLow = LAT.ParVec_petsc4py(self.hetaLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hwLow = LAT.ParVec_petsc4py(self.hwLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hbetaLow = LAT.ParVec_petsc4py(self.hbetaLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_h_min = LAT.ParVec_petsc4py(self.h_min, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_h_max = LAT.ParVec_petsc4py(self.h_max, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_heta_min = LAT.ParVec_petsc4py(self.heta_min, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_heta_max = LAT.ParVec_petsc4py(self.heta_max, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_kin_max = LAT.ParVec_petsc4py(self.kin_max, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + # self.par_extendedSourceTerm_hu = LAT.ParVec_petsc4py(self.extendedSourceTerm_hu, bs=1, n=n,N=N,nghosts=nghosts, @@ -1420,6 +1464,7 @@ def initDataStructures(self): bs=1, n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) + # self.par_global_entropy_residual = LAT.ParVec_petsc4py(self.global_entropy_residual, bs=1, n=n,N=N,nghosts=nghosts, @@ -1494,13 +1539,12 @@ def getResidual(self, u, r): # lets call calculate EV first and distribute self.computeEV() + self.par_global_entropy_residual.scatter_forward_insert() argsDict = cArgumentsDict.ArgumentsDict() argsDict["mesh_trial_ref"] = self.u[0].femSpace.elementMaps.psi argsDict["mesh_grad_trial_ref"] = self.u[0].femSpace.elementMaps.grad_psi argsDict["mesh_dof"] = self.mesh.nodeArray - argsDict["mesh_velocity_dof"] = self.mesh.nodeVelocityArray - argsDict["MOVING_DOMAIN"] = self.MOVING_DOMAIN argsDict["mesh_l2g"] = self.mesh.elementNodesArray argsDict["dV_ref"] = self.elementQuadratureWeights[('u', 0)] argsDict["h_trial_ref"] = self.u[0].femSpace.psi @@ -1513,7 +1557,6 @@ def getResidual(self, u, r): argsDict["vel_grad_test_ref"] = self.u[1].femSpace.grad_psi argsDict["mesh_trial_trace_ref"] = self.u[0].femSpace.elementMaps.psi_trace argsDict["mesh_grad_trial_trace_ref"] = self.u[0].femSpace.elementMaps.grad_psi_trace - argsDict["dS_ref"] = self.elementBoundaryQuadratureWeights[('u', 0)] argsDict["h_trial_trace_ref"] = self.u[0].femSpace.psi_trace argsDict["h_grad_trial_trace_ref"] = self.u[0].femSpace.grad_psi_trace argsDict["h_test_trace_ref"] = self.u[0].femSpace.psi_trace @@ -1526,10 +1569,6 @@ def getResidual(self, u, r): argsDict["boundaryJac_ref"] = self.u[0].femSpace.elementMaps.boundaryJacobians argsDict["elementDiameter"] = self.elementDiameter argsDict["nElements_global"] = self.mesh.nElements_global - argsDict["useRBLES"] = self.coefficients.useRBLES - argsDict["useMetrics"] = self.coefficients.useMetrics - argsDict["alphaBDF"] = self.timeIntegration.alpha_bdf - argsDict["nu"] = self.coefficients.nu argsDict["g"] = self.coefficients.g argsDict["h_l2g"] = self.u[0].femSpace.dofMap.l2g argsDict["vel_l2g"] = self.u[1].femSpace.dofMap.l2g @@ -1546,19 +1585,6 @@ def getResidual(self, u, r): argsDict["heta_dof"] = self.u[3].dof argsDict["hw_dof"] = self.u[4].dof argsDict["hbeta_dof"] = self.u[5].dof - argsDict["h_dof_sge"] = self.h_dof_sge - argsDict["hu_dof_sge"] = self.hu_dof_sge - argsDict["hv_dof_sge"] = self.hv_dof_sge - argsDict["heta_dof_sge"] = self.heta_dof_sge - argsDict["hw_dof_sge"] = self.hw_dof_sge - argsDict["hbeta_dof_sge"] = self.hbeta_dof_sge - argsDict["q_mass_acc"] = self.timeIntegration.m_tmp[0] - argsDict["q_mom_hu_acc"] = self.timeIntegration.m_tmp[1] - argsDict["q_mom_hv_acc"] = self.timeIntegration.m_tmp[2] - argsDict["q_mass_adv"] = self.q[('f', 0)] - argsDict["q_mass_acc_beta_bdf"] = self.timeIntegration.beta_bdf[0] - argsDict["q_mom_hu_acc_beta_bdf"] = self.timeIntegration.beta_bdf[1] - argsDict["q_mom_hv_acc_beta_bdf"] = self.timeIntegration.beta_bdf[2] argsDict["q_cfl"] = self.q[('cfl', 0)] argsDict["sdInfo_hu_hu_rowptr"] = self.coefficients.sdInfo[(1, 1)][0] argsDict["sdInfo_hu_hu_colind"] = self.coefficients.sdInfo[(1, 1)][1] @@ -1618,7 +1644,6 @@ def getResidual(self, u, r): argsDict["cfl_run"] = self.timeIntegration.runCFL argsDict["eps"] = self.eps argsDict["hEps"] = self.hEps - argsDict["hReg"] = self.hReg argsDict["hnp1_at_quad_point"] = self.q[('u', 0)] argsDict["hunp1_at_quad_point"] = self.q[('u', 1)] argsDict["hvnp1_at_quad_point"] = self.q[('u', 2)] @@ -1643,12 +1668,6 @@ def getResidual(self, u, r): argsDict["normalx"] = self.normalx argsDict["normaly"] = self.normaly argsDict["dLow"] = self.dLow - argsDict["hBT"] = self.hBT - argsDict["huBT"] = self.huBT - argsDict["hvBT"] = self.hvBT - argsDict["hetaBT"] = self.hetaBT - argsDict["hwBT"] = self.hwBT - argsDict["hbetaBT"] = self.hbetaBT argsDict["lstage"] = self.timeIntegration.lstage argsDict["new_SourceTerm_hu"] = self.new_SourceTerm_hu argsDict["new_SourceTerm_hv"] = self.new_SourceTerm_hv @@ -1656,12 +1675,36 @@ def getResidual(self, u, r): argsDict["new_SourceTerm_hw"] = self.new_SourceTerm_hw argsDict["global_entropy_residual"] = self.global_entropy_residual argsDict["dij_small"] = self.dij_small + argsDict["hLow"] = self.hLow + argsDict["huLow"] = self.huLow + argsDict["hvLow"] = self.hvLow + argsDict["hetaLow"] = self.hetaLow + argsDict["hwLow"] = self.hwLow + argsDict["hbetaLow"] = self.hbetaLow + argsDict["h_min"] = self.h_min + argsDict["h_max"] = self.h_max + argsDict["heta_min"] = self.heta_min + argsDict["heta_max"] = self.heta_max + argsDict["kin_max"] = self.kin_max + argsDict["size_of_domain"] = self.size_of_domain # call calculate residual - self.par_global_entropy_residual.scatter_forward_insert() self.calculateResidual(argsDict) - # distribute source terms + # distribute local bounds and low order solutions (with bar states) + self.par_hLow.scatter_forward_insert() + self.par_huLow.scatter_forward_insert() + self.par_hvLow.scatter_forward_insert() + self.par_hetaLow.scatter_forward_insert() + self.par_hwLow.scatter_forward_insert() + self.par_hbetaLow.scatter_forward_insert() + self.par_h_min.scatter_forward_insert() + self.par_h_max.scatter_forward_insert() + self.par_heta_min.scatter_forward_insert() + self.par_heta_max.scatter_forward_insert() + self.par_kin_max.scatter_forward_insert() + + # distribute source terms (not sure if needed) self.par_extendedSourceTerm_hu.scatter_forward_insert() self.par_extendedSourceTerm_hv.scatter_forward_insert() self.par_extendedSourceTerm_heta.scatter_forward_insert() @@ -1705,7 +1748,7 @@ def getResidual(self, u, r): global_dofN = self.offset[cj] + self.stride[cj] * index r[global_dofN] = 0. # - logEvent("Global residual Disp_SWEs: ", level=9, data=r) + logEvent("Global residual hyperbolic SGN: ", level=9, data=r) # mwf decide if this is reasonable for keeping solver statistics self.nonlinear_function_evaluations += 1 @@ -1743,10 +1786,6 @@ def getJacobian(self, jacobian): argsDict["boundaryJac_ref"] = self.u[0].femSpace.elementMaps.boundaryJacobians argsDict["elementDiameter"] = self.elementDiameter argsDict["nElements_global"] = self.mesh.nElements_global - argsDict["useRBLES"] = self.coefficients.useRBLES - argsDict["useMetrics"] = self.coefficients.useMetrics - argsDict["alphaBDF"] = self.timeIntegration.alpha_bdf - argsDict["nu"] = self.coefficients.nu argsDict["g"] = self.coefficients.g argsDict["h_l2g"] = self.u[0].femSpace.dofMap.l2g argsDict["vel_l2g"] = self.u[1].femSpace.dofMap.l2g @@ -1757,15 +1796,6 @@ def getJacobian(self, jacobian): argsDict["heta_dof"] = self.u[3].dof argsDict["hw_dof"] = self.u[4].dof argsDict["hbeta_dof"] = self.u[5].dof - argsDict["h_dof_sge"] = self.h_dof_sge - argsDict["hu_dof_sge"] = self.hu_dof_sge - argsDict["hv_dof_sge"] = self.hv_dof_sge - argsDict["heta_dof_sge"] = self.heta_dof_sge - argsDict["hw_dof_sge"] = self.hw_dof_sge - argsDict["hbeta_dof_sge"] = self.hbeta_dof_sge - argsDict["q_mass_acc_beta_bdf"] = self.timeIntegration.beta_bdf[0] - argsDict["q_mom_hu_acc_beta_bdf"] = self.timeIntegration.beta_bdf[1] - argsDict["q_mom_hv_acc_beta_bdf"] = self.timeIntegration.beta_bdf[2] argsDict["q_cfl"] = self.q[('cfl', 0)] argsDict["sdInfo_hu_hu_rowptr"] = self.coefficients.sdInfo[(1, 1)][0] argsDict["sdInfo_hu_hu_colind"] = self.coefficients.sdInfo[(1, 1)][1] @@ -2017,12 +2047,6 @@ def calculateSolutionAtQuadrature(self): pass def calculateAuxiliaryQuantitiesAfterStep(self): - self.h_dof_sge[:] = self.u[0].dof - self.hu_dof_sge[:] = self.u[1].dof - self.hv_dof_sge[:] = self.u[2].dof - self.heta_dof_sge[:] = self.u[3].dof - self.hw_dof_sge[:] = self.u[4].dof - self.hbeta_dof_sge[:] = self.u[5].dof OneLevelTransport.calculateAuxiliaryQuantitiesAfterStep(self) def getForce(self, cg, forceExtractionFaces, force, moment): diff --git a/proteus/tests/SWFlow/conical_island.py b/proteus/tests/SWFlow/conical_island.py index 698c8cbb71..e0fa4d7129 100644 --- a/proteus/tests/SWFlow/conical_island.py +++ b/proteus/tests/SWFlow/conical_island.py @@ -57,10 +57,6 @@ nnx = None nny = None -#domain.MeshOptions.nn = nn -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - ############################### # CONSTANTS NEEDED FOR SETUP # ############################### @@ -124,6 +120,15 @@ class y_mom_at_t0(object): def uOfXT(self, X, t): return 0. +""" +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. +""" + class heta_at_t0(object): def uOfXT(self, X, t): h = water_height_at_t0().uOfXT(X, t) diff --git a/proteus/tests/SWFlow/dSWEs_steady_state.py b/proteus/tests/SWFlow/dSWEs_steady_state.py index 2277c32cfa..31c858f1d6 100644 --- a/proteus/tests/SWFlow/dSWEs_steady_state.py +++ b/proteus/tests/SWFlow/dSWEs_steady_state.py @@ -10,12 +10,12 @@ import proteus.SWFlow.SWFlowProblem as SWFlowProblem """ -This is the steady state problem for to the dispersive Serre--Saint-Venant +This is the steady state problem for to the dispersive Serre-Green-Nagdhi equations (or dispersive shallow water equations). We use the Bernoulli relation to derive the bathymetry profile where we assume the water height is given by h = h0 + a h0 sech(r*(x-x0))^2. The variables are defined below. See 'Hyperbolic Relaxation Technique -For Solving The Dispersive Serre--Saint-Venant Equations With Topography' +For Solving The Dispersive Serre Equations With Topography' by Guermond, Kees, Popov, Tovar for more details. Note that this is a fake 1D problem, ie we are doing simulation in 2d but only consider x dominated flow. """ @@ -44,8 +44,7 @@ nny = old_div((nnx - 1), 10) + 1 he = old_div(L[0], float(nnx - 1)) triangleOptions = "pAq30Dena%f" % (0.5 * he**2,) -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny + ############################### # CONSTANTS NEEDED FOR SETUP # ############################### @@ -92,11 +91,12 @@ def uOfXT(self, X, t): return 0. """ -heta and hw are needed for the modified green naghdi equations. +heta and hw are needed for the hyperbolic serre-green-naghdi equations. For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. -Note that the BCs for the heta and hw should be same as h. -For more details see: '' by Guermond, Popov, Tovar, Kees. -JCP 2020. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): def uOfXT(self, X, t): @@ -179,5 +179,4 @@ def hbeta_DBC(X, flag): initialConditions=initialConditions, boundaryConditions=boundaryConditions, bathymetry=bathymetry_function) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 -mySWFlowProblem.physical_parameters['mannings'] = 0 +mySWFlowProblem.physical_parameters['mannings'] = 0.0 diff --git a/proteus/tests/SWFlow/dam3Bumps.py b/proteus/tests/SWFlow/dam3Bumps.py index 2bd32d340f..e90c25e4d9 100644 --- a/proteus/tests/SWFlow/dam3Bumps.py +++ b/proteus/tests/SWFlow/dam3Bumps.py @@ -48,9 +48,6 @@ nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - ###################### ##### BATHYMETRY ##### ###################### @@ -83,6 +80,15 @@ class Zero(object): def uOfXT(self, x, t): return 0.0 +""" +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. +""" + class heta_at_t0(object): def uOfXT(self, X, t): h = water_height_at_t0().uOfXT(X, t) @@ -141,4 +147,4 @@ def y_mom_DBC(X, flag): bathymetry=bathymetry_function) mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = opts.mannings -mySWFlowProblem.physical_parameters['cE'] = 2.0 +mySWFlowProblem.physical_parameters['cE'] = 1.0 diff --git a/proteus/tests/SWFlow/mach_flow.py b/proteus/tests/SWFlow/mach_flow.py index c68bdec48f..7932efbc6d 100644 --- a/proteus/tests/SWFlow/mach_flow.py +++ b/proteus/tests/SWFlow/mach_flow.py @@ -52,8 +52,6 @@ domain.MeshOptions.triangleOptions = "pAq30Dena%f" % (0.5 * opts.he**2,) nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny ########################################## # DEFINE INITIAL CONSTANTS AND FUNCTIONS # @@ -93,12 +91,12 @@ def uOfXT(self, X, t): """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2*div(u). -Note that the BC flags for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): @@ -172,5 +170,4 @@ def hw_DBC(X, flag): boundaryConditions=boundaryConditions, reflectingBCs=opts.reflecting_BCs, bathymetry=bathymetry_function) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = opts.mannings diff --git a/proteus/tests/SWFlow/obstacle_flow.py b/proteus/tests/SWFlow/obstacle_flow.py index 236ca0cba6..866a16a9af 100644 --- a/proteus/tests/SWFlow/obstacle_flow.py +++ b/proteus/tests/SWFlow/obstacle_flow.py @@ -117,12 +117,12 @@ def uOfXT(self, X, t): """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2*div(u). -Note that the BC flags for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): @@ -177,12 +177,14 @@ def hw_DBC(X, flag): 'x_mom': x_mom_at_t0(), 'y_mom': y_mom_at_t0(), 'h_times_eta': heta_at_t0(), - 'h_times_w': hw_at_t0()} + 'h_times_w': hw_at_t0(), + 'h_times_beta':Zero()} boundaryConditions = {'water_height': h_DBC, 'x_mom': x_mom_DBC, 'y_mom': y_mom_DBC, 'h_times_eta': heta_DBC, - 'h_times_w': hw_DBC} + 'h_times_w': hw_DBC, + 'h_times_beta':x_mom_DBC} # if want to use reflecting conditions on all boundaries switch above to # boundaryConditions = {'water_height': lambda x, flag: None, # 'x_mom': lambda x, flag: None, @@ -203,5 +205,4 @@ def hw_DBC(X, flag): reflectingBCs=opts.reflecting_BCs, bathymetry=bathymetry_function, genMesh=False) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = opts.mannings diff --git a/proteus/tests/SWFlow/parab1D.py b/proteus/tests/SWFlow/parab1D.py index 8f4543ea81..a87b911f98 100644 --- a/proteus/tests/SWFlow/parab1D.py +++ b/proteus/tests/SWFlow/parab1D.py @@ -37,9 +37,6 @@ he = old_div(L[0],float(nnx-1)) triangleOptions="pAq30Dena%f" % (0.5*he**2,) -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - ###################### ##### BATHYMETRY ##### ###################### diff --git a/proteus/tests/SWFlow/reef_island_runup.py b/proteus/tests/SWFlow/reef_island_runup.py index 17a390f184..af47174243 100644 --- a/proteus/tests/SWFlow/reef_island_runup.py +++ b/proteus/tests/SWFlow/reef_island_runup.py @@ -58,8 +58,7 @@ domain.MeshOptions.triangleOptions = "pAq30Dena%f" % (0.5 * opts.he**2,) nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny + ############################### # CONSTANTS NEEDED FOR SETUP # ############################### @@ -143,6 +142,14 @@ def uOfXT(self, X, t): h = max(hTilde - bathymetry_function(X), 0.) return h * c * old_div(hTilde - h0, hTilde) +""" +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. +""" class heta_at_t0(object): def uOfXT(self, X, t): @@ -232,7 +239,6 @@ def y_mom_DBC(X, flag): reflectingBCs=opts.reflecting_BCs, bathymetry=bathymetry_function, analyticalSolution=None) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = 0.0 if opts.want_gauges: mySWFlowProblem.auxiliaryVariables = [reefPointGauges] diff --git a/proteus/tests/SWFlow/runup_solitaryWave.py b/proteus/tests/SWFlow/runup_solitaryWave.py index db0c8f10b5..e58065f083 100644 --- a/proteus/tests/SWFlow/runup_solitaryWave.py +++ b/proteus/tests/SWFlow/runup_solitaryWave.py @@ -52,8 +52,7 @@ domain.MeshOptions.triangleOptions = "pAq30Dena%f" % (0.5 * opts.he**2,) nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny + ############################### # CONSTANTS NEEDED FOR SETUP # ############################### @@ -110,12 +109,12 @@ def uOfXT(self, X, t): """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2div(u). -Note that the BCs for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ @@ -184,5 +183,4 @@ def x_mom_DBC(X, flag): initialConditions=initialConditions, boundaryConditions=boundaryConditions, bathymetry=bathymetry_function) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = opts.mannings diff --git a/proteus/tests/SWFlow/santos_step.py b/proteus/tests/SWFlow/santos_step.py index 31a90cbae0..f3c93e210a 100644 --- a/proteus/tests/SWFlow/santos_step.py +++ b/proteus/tests/SWFlow/santos_step.py @@ -52,9 +52,6 @@ nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - ################################## # SOLITARY WAVE FUCTION AND BATH # ################################## @@ -101,11 +98,12 @@ def uOfXT(self, X, t): return 0. """ -heta, hw and hbeta are needed for the dispersive Serre--Saint-Venant equations -(ie shallow water equations). For initial conditions, heta -> h^2, hw -> h^2*div(u), -hbeta->hu * grad(Z) (hbeta can just be 0 for simplicity). -For boundary conditions, heta and hw should have same flags as h and hbeta -same flags as hu. +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): diff --git a/proteus/tests/SWFlow/seawall.py b/proteus/tests/SWFlow/seawall.py index b7f5355dcf..8986765add 100644 --- a/proteus/tests/SWFlow/seawall.py +++ b/proteus/tests/SWFlow/seawall.py @@ -50,10 +50,6 @@ nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - - ############################### # CONSTANTS NEEDED FOR SETUP # ############################### @@ -113,12 +109,12 @@ def uOfXT(self, X, t): """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2div(u). -Note that the BCs for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): @@ -174,5 +170,4 @@ def x_mom_DBC(X, flag): boundaryConditions=boundaryConditions, reflectingBCs=opts.reflecting_BCs, bathymetry=bathymetry_function) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = opts.mannings diff --git a/proteus/tests/SWFlow/solitary_wave.py b/proteus/tests/SWFlow/solitary_wave.py index 567b77dfe2..29fee28233 100644 --- a/proteus/tests/SWFlow/solitary_wave.py +++ b/proteus/tests/SWFlow/solitary_wave.py @@ -49,8 +49,7 @@ domain.MeshOptions.triangleOptions = "pAq30Dena%f" % (0.5 * opts.he**2,) nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny + ################################## # SOLITARY WAVE FUCTION AND BATH # ################################## @@ -95,12 +94,12 @@ def uOfXT(self, X, t): return 0. """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2div(u). -Note that the BCs for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): diff --git a/proteus/tests/SWFlow/transcritical_bump.py b/proteus/tests/SWFlow/transcritical_bump.py index 20f049c4af..3c1730922c 100644 --- a/proteus/tests/SWFlow/transcritical_bump.py +++ b/proteus/tests/SWFlow/transcritical_bump.py @@ -10,7 +10,7 @@ """ -This is a simple benchmark of a solitary wave propagating over a flat bottom. +This is transcritical flow over a bump with a hydraulic jump. """ # *************************** # @@ -50,10 +50,6 @@ nnx = None nny = None -domain.MeshOptions.nnx = nnx -domain.MeshOptions.nny = nny - - ########################################## # DEFINE INITIAL CONSTANTS AND FUNCTIONS # ########################################## @@ -94,12 +90,12 @@ def uOfXT(self, X, t): """ -heta and hw are needed for the modified green naghdi equations. -For initial conditions, heta -> h^2 and hw -> h^2*div(u). -Note that the BC flags for the heta and hw should be same as h. -For more details see: 'Robust explicit relaxation techinque for solving -the Green-Naghdi equations' by Guermond, Popov, Tovar, Kees. -JCP 2019 +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. """ class heta_at_t0(object): @@ -167,5 +163,4 @@ def hw_DBC(X, flag): initialConditions=initialConditions, boundaryConditions=boundaryConditions, bathymetry=bathymetry_function) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = 0.0 diff --git a/proteus/tests/SWFlow/wet_well_balancing.py b/proteus/tests/SWFlow/wet_well_balancing.py index 9012e5bd01..a4e53054c7 100644 --- a/proteus/tests/SWFlow/wet_well_balancing.py +++ b/proteus/tests/SWFlow/wet_well_balancing.py @@ -92,6 +92,14 @@ class y_mom_at_t0(object): def uOfXT(self, X, t): return 0. +""" +heta and hw are needed for the hyperbolic serre-green-naghdi equations. +For initial conditions, heta -> h^2, hbeta->q(dot)grad(Z), hw -> h^2div(u)+3/2*hbeta. +It's often okay to take hbeta=0. Note that the BCs for the heta and hw should be same as h +and BCs for hbeta should be same as x_mom. +For more details see: 'Hyperbolic relaxation technique for solving the dispersive Serre Equations +with topography' by Guermond, Popov, Tovar, Kees. +""" class heta_at_t0(object): def uOfXT(self, X, t): @@ -103,6 +111,10 @@ class hw_at_t0(object): def uOfXT(self, X, t): return 0. +class hbeta_at_t0(object): + def uOfXT(self, X, t): + return 0. + ############################### ##### BOUNDARY CONDITIONS ##### ############################### @@ -133,12 +145,14 @@ def y_mom_DBC(X, flag): 'x_mom': x_mom_DBC, 'y_mom': y_mom_DBC, 'h_times_eta': lambda x, flag: None, - 'h_times_w': lambda x, flag: None} + 'h_times_w': lambda x, flag: None, + 'h_times_beta': x_mom_DBC} analytical_Solution = {'h_exact': water_height_at_t0(), 'hu_exact': x_mom_at_t0(), 'hv_exact': y_mom_at_t0(), 'heta_exact': heta_at_t0(), - 'hw_exact': hw_at_t0()} + 'hw_exact': hw_at_t0(), + 'hbeta_exact': hbeta_at_t0()} # ********************************************* # # ********** Create my SWFlowProblem ********** # # ********************************************* # @@ -155,5 +169,4 @@ def y_mom_DBC(X, flag): reflectingBCs=opts.reflecting_BCs, bathymetry=bathymetry_function, analyticalSolution=analytical_Solution) -mySWFlowProblem.physical_parameters['LINEAR_FRICTION'] = 0 mySWFlowProblem.physical_parameters['mannings'] = 0.0 From 704a2dcc7e6a0bf7b28a69d0483e39cef2238cb0 Mon Sep 17 00:00:00 2001 From: ejtovar Date: Thu, 11 Feb 2021 16:30:46 -0600 Subject: [PATCH 02/11] in the middle of fixing limiting to match TAMU code --- proteus/mprans/GN_SW2DCV.h | 104 ++++++++++--------------------------- 1 file changed, 28 insertions(+), 76 deletions(-) diff --git a/proteus/mprans/GN_SW2DCV.h b/proteus/mprans/GN_SW2DCV.h index d76fef8a0a..33b7a2bd73 100644 --- a/proteus/mprans/GN_SW2DCV.h +++ b/proteus/mprans/GN_SW2DCV.h @@ -410,24 +410,10 @@ class GN_SW2DCV : public GN_SW2DCV_base { /* Here we compute the limiters */ ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors - double high_order_hnp1i = high_order_hnp1[i]; - double high_order_hunp1i = high_order_hunp1[i]; - double high_order_hvnp1i = high_order_hvnp1[i]; - double high_order_hetanp1i = high_order_hetanp1[i]; - double high_order_hwnp1i = high_order_hwnp1[i]; - double high_order_hbetanp1i = high_order_hbetanp1[i]; - double hi = h_old[i]; - double huni = hu_old[i]; - double hvni = hv_old[i]; - double hetani = heta_old[i]; - double hwni = hw_old[i]; - double hbetani = hbeta_old[i]; - double Zi = b_dof[i]; + // read in lumped mass mastrix double mi = lumped_mass_matrix[i]; - double one_over_hiReg = - 2 * hi / (hi * hi + std::pow(fmax(hi, hEps), 2)); // hEps + // initialize lij * Aij double ith_Limiter_times_FluxCorrectionMatrix1 = 0.; double ith_Limiter_times_FluxCorrectionMatrix2 = 0.; double ith_Limiter_times_FluxCorrectionMatrix3 = 0.; @@ -443,32 +429,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { int j = csrColumnOffsets_DofLoops[offset]; - // read some vectors - double hj = h_old[j]; - double hunj = hu_old[j]; - double hvnj = hv_old[j]; - double hetanj = heta_old[j]; - double hwnj = hw_old[j]; - double hbetanj = hbeta_old[j]; - double Zj = b_dof[j]; - double one_over_hjReg = - 2 * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); // hEps - - // COMPUTE STAR SOLUTION // hStar, huStar, hvStar, hetaStar, and - // hwStar, hbetaStar - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = huni * hStarij * one_over_hiReg; - double hvStarij = hvni * hStarij * one_over_hiReg; - double hetaStarij = hetani * std::pow(hStarij * one_over_hiReg, 2); - double hwStarij = hwni * hStarij * one_over_hiReg; - double hbetaStarij = hbetani * hStarij * one_over_hiReg; - - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = hunj * hStarji * one_over_hjReg; - double hvStarji = hvnj * hStarji * one_over_hjReg; - double hetaStarji = hetanj * std::pow(hStarji * one_over_hjReg, 2); - double hwStarji = hwnj * hStarji * one_over_hjReg; - double hbetaStarji = hbetanj * hStarji * one_over_hjReg; // Compute limiter based on water height if (FCT_h[ij] >= 0) { @@ -583,25 +543,24 @@ class GN_SW2DCV : public GN_SW2DCV_base { abort(); } else { // clean up uHigh from round off error - // if (limited_hnp1[i] < hEps) { - // limited_hnp1[i] = 0.0; - // limited_hetanp1[i] = 0.0; - // } - - // double aux = fmax(limited_hnp1[i], hEps); - // limited_hunp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - // std::pow(aux, VEL_FIX_POWER)); - // limited_hvnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - // std::pow(aux, VEL_FIX_POWER)); - // limited_hwnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / - // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - // std::pow(aux, VEL_FIX_POWER)); - // limited_hbetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) - // / - // (std::pow(limited_hnp1[i], VEL_FIX_POWER) + - // std::pow(aux, VEL_FIX_POWER)); + if (limited_hnp1[i] < hEps) { + limited_hnp1[i] = 0.0; + limited_hetanp1[i] = 0.0; + } + + double aux = fmax(limited_hnp1[i], hEps); + limited_hunp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + std::pow(aux, VEL_FIX_POWER)); + limited_hvnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + std::pow(aux, VEL_FIX_POWER)); + limited_hwnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + std::pow(aux, VEL_FIX_POWER)); + limited_hbetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + std::pow(aux, VEL_FIX_POWER)); } } @@ -794,24 +753,17 @@ class GN_SW2DCV : public GN_SW2DCV_base { double vj = hvj * one_over_hjReg; // auxiliary functions to compute fluxes - double aux_h = (uj * hj) * Cx[ij] + (vj * hj) * Cy[ij]; - double aux_hu = (uj * huj) * Cx[ij] + (vj * huj) * Cy[ij]; - double aux_hv = (uj * hvj) * Cx[ij] + (vj * hvj) * Cy[ij]; - // double aux_h = - // (uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]; - // double aux_hu = - // (uj * huj - ui * hui) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]; - // double aux_hv = - // (uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi) * Cy[ij]; + double aux_h = + (uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]; + double aux_hu = + (uj * huj - ui * hui) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]; + double aux_hv = + (uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi) * Cy[ij]; // flux for entropy ith_flux_term1 += aux_h; - ith_flux_term2 += - aux_hu + 0.5 * g * hj * hj * - Cx[ij]; // g * hi * (hj + 0.) * Cx[ij]; // NOTE: Zj=0 - ith_flux_term3 += - aux_hv + 0.5 * g * hj * hj * - Cy[ij]; // g * hi * (hj + 0.) * Cy[ij]; // NOTE: Zj=0 + ith_flux_term2 += aux_hu + 0.5 * g * hj * hj * Cx[ij]; + ith_flux_term3 += aux_hv + 0.5 * g * hj * hj * Cy[ij]; // NOTE: WE CONSIDER FLAT BOTTOM entropy_flux += From c258e7458f7cb1d08363c143f8918be2dff23a0a Mon Sep 17 00:00:00 2001 From: ejtovar Date: Mon, 15 Feb 2021 23:13:05 -0600 Subject: [PATCH 03/11] limiting is now correct. however this exploited the parallel bug. np=1 does not give same results as np>1 --- proteus/mprans/GN_SW2DCV.h | 412 ++++++++------ proteus/mprans/GN_SW2DCV.py | 121 ++++- proteus/mprans/SW2DCV.h | 1002 +++++++++++++++++++---------------- proteus/mprans/SW2DCV.py | 188 ++++--- 4 files changed, 1012 insertions(+), 711 deletions(-) diff --git a/proteus/mprans/GN_SW2DCV.h b/proteus/mprans/GN_SW2DCV.h index 33b7a2bd73..759de4febf 100644 --- a/proteus/mprans/GN_SW2DCV.h +++ b/proteus/mprans/GN_SW2DCV.h @@ -272,75 +272,84 @@ class GN_SW2DCV : public GN_SW2DCV_base { int j = csrColumnOffsets_DofLoops[offset]; - // Read some vectors - double hj = h_old[j]; - double hunj = hu_old[j]; - double hvnj = hv_old[j]; - double hetanj = heta_old[j]; - double hwnj = hw_old[j]; - double hbetanj = hbeta_old[j]; - double Zj = b_dof[j]; - double one_over_hjReg = - 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); - - // Compute star states - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = huni * hStarij * one_over_hiReg; - double hvStarij = hvni * hStarij * one_over_hiReg; - double hetaStarij = hetani * std::pow(hStarij * one_over_hiReg, 2); - double hwStarij = hwni * hStarij * one_over_hiReg; - double hbetaStarij = hbetani * hStarij * one_over_hiReg; - - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = hunj * hStarji * one_over_hjReg; - double hvStarji = hvnj * hStarji * one_over_hjReg; - double hetaStarji = hetanj * std::pow(hStarji * one_over_hjReg, 2); - double hwStarji = hwnj * hStarji * one_over_hjReg; - double hbetaStarji = hbetanj * hStarji * one_over_hjReg; - - // i-th row of flux correction matrix - double ML_minus_MC = (LUMPED_MASS_MATRIX == 1 - ? 0. - : (i == j ? 1. : 0.) * mi - MassMatrix[ij]); - - FCT_h[ij] = - ML_minus_MC * (high_order_hnp1[j] - hj - (high_order_hnp1i - hi)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hStarji - hStarij) + - dt * muH_minus_muL[ij] * (hj - hi); - - FCT_hu[ij] = - ML_minus_MC * - (high_order_hunp1[j] - hunj - (high_order_hunp1i - huni)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (huStarji - huStarij) + - dt * muH_minus_muL[ij] * (hunj - huni); - - FCT_hv[ij] = - ML_minus_MC * - (high_order_hvnp1[j] - hvnj - (high_order_hvnp1i - hvni)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hvStarji - hvStarij) + - dt * muH_minus_muL[ij] * (hvnj - hvni); - - FCT_heta[ij] = ML_minus_MC * (high_order_hetanp1[j] - hetanj - - (high_order_hetanp1i - hetani)) + + if (i != j) { + // Read some vectors + double hj = h_old[j]; + double hunj = hu_old[j]; + double hvnj = hv_old[j]; + double hetanj = heta_old[j]; + double hwnj = hw_old[j]; + double hbetanj = hbeta_old[j]; + double Zj = b_dof[j]; + double one_over_hjReg = + 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = huni * hStarij * one_over_hiReg; + double hvStarij = hvni * hStarij * one_over_hiReg; + double hetaStarij = hetani * std::pow(hStarij * one_over_hiReg, 2); + double hwStarij = hwni * hStarij * one_over_hiReg; + double hbetaStarij = hbetani * hStarij * one_over_hiReg; + + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = hunj * hStarji * one_over_hjReg; + double hvStarji = hvnj * hStarji * one_over_hjReg; + double hetaStarji = hetanj * std::pow(hStarji * one_over_hjReg, 2); + double hwStarji = hwnj * hStarji * one_over_hjReg; + double hbetaStarji = hbetanj * hStarji * one_over_hjReg; + + // i-th row of flux correction matrix + double ML_minus_MC = (LUMPED_MASS_MATRIX == 1 + ? 0. + : (i == j ? 1. : 0.) * mi - MassMatrix[ij]); + + FCT_h[ij] = + ML_minus_MC * + (high_order_hnp1[j] - hj - (high_order_hnp1i - hi)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hStarji - hStarij) + + dt * muH_minus_muL[ij] * (hj - hi); + + FCT_hu[ij] = ML_minus_MC * (high_order_hunp1[j] - hunj - + (high_order_hunp1i - huni)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (huStarji - huStarij) + + dt * muH_minus_muL[ij] * (hunj - huni); + + FCT_hv[ij] = ML_minus_MC * (high_order_hvnp1[j] - hvnj - + (high_order_hvnp1i - hvni)) + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * - (hetaStarji - hetaStarij) + - dt * muH_minus_muL[ij] * (hetanj - hetani); + (hvStarji - hvStarij) + + dt * muH_minus_muL[ij] * (hvnj - hvni); - FCT_hw[ij] = - ML_minus_MC * - (high_order_hwnp1[j] - hwnj - (high_order_hwnp1i - hwni)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hwStarji - hwStarij) + - dt * muH_minus_muL[ij] * (hwnj - hwni); + FCT_heta[ij] = ML_minus_MC * (high_order_hetanp1[j] - hetanj - + (high_order_hetanp1i - hetani)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (hetaStarji - hetaStarij) + + dt * muH_minus_muL[ij] * (hetanj - hetani); - FCT_hbeta[ij] = ML_minus_MC * (high_order_hbetanp1[j] - hbetanj - - (high_order_hbetanp1i - hbetani)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * - (hbetaStarji - hbetaStarij) + - dt * muH_minus_muL[ij] * (hbetanj - hbetani); + FCT_hw[ij] = ML_minus_MC * (high_order_hwnp1[j] - hwnj - + (high_order_hwnp1i - hwni)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (hwStarji - hwStarij) + + dt * muH_minus_muL[ij] * (hwnj - hwni); + + FCT_hbeta[ij] = ML_minus_MC * (high_order_hbetanp1[j] - hbetanj - + (high_order_hbetanp1i - hbetani)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (hbetaStarji - hbetaStarij) + + dt * muH_minus_muL[ij] * (hbetanj - hbetani); + } else { + FCT_h[ij] = 0.0; + FCT_hu[ij] = 0.0; + FCT_hv[ij] = 0.0; + FCT_heta[ij] = 0.0; + FCT_hw[ij] = 0.0; + FCT_hbeta[ij] = 0.0; + } // UPDATE ij // ij += 1; - } // j loop ends here } // i loop ends here @@ -351,14 +360,15 @@ class GN_SW2DCV : public GN_SW2DCV_base { // Create Lij_array for initialization std::valarray Lij_array(1.0, dH_minus_dL.size()); + /* Loop over limiting iterations */ for (int limit_iter = 0; limit_iter < LIMITING_ITERATION; limit_iter++) { /* Loop to define FCT Rpos and Rneg values */ ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors - double mi = lumped_mass_matrix[i]; + double hi = h_old[i]; + double mi = lumped_mass_matrix[i]; // Initialize Pneg and Ppos quantities at ith node double Pnegi = 0., Pposi = 0.; double Pnegi_heta = 0., Pposi_heta = 0.; @@ -370,16 +380,18 @@ class GN_SW2DCV : public GN_SW2DCV_base { int j = csrColumnOffsets_DofLoops[offset]; // COMPUTE P VECTORS - Pnegi += FCT_h[ij] * ((FCT_h[ij] < 0) ? 1. : 0.); - Pposi += FCT_h[ij] * ((FCT_h[ij] > 0) ? 1. : 0.); - Pnegi_heta += FCT_heta[ij] * ((FCT_heta[ij] < 0) ? 1. : 0.); - Pposi_heta += FCT_heta[ij] * ((FCT_heta[ij] > 0) ? 1. : 0.); + Pnegi += FCT_h[ij] * ((FCT_h[ij] < 0.) ? 1. : 0.); + Pposi += FCT_h[ij] * ((FCT_h[ij] > 0.) ? 1. : 0.); + Pnegi_heta += FCT_heta[ij] * ((FCT_heta[ij] < 0.) ? 1. : 0.); + Pposi_heta += FCT_heta[ij] * ((FCT_heta[ij] > 0.) ? 1. : 0.); // UPDATE ij ij += 1; - } // j loop ends here + double psmall_h = 1E-14 * fmax(fabs(Pnegi), fabs(Pposi)); + double psmall_heta = 1E-14 * fmax(fabs(Pnegi_heta), fabs(Pposi_heta)); + /////////////////////// // COMPUTE Q VECTORS // /////////////////////// @@ -391,36 +403,46 @@ class GN_SW2DCV : public GN_SW2DCV_base { /////////////////////// // COMPUTE R VECTORS // /////////////////////// - if (high_order_hnp1[i] <= hEps) // hEps - { + if (hi <= hEps) { Rneg[i] = 0.; Rpos[i] = 0.; Rneg_heta[i] = 0.; Rpos_heta[i] = 0.; } else { - Rneg[i] = ((Pnegi == 0) ? 1. : std::min(1.0, Qnegi / Pnegi)); - Rpos[i] = ((Pposi == 0) ? 1. : std::min(1.0, Qposi / Pposi)); - Rneg_heta[i] = - ((Pnegi_heta == 0) ? 1. : std::min(1.0, Qnegi_heta / Pnegi_heta)); - Rpos_heta[i] = - ((Pposi_heta == 0) ? 1. : std::min(1.0, Qposi_heta / Pposi_heta)); + // for h + if (Pnegi >= -psmall_h) { + Rneg[i] = 1.0; + } else { + Rneg[i] = std::min(1.0, Qnegi / Pnegi); + } + if (Pposi <= psmall_h) { + Rpos[i] = 1.0; + } else { + Rpos[i] = std::min(1.0, Qposi / Pposi); + } + + // for heta + if (Pnegi_heta >= -psmall_heta) { + Rneg_heta[i] = 1.0; + } else { + Rneg_heta[i] = std::min(1.0, Qnegi_heta / Pnegi_heta); + } + if (Pposi_heta <= psmall_heta) { + Rpos_heta[i] = 1.0; + } else { + Rpos_heta[i] = std::min(1.0, Qposi_heta / Pposi_heta); + } } } // i loop ends here - /* Here we compute the limiters */ + // for limiting kinetic energy + auto KE_tiny = xt::amax(kin_max)[0] * hEps; + + /* Here we compute the limiters Lij_array */ ij = 0; for (int i = 0; i < numDOFs; i++) { - // read in lumped mass mastrix - double mi = lumped_mass_matrix[i]; - - // initialize lij * Aij - double ith_Limiter_times_FluxCorrectionMatrix1 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix2 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix3 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix4 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix5 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix6 = 0.; + double mi = lumped_mass_matrix[i]; double ci = kin_max[i] * hLow[i] - 0.5 * (huLow[i] * huLow[i] + hvLow[i] * hvLow[i]); // for KE lim. @@ -428,73 +450,123 @@ class GN_SW2DCV : public GN_SW2DCV_base { // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; - // Compute limiter based on water height - if (FCT_h[ij] >= 0) { - Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[j], Rpos[i])); - } else { - Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[i], Rpos[j])); - } + if (j != i) { + + // Compute limiter based on water height + if (FCT_h[ij] >= 0.) { + Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[j], Rpos[i])); + } else { + Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[i], Rpos[j])); + } + + // COMPUTE LIMITER based on heta + if (FCT_heta[ij] >= 0.) { + Lij_array[ij] = + fmin(Lij_array[ij], std::min(Rneg_heta[j], Rpos_heta[i])); + } else { + Lij_array[ij] = + fmin(Lij_array[ij], std::min(Rneg_heta[i], Rpos_heta[j])); + } - // COMPUTE LIMITER based on heta, note that we set lij = - // min(lij_h,lij_heta) - if (FCT_heta[ij] >= 0) { - Lij_array[ij] = - fmin(Lij_array[ij], std::min(Rneg_heta[j], Rpos_heta[i])); + /*======================================================*/ + /* KE limiting */ + double lambdaj = + csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; + double Ph_ij = FCT_h[ij] / mi / lambdaj; + double Phu_ij = FCT_hu[ij] / mi / lambdaj; + double Phv_ij = FCT_hv[ij] / mi / lambdaj; + + // Here we have some conditions for the KE limiting + + double KE_limiter = 1; + + // We first check if local kinetic energy > 0 + if (kin_max[i] * hLow[i] <= KE_tiny) { + KE_limiter = 0.; + } + + // We then check if KE bound is already satisfied + double hi_with_lijPij = hLow[i] + Lij_array[ij] * Ph_ij; + double hui_with_lijPij = huLow[i] + Lij_array[ij] * Phu_ij; + double hvi_with_lijPij = hvLow[i] + Lij_array[ij] * Phv_ij; + double psi = kin_max[i] * hi_with_lijPij - + 0.5 * (hui_with_lijPij * hui_with_lijPij + + hvi_with_lijPij * hvi_with_lijPij); + if (psi > -KE_tiny) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } + + /*======================================================*/ + + double ai = -0.5 * (Phu_ij * Phu_ij + Phv_ij * Phv_ij); + double bi = + kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); + double delta_i = bi * bi - 4. * ai * ci; + double ri = 1.; + + if (delta_i < 0. || ai >= -0.) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } else { + double neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; + KE_limiter = fmin(KE_limiter, neg_root_i); + } + + // root of jth-DOF (To compute transpose component) + double lambdai = + csrRowIndeces_DofLoops[j + 1] - csrRowIndeces_DofLoops[j] - 1; + double mj = lumped_mass_matrix[j]; + double cj = kin_max[j] * hLow[j] - + 0.5 * (huLow[j] * huLow[j] + hvLow[j] * hvLow[j]); + double Ph_ji = -FCT_h[ij] / mj / lambdai; // Aij=-Aji + double Phu_ji = -FCT_hu[ij] / mj / lambdai; + double Phv_ji = -FCT_hv[ij] / mj / lambdai; + double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); + double bj = + kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); + + double delta_j = bj * bj - 4. * aj * cj; + double rj = 1.; + + if (delta_j < 0. || aj >= -0.) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } else { + double neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; + KE_limiter = fmin(KE_limiter, neg_root_j); + } + + // Compute KE limiter + Lij_array[ij] = fmin(KE_limiter, Lij_array[ij]); + // Lij_array[ij] = fmin(fmin(fabs(ri), fabs(rj)), Lij_array[ij]); } else { - Lij_array[ij] = - fmin(Lij_array[ij], std::min(Rneg_heta[i], Rpos_heta[j])); + // if i = j then lij = 0 + Lij_array[ij] = 0.; } - double lambdaj = - csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; - double Ph_ij = FCT_h[ij] / mi / lambdaj; - double Phu_ij = FCT_hu[ij] / mi / lambdaj; - double Phv_ij = FCT_hv[ij] / mi / lambdaj; - - double ai = -0.5 * (Phu_ij * Phu_ij + Phv_ij * Phv_ij); - double bi = - kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); - - double r1 = ai == 0 - ? (bi == 0 ? 1. : -ci / bi) - : (-bi + std::sqrt(bi * bi - 4 * ai * ci)) / 2. / ai; - double r2 = ai == 0 - ? (bi == 0 ? 1. : -ci / bi) - : (-bi - std::sqrt(bi * bi - 4 * ai * ci)) / 2. / ai; - if (r1 < 0 && r2 < 0) { - r1 = Lij_array[ij]; - r2 = Lij_array[ij]; - } - double ri = fabs(fmax(r1, r2)); + // update ij + ij += 1; + } // end j loop + } // end i loop - // root of jth-DOF (To compute transpose component) - double lambdai = - csrRowIndeces_DofLoops[j + 1] - csrRowIndeces_DofLoops[j] - 1; - double mj = lumped_mass_matrix[j]; - double cj = kin_max[j] * hLow[j] - - 0.5 * (huLow[j] * huLow[j] + hvLow[j] * hvLow[j]); - double Ph_ji = -FCT_h[ij] / mj / lambdai; // Aij=-Aji - double Phu_ji = -FCT_hu[ij] / mj / lambdai; - double Phv_ji = -FCT_hv[ij] / mj / lambdai; - double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); - double bj = - kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); - - r1 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) - : (-bj + std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; - r2 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) - : (-bj - std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; - if (r1 < 0 && r2 < 0) { - r1 = Lij_array[ij]; - r2 = Lij_array[ij]; - } - double rj = fabs(fmax(r1, r2)); + /* Final loop to apply limiting and then define limited solution */ + ij = 0; + for (int i = 0; i < numDOFs; i++) { + + double one_over_mi = 1.0 / lumped_mass_matrix[i]; + double ith_Limiter_times_FluxCorrectionMatrix1 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix2 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix3 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix4 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix5 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix6 = 0.; - // COMPUTE LIMITER // - Lij_array[ij] = - fmin(fmin(ri, Lij_array[ij]), fmin(rj, Lij_array[ij])); + // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + + int j = csrColumnOffsets_DofLoops[offset]; // COMPUTE LIMITED FLUX // ith_Limiter_times_FluxCorrectionMatrix1 += Lij_array[ij] * FCT_h[ij]; @@ -508,22 +580,17 @@ class GN_SW2DCV : public GN_SW2DCV_base { // update ij ij += 1; - } // end j loop - // update ulow solution (which is passed in from function call) - double one_over_mi = 1.0 / lumped_mass_matrix[i]; + // then we add lij*Aij to uLow hLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix1; huLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix2; hvLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix3; hetaLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix4; hwLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix5; hbetaLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix6; - } // end i loop - // Final loop to define limited solution, maybe should vectorize? - for (int i = 0; i < numDOFs; i++) { - double one_over_mi = 1.0 / lumped_mass_matrix[i]; + // Finally define the limited solution limited_hnp1[i] = hLow[i]; limited_hunp1[i] = huLow[i] + dt * one_over_mi * new_SourceTerm_hu[i]; limited_hvnp1[i] = hvLow[i] + dt * one_over_mi * new_SourceTerm_hv[i]; @@ -547,7 +614,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { limited_hnp1[i] = 0.0; limited_hetanp1[i] = 0.0; } - + // double aux = fmax(limited_hnp1[i], hEps); limited_hunp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / (std::pow(limited_hnp1[i], VEL_FIX_POWER) + @@ -555,6 +622,9 @@ class GN_SW2DCV : public GN_SW2DCV_base { limited_hvnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / (std::pow(limited_hnp1[i], VEL_FIX_POWER) + std::pow(aux, VEL_FIX_POWER)); + limited_hetanp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / + (std::pow(limited_hnp1[i], VEL_FIX_POWER) + + std::pow(aux, VEL_FIX_POWER)); limited_hwnp1[i] *= 2 * std::pow(limited_hnp1[i], VEL_FIX_POWER) / (std::pow(limited_hnp1[i], VEL_FIX_POWER) + std::pow(aux, VEL_FIX_POWER)); @@ -562,7 +632,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { (std::pow(limited_hnp1[i], VEL_FIX_POWER) + std::pow(aux, VEL_FIX_POWER)); } - } + } // end i loop // update FCT matrices as Fct = (1 - Lij)*Fct FCT_h = (1.0 - Lij_array) * FCT_h; @@ -1012,6 +1082,8 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &heta_max = args.array("heta_max"); xt::pyarray &kin_max = args.array("kin_max"); double size_of_domain = args.scalar("size_of_domain"); + xt::pyarray &urelax = args.array("urelax"); + xt::pyarray &drelax = args.array("drelax"); // FOR FRICTION// double n2 = std::pow(mannings, 2.); double gamma = 4. / 3; @@ -1147,9 +1219,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { // * Local bounds for limiting // * Low order solution (in terms of bar states) - // Here we declare the arrays for local bounds - std::valarray urelax(0.0, numDOFsPerEqn), - drelax(0.0, numDOFsPerEqn); + // Here we declare some arrays for local bounds std::valarray delta_Sqd_h(0.0, numDOFsPerEqn), bar_deltaSqd_h(0.0, numDOFsPerEqn), delta_Sqd_heta(0.0, numDOFsPerEqn), @@ -1164,18 +1234,14 @@ class GN_SW2DCV : public GN_SW2DCV_base { kin *= 2.0 * h_dof_old / (h_dof_old * h_dof_old + max_of_h_and_hEps * max_of_h_and_hEps); - /* First loop to define: urelax, drelax, delta_Sqd_h, delta_Sqd_heta, - * delta_Sqd_kin */ + /* First loop to define: delta_Sqd_h, delta_Sqd_heta, delta_Sqd_kin */ for (int i = 0; i < numDOFsPerEqn; i++) { - urelax[i] = - 1.0 + - std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); - drelax[i] = - 1.0 - - std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); + for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; + if (i != j) { delta_Sqd_h[i] += h_dof_old[i] - h_dof_old[j]; delta_Sqd_heta[i] += heta_dof_old[i] - heta_dof_old[j]; @@ -1431,12 +1497,12 @@ class GN_SW2DCV : public GN_SW2DCV_base { int j = csrColumnOffsets_DofLoops[offset]; - double psi_ij = 0; double one_over_hBT = 2.0 * hBT[ij] / (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); - psi_ij = one_over_hBT * (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / - 2.0; // Eqn (6.31) + double psi_ij = + one_over_hBT * 0.5 * + (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]); // Eqn (6.31) // COMPUTE LOCAL BOUNDS // kin_max[i] = fmax(psi_ij, kin_max[i]); @@ -1482,8 +1548,10 @@ class GN_SW2DCV : public GN_SW2DCV_base { } // j loop ends here // clean up hLow from round off error - if (hLow[i] < hEps) + if (hLow[i] < hEps) { hLow[i] = 0.0; + hetaLow[i] = 0.0; + } } // i loop ends here //////////////////////////////////////////////////////// diff --git a/proteus/mprans/GN_SW2DCV.py b/proteus/mprans/GN_SW2DCV.py index 352ec03dc0..ce6544568e 100644 --- a/proteus/mprans/GN_SW2DCV.py +++ b/proteus/mprans/GN_SW2DCV.py @@ -269,7 +269,7 @@ class Coefficients(proteus.TransportCoefficients.TC_base): def __init__(self, bathymetry, - g=9.8, + g=9.81, nd=2, sd=True, movingDomain=False, @@ -787,24 +787,36 @@ def __init__(self, self.hReg = None self.ML = None # lumped mass matrix self.MC_global = None # consistent mass matrix - # Global C Matrices (mql) + ### Global C Matrices (mql) self.cterm_global = None self.cterm_transpose_global = None - # For convex limiting + ### For convex limiting + self.urelax = None + self.drelax = None self.dH_minus_dL = None self.muH_minus_muL = None self.size_of_domain = None + # self.hLow = None self.huLow = None self.hvLow = None self.hetaLow = None self.hwLow = None self.hbetaLow = None + # + self.limited_hnp1 = None + self.limited_hunp1 = None + self.limited_hvnp1 = None + self.limited_hetanp1 = None + self.limited_hwnp1 = None + self.limited_hbetanp1 = None + # self.h_min = None self.h_max = None self.heta_min = None self.heta_max = None self.kin_max = None + # self.extendedSourceTerm_hu = None self.extendedSourceTerm_hv = None self.extendedSourceTerm_heta = None @@ -814,10 +826,10 @@ def __init__(self, self.new_SourceTerm_hv = None self.new_SourceTerm_heta = None self.new_SourceTerm_hw = None - # for EV + ## for EV self.dij_small = None self.global_entropy_residual = None - # NORMALS + ## NORMALS self.COMPUTE_NORMALS = 1 self.normalx = None self.normaly = None @@ -857,7 +869,7 @@ def __init__(self, for ebN in range(self.mesh.nElementBoundaries_global): for k in range(self.nElementBoundaryQuadraturePoints_elementBoundary): self.ebq_global['penalty'][ebN, k] = old_div(self.numericalFlux.penalty_constant, - (self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)) + (self.mesh.elementBoundaryDiametersArray[ebN]**self.numericalFlux.penalty_power)) # penalty term # cek move to Numerical flux initialization if 'penalty' in self.ebqe: @@ -918,10 +930,6 @@ def __init__(self, self.u[cj].femSpace, dofBoundaryConditionsSetterDict[cj], weakDirichletConditions=False) compKernelFlag = 0 - # if self.coefficients.useConstantH: - # self.elementDiameter = self.mesh.elementDiametersArray.copy() - # self.elementDiameter[:] = max(self.mesh.elementDiametersArray) - # else: self.elementDiameter = self.mesh.elementDiametersArray print(self.nSpace_global, " nSpace_global") self.dsw_2d = cGN_SW2DCV_base(self.nSpace_global, @@ -980,9 +988,9 @@ def FCTStep(self): limited_hnp1 = np.zeros(self.h_dof_old.shape) limited_hunp1 = np.zeros(self.h_dof_old.shape) limited_hvnp1 = np.zeros(self.h_dof_old.shape) - limited_hetanp1 = np.zeros(self.h_dof_old.shape) - limited_hwnp1 = np.zeros(self.h_dof_old.shape) - limited_hbetanp1 = np.zeros(self.h_dof_old.shape) + # limited_hetanp1 = np.zeros(self.h_dof_old.shape) + # limited_hwnp1 = np.zeros(self.h_dof_old.shape) + # limited_hbetanp1 = np.zeros(self.h_dof_old.shape) argsDict = cArgumentsDict.ArgumentsDict() argsDict["dt"] = self.timeIntegration.dt @@ -1013,6 +1021,12 @@ def FCTStep(self): argsDict["limited_hetanp1"] = limited_hetanp1 argsDict["limited_hwnp1"] = limited_hwnp1 argsDict["limited_hbetanp1"] = limited_hbetanp1 + # argsDict["limited_hnp1"] = self.limited_hnp1 + # argsDict["limited_hunp1"] = self.limited_hunp1 + # argsDict["limited_hvnp1"] = self.limited_hvnp1 + # argsDict["limited_hetanp1"] = self.limited_hetanp1 + # argsDict["limited_hwnp1"] = self.limited_hwnp1 + # argsDict["limited_hbetanp1"] = self.limited_hbetanp1 argsDict["csrRowIndeces_DofLoops"] = rowptr argsDict["csrColumnOffsets_DofLoops"] = colind argsDict["MassMatrix"] = MassMatrix @@ -1038,6 +1052,14 @@ def FCTStep(self): argsDict["kin_max"] = self.kin_max self.dsw_2d.convexLimiting(argsDict) + # scatter forward + # self.par_limited_hnp1.scatter_forward_insert() + # self.par_limited_hunp1.scatter_forward_insert() + # self.par_limited_hvnp1.scatter_forward_insert() + # self.par_limited_hetanp1.scatter_forward_insert() + # self.par_limited_hwnp1.scatter_forward_insert() + # self.par_limited_hbetanp1.scatter_forward_insert() + # Pass the post processed hnp1 solution to global solution u self.timeIntegration.u[hIndex] = limited_hnp1 self.timeIntegration.u[huIndex] = limited_hunp1 @@ -1045,6 +1067,12 @@ def FCTStep(self): self.timeIntegration.u[hetaIndex] = limited_hetanp1 self.timeIntegration.u[hwIndex] = limited_hwnp1 self.timeIntegration.u[hbetaIndex] = limited_hbetanp1 + # self.timeIntegration.u[hIndex] = self.limited_hnp1 + # self.timeIntegration.u[huIndex] = self.limited_hunp1 + # self.timeIntegration.u[hvIndex] = self.limited_hvnp1 + # self.timeIntegration.u[hetaIndex] = self.limited_hetanp1 + # self.timeIntegration.u[hwIndex] = self.limited_hwnp1 + # self.timeIntegration.u[hbetaIndex] = self.limited_hbetanp1 def computeEV(self): entropy_residual = np.zeros(self.u[0].dof.shape) @@ -1352,19 +1380,31 @@ def initDataStructures(self): # get coordinates of DOFs self.getDOFsCoord() # some vectors for convex limiting + self.urelax = np.zeros(self.u[0].dof.shape, 'd') + self.drelax = np.zeros(self.u[0].dof.shape, 'd') self.dH_minus_dL = np.zeros(self.Cx.shape, 'd') self.muH_minus_muL = np.zeros(self.Cx.shape, 'd') + # self.hLow = np.zeros(self.u[0].dof.shape, 'd') self.huLow = np.zeros(self.u[0].dof.shape, 'd') self.hvLow = np.zeros(self.u[0].dof.shape, 'd') self.hetaLow = np.zeros(self.u[0].dof.shape, 'd') self.hwLow = np.zeros(self.u[0].dof.shape, 'd') self.hbetaLow = np.zeros(self.u[0].dof.shape, 'd') + # + self.limited_hnp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hunp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hvnp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hetanp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hwnp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hbetanp1 = np.zeros(self.u[0].dof.shape, 'd') + # self.h_min = np.zeros(self.u[0].dof.shape, 'd') self.h_max = np.zeros(self.u[0].dof.shape, 'd') self.heta_min = np.zeros(self.u[0].dof.shape, 'd') self.heta_max = np.zeros(self.u[0].dof.shape, 'd') self.kin_max = np.zeros(self.u[0].dof.shape, 'd') + # self.extendedSourceTerm_hu = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_hv = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_heta = np.zeros(self.u[0].dof.shape, 'd') @@ -1383,6 +1423,14 @@ def initDataStructures(self): nghosts = self.u[0].par_dof.nghosts subdomain2global=self.u[0].femSpace.dofMap.subdomain2global # + self.par_urelax = LAT.ParVec_petsc4py(self.urelax, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_drelax = LAT.ParVec_petsc4py(self.drelax, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) self.par_hLow = LAT.ParVec_petsc4py(self.hLow, bs=1, n=n,N=N,nghosts=nghosts, @@ -1407,6 +1455,32 @@ def initDataStructures(self): bs=1, n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) + # + self.par_limited_hnp1= LAT.ParVec_petsc4py(self.limited_hnp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hunp1 = LAT.ParVec_petsc4py(self.limited_hunp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hvnp1 = LAT.ParVec_petsc4py(self.limited_hvnp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hetanp1 = LAT.ParVec_petsc4py(self.limited_hetanp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hwnp1 = LAT.ParVec_petsc4py(self.limited_hwnp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hbetanp1 = LAT.ParVec_petsc4py(self.limited_hbetanp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + # self.par_h_min = LAT.ParVec_petsc4py(self.h_min, bs=1, n=n,N=N,nghosts=nghosts, @@ -1482,6 +1556,11 @@ def initDataStructures(self): n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) self.par_ML.scatter_forward_insert() + + self.urelax = 1.0 + pow(np.sqrt(np.sqrt(self.ML / self.size_of_domain)),3) + self.drelax = 1.0 - pow(np.sqrt(np.sqrt(self.ML / self.size_of_domain)),3) + self.par_urelax.scatter_forward_insert() + self.par_drelax.scatter_forward_insert() # self.dataStructuresInitialized = True # @@ -1687,29 +1766,39 @@ def getResidual(self, u, r): argsDict["heta_max"] = self.heta_max argsDict["kin_max"] = self.kin_max argsDict["size_of_domain"] = self.size_of_domain + argsDict["urelax"] = self.urelax + argsDict["drelax"] = self.drelax - # call calculate residual + ## call calculate residual self.calculateResidual(argsDict) - # distribute local bounds and low order solutions (with bar states) + ## distribute local bounds and low order solutions (with bar states) self.par_hLow.scatter_forward_insert() self.par_huLow.scatter_forward_insert() self.par_hvLow.scatter_forward_insert() self.par_hetaLow.scatter_forward_insert() self.par_hwLow.scatter_forward_insert() self.par_hbetaLow.scatter_forward_insert() + self.par_limited_hnp1.scatter_forward_insert() + self.par_limited_hunp1.scatter_forward_insert() + self.par_limited_hvnp1.scatter_forward_insert() + self.par_limited_hetanp1.scatter_forward_insert() + self.par_limited_hwnp1.scatter_forward_insert() + self.par_limited_hbetanp1.scatter_forward_insert() + # self.par_h_min.scatter_forward_insert() self.par_h_max.scatter_forward_insert() self.par_heta_min.scatter_forward_insert() self.par_heta_max.scatter_forward_insert() self.par_kin_max.scatter_forward_insert() - # distribute source terms (not sure if needed) + ## distribute source terms (not sure if needed) self.par_extendedSourceTerm_hu.scatter_forward_insert() self.par_extendedSourceTerm_hv.scatter_forward_insert() self.par_extendedSourceTerm_heta.scatter_forward_insert() self.par_extendedSourceTerm_hw.scatter_forward_insert() self.par_extendedSourceTerm_hbeta.scatter_forward_insert() + ## self.par_new_SourceTerm_hu.scatter_forward_insert() self.par_new_SourceTerm_hv.scatter_forward_insert() self.par_new_SourceTerm_heta.scatter_forward_insert() diff --git a/proteus/mprans/SW2DCV.h b/proteus/mprans/SW2DCV.h index ec2dee325b..dc979526c1 100644 --- a/proteus/mprans/SW2DCV.h +++ b/proteus/mprans/SW2DCV.h @@ -11,7 +11,6 @@ namespace py = pybind11; -#define GLOBAL_FCT 0 #define POWER_SMOOTHNESS_INDICATOR 2 #define VEL_FIX_POWER 2. #define REESTIMATE_MAX_EDGE_BASED_CFL 0 @@ -126,12 +125,12 @@ inline double hStarRFromQuadPhiFromBelow(const double &g, const double &hStarL, 4 * phi(g, hStarR, hL, hR, uL, uR) * phiDDiff2(g, hStarL, hStarR, hL, hR, uL, uR)))); } -} // end namespace proteus +} // namespace proteus namespace proteus { + class SW2DCV_base { public: - std::valarray Rneg, Rpos, hLow, huLow, hvLow, Kmax; virtual ~SW2DCV_base() {} virtual void convexLimiting(arguments_dict &args) = 0; virtual double calculateEdgeBasedCFL(arguments_dict &args) = 0; @@ -161,15 +160,14 @@ class SW2DCV : public SW2DCV_base { inline double maxWaveSpeedSharpInitialGuess(double g, double nx, double ny, double hL, double huL, double hvL, double hR, double huR, double hvR, - double hEpsL, double hEpsR, - bool debugging) { + double hEps, bool debugging) { double lambda1, lambda3; // 1-eigenvalue: uL-sqrt(g*hL) // 3-eigenvalue: uR+sqrt(g*hR) // To avoid division by 0 - double one_over_hL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEpsL), 2.0)); - double one_over_hR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEpsR), 2.0)); + double one_over_hL = 2.0 * hL / (hL * hL + std::pow(fmax(hL, hEps), 2.0)); + double one_over_hR = 2.0 * hR / (hR * hR + std::pow(fmax(hR, hEps), 2.0)); double hVelL = nx * huL + ny * hvL; double hVelR = nx * huR + ny * hvR; @@ -243,9 +241,12 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &hu_old = args.array("hu_old"); xt::pyarray &hv_old = args.array("hv_old"); xt::pyarray &b_dof = args.array("b_dof"); - xt::pyarray &high_order_hnp1 = args.array("high_order_hnp1"); - xt::pyarray &high_order_hunp1 = args.array("high_order_hunp1"); - xt::pyarray &high_order_hvnp1 = args.array("high_order_hvnp1"); + xt::pyarray &high_order_hnp1 = + args.array("high_order_hnp1"); + xt::pyarray &high_order_hunp1 = + args.array("high_order_hunp1"); + xt::pyarray &high_order_hvnp1 = + args.array("high_order_hvnp1"); xt::pyarray &extendedSourceTerm_hu = args.array("extendedSourceTerm_hu"); xt::pyarray &extendedSourceTerm_hv = @@ -261,155 +262,32 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &dH_minus_dL = args.array("dH_minus_dL"); xt::pyarray &muH_minus_muL = args.array("muH_minus_muL"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); int LUMPED_MASS_MATRIX = args.scalar("LUMPED_MASS_MATRIX"); xt::pyarray &dLow = args.array("dLow"); - xt::pyarray &hBT = args.array("hBT"); - xt::pyarray &huBT = args.array("huBT"); - xt::pyarray &hvBT = args.array("hvBT"); - xt::pyarray &new_SourceTerm_hu = args.array("new_SourceTerm_hu"); - xt::pyarray &new_SourceTerm_hv = args.array("new_SourceTerm_hv"); - double size_of_domain = args.scalar("size_of_domain"); - Rneg.resize(numDOFs, 0.0); - Rpos.resize(numDOFs, 0.0); - hLow.resize(numDOFs, 0.0); - huLow.resize(numDOFs, 0.0); - hvLow.resize(numDOFs, 0.0); - Kmax.resize(numDOFs, 0.0); - // for relaxation of bounds - std::valarray urelax(0.0, numDOFs); - std::valarray drelax(0.0, numDOFs); - - // for h - std::valarray h_min(0.0, numDOFs); - std::valarray h_max(0.0, numDOFs); - std::valarray delta_Sqd_h(0.0, numDOFs); - std::valarray bar_deltaSqd_h(0.0, numDOFs); - - // for kinetic energy - xt::pyarray kin(numDOFs); - xt::pyarray max_of_h_and_hEps(numDOFs); - std::valarray kin_max(0.0, numDOFs); - std::valarray delta_Sqd_kin(0.0, numDOFs); - std::valarray bar_deltaSqd_kin(0.0, numDOFs); + xt::pyarray &new_SourceTerm_hu = + args.array("new_SourceTerm_hu"); + xt::pyarray &new_SourceTerm_hv = + args.array("new_SourceTerm_hv"); + xt::pyarray &hLow = args.array("hLow"); + xt::pyarray &huLow = args.array("huLow"); + xt::pyarray &hvLow = args.array("hvLow"); + xt::pyarray &h_min = args.array("h_min"); + xt::pyarray &h_max = args.array("h_max"); + xt::pyarray &kin_max = args.array("kin_max"); + + // Declare stuff for limiting on h and h*heta + std::valarray Rneg(0.0, numDOFs), Rpos(0.0, numDOFs); // Create FCT component matrices in vector form - std::valarray FCT_h(0.0, dH_minus_dL.size()); - std::valarray FCT_hu(0.0, dH_minus_dL.size()); - std::valarray FCT_hv(0.0, dH_minus_dL.size()); - - // Define kinetic energy, kin = 1/2 q^2 / h - max_of_h_and_hEps = xt::where(h_old > hEps, h_old, hEps); - kin = 0.5 * (hu_old * hu_old + hv_old * hv_old); - kin *= - 2.0 * h_old / (h_old * h_old + max_of_h_and_hEps * max_of_h_and_hEps); - - // We first do the loops to define the relaxation quantities - // First relaxation loop - for (int i = 0; i < numDOFs; i++) { - urelax[i] = - 1.0 + - 2.0 * std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); - drelax[i] = - 1.0 - - 2.0 * std::pow(sqrt(sqrt(lumped_mass_matrix[i] / size_of_domain)), 3); - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - if (i != j) { - delta_Sqd_h[i] += h_old[i] - h_old[j]; - delta_Sqd_kin[i] += kin[i] - kin[j]; - } - } // j loop ends here - } // i loops ends here - - // Second relaxation loop - for (int i = 0; i < numDOFs; i++) { - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - if (i != j) { - bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; - bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; - } - } // j loop ends here - bar_deltaSqd_h[i] = - bar_deltaSqd_h[i] / - (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i]) / 2.0; - bar_deltaSqd_kin[i] = - bar_deltaSqd_kin[i] / - (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i]) / 2.0; - } // i loops ends here - - //////////////////////////////////////////////////////// - // Loop to define local bounds and low order solution // - //////////////////////////////////////////////////////// - int ij = 0; - for (int i = 0; i < numDOFs; i++) { - - // define m_i - double mi = lumped_mass_matrix[i]; - - /* Initialize hmin, hmax */ - h_min[i] = h_old[i]; - h_max[i] = h_old[i]; - - /* Initialize low order solution */ - hLow[i] = h_old[i]; - huLow[i] = hu_old[i]; - hvLow[i] = hv_old[i]; - Kmax[i] = kin[i]; - - /* LOOP OVER THE SPARSITY PATTERN (j-LOOP) */ - for (int offset = csrRowIndeces_DofLoops[i]; - offset < csrRowIndeces_DofLoops[i + 1]; offset++) { - int j = csrColumnOffsets_DofLoops[offset]; - double psi_ij = 0; - double one_over_hBT = - 2.0 * hBT[ij] / - (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); - psi_ij = one_over_hBT * (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / - 2.0; // Eqn (6.31) - - // COMPUTE LOCAL BOUNDS // - Kmax[i] = fmax(psi_ij, Kmax[i]); - h_min[i] = std::min(h_min[i], hBT[ij]); - h_max[i] = std::max(h_max[i], hBT[ij]); - - // Then do relaxation of bounds here. If confused, see (4.12) of Euler - // convex limiting paper. - Kmax[i] = std::min(urelax[i] * Kmax[i], - Kmax[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); - h_min[i] = std::max(drelax[i] * h_min[i], - h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); - h_max[i] = std::min(urelax[i] * h_max[i], - h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); - - /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ - // This is low order solution WITHOUT sources - if (i != j) { - hLow[i] += h_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hBT[ij]); - huLow[i] += hu_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * huBT[ij]); - hvLow[i] += hv_old[i] * (-dt / mi * 2 * dLow[ij]) + - dt / mi * (2 * dLow[ij] * hvBT[ij]); - } - // UPDATE ij // - ij += 1; - } // j loop ends here - - // clean up hLow from round off error - if (hLow[i] < hEps) - hLow[i] = 0.0; - } // i loop ends here + std::valarray FCT_h(0.0, dH_minus_dL.size()), + FCT_hu(0.0, dH_minus_dL.size()), FCT_hv(0.0, dH_minus_dL.size()); //////////////////////////////////////////////////// // Loop to define FCT matrices for each component // //////////////////////////////////////////////////// - ij = 0; + int ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors + // Read some vectors double high_order_hnp1i = high_order_hnp1[i]; double high_order_hunp1i = high_order_hunp1[i]; double high_order_hvnp1i = high_order_hvnp1[i]; @@ -427,44 +305,52 @@ class SW2DCV : public SW2DCV_base { int j = csrColumnOffsets_DofLoops[offset]; - // read some vectors - double hj = h_old[j]; - double hunj = hu_old[j]; - double hvnj = hv_old[j]; - double Zj = b_dof[j]; - double one_over_hjReg = - 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); // hEps - - // COMPUTE STAR SOLUTION hStar, huStar, hvStar // - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = huni * hStarij * one_over_hiReg; - double hvStarij = hvni * hStarij * one_over_hiReg; - - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = hunj * hStarji * one_over_hjReg; - double hvStarji = hvnj * hStarji * one_over_hjReg; - - // i-th row of flux correction matrix - double ML_minus_MC = (LUMPED_MASS_MATRIX == 1 - ? 0. - : (i == j ? 1. : 0.) * mi - MassMatrix[ij]); - - FCT_h[ij] = - ML_minus_MC * (high_order_hnp1[j] - hj - (high_order_hnp1i - hi)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hStarji - hStarij) + - dt * muH_minus_muL[ij] * (hj - hi); - - FCT_hu[ij] = - ML_minus_MC * - (high_order_hunp1[j] - hunj - (high_order_hunp1i - huni)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (huStarji - huStarij) + - dt * muH_minus_muL[ij] * (hunj - huni); - - FCT_hv[ij] = - ML_minus_MC * - (high_order_hvnp1[j] - hvnj - (high_order_hvnp1i - hvni)) + - dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hvStarji - hvStarij) + - dt * muH_minus_muL[ij] * (hvnj - hvni); + if (i != j) { + // Read some vectors + double hj = h_old[j]; + double hunj = hu_old[j]; + double hvnj = hv_old[j]; + double Zj = b_dof[j]; + double one_over_hjReg = + 2. * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = huni * hStarij * one_over_hiReg; + double hvStarij = hvni * hStarij * one_over_hiReg; + + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = hunj * hStarji * one_over_hjReg; + double hvStarji = hvnj * hStarji * one_over_hjReg; + + // i-th row of flux correction matrix + double ML_minus_MC = (LUMPED_MASS_MATRIX == 1 + ? 0. + : (i == j ? 1. : 0.) * mi - MassMatrix[ij]); + + FCT_h[ij] = + ML_minus_MC * + (high_order_hnp1[j] - hj - (high_order_hnp1i - hi)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * (hStarji - hStarij) + + dt * muH_minus_muL[ij] * (hj - hi); + + FCT_hu[ij] = ML_minus_MC * (high_order_hunp1[j] - hunj - + (high_order_hunp1i - huni)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (huStarji - huStarij) + + dt * muH_minus_muL[ij] * (hunj - huni); + + FCT_hv[ij] = ML_minus_MC * (high_order_hvnp1[j] - hvnj - + (high_order_hvnp1i - hvni)) + + dt * (dH_minus_dL[ij] - muH_minus_muL[ij]) * + (hvStarji - hvStarij) + + dt * muH_minus_muL[ij] * (hvnj - hvni); + + } else { + FCT_h[ij] = 0.0; + FCT_hu[ij] = 0.0; + FCT_hv[ij] = 0.0; + } // UPDATE ij // ij += 1; @@ -478,31 +364,34 @@ class SW2DCV : public SW2DCV_base { // Create Lij_array for initialization std::valarray Lij_array(1.0, dH_minus_dL.size()); + /* Loop over limiting iterations */ for (int limit_iter = 0; limit_iter < LIMITING_ITERATION; limit_iter++) { /* Loop to define FCT Rpos and Rneg values */ ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors - double mi = lumped_mass_matrix[i]; + double hi = h_old[i]; + double mi = lumped_mass_matrix[i]; // Initialize Pneg and Ppos quantities at ith node double Pnegi = 0., Pposi = 0.; - // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// + // LOOP OVER THE SPARSITY PATTERN (j-LOOP) for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { int j = csrColumnOffsets_DofLoops[offset]; - // COMPUTE P VECTORS // + // COMPUTE P VECTORS Pnegi += FCT_h[ij] * ((FCT_h[ij] < 0) ? 1. : 0.); Pposi += FCT_h[ij] * ((FCT_h[ij] > 0) ? 1. : 0.); - // UPDATE ij // + // UPDATE ij ij += 1; } // j loop ends here + double psmall_h = 1E-14 * fmax(fabs(Pnegi), fabs(Pposi)); + /////////////////////// // COMPUTE Q VECTORS // /////////////////////// @@ -512,113 +401,140 @@ class SW2DCV : public SW2DCV_base { /////////////////////// // COMPUTE R VECTORS // /////////////////////// - if (high_order_hnp1[i] <= hEps) // hEps - { + if (hi <= hEps) { Rneg[i] = 0.; Rpos[i] = 0.; } else { - Rneg[i] = ((Pnegi == 0) ? 1. : std::min(1.0, Qnegi / Pnegi)); - Rpos[i] = ((Pposi == 0) ? 1. : std::min(1.0, Qposi / Pposi)); + // for h + if (Pnegi >= -psmall_h) { + Rneg[i] = 1.0; + } else { + Rneg[i] = std::min(1.0, Qnegi / Pnegi); + } + if (Pposi <= psmall_h) { + Rpos[i] = 1.0; + } else { + Rpos[i] = std::min(1.0, Qposi / Pposi); + } } } // i loop ends here - /* Here we compute the limiters */ + // for limiting kinetic energy + auto KE_tiny = xt::amax(kin_max)[0] * hEps; + + /* Here we compute the limiters Lij_array */ ij = 0; for (int i = 0; i < numDOFs; i++) { - // read some vectors - double high_order_hnp1i = high_order_hnp1[i]; - double high_order_hunp1i = high_order_hunp1[i]; - double high_order_hvnp1i = high_order_hvnp1[i]; - double hi = h_old[i]; - double huni = hu_old[i]; - double hvni = hv_old[i]; - double Zi = b_dof[i]; double mi = lumped_mass_matrix[i]; - double one_over_hiReg = - 2 * hi / (hi * hi + std::pow(fmax(hi, hEps), 2)); // hEps - - double ith_Limiter_times_FluxCorrectionMatrix1 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix2 = 0.; - double ith_Limiter_times_FluxCorrectionMatrix3 = 0.; - double ci = - Kmax[i] * hLow[i] - + kin_max[i] * hLow[i] - 0.5 * (huLow[i] * huLow[i] + hvLow[i] * hvLow[i]); // for KE lim. // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { int j = csrColumnOffsets_DofLoops[offset]; - // read some vectors - double hj = h_old[j]; - double hunj = hu_old[j]; - double hvnj = hv_old[j]; - double Zj = b_dof[j]; - double one_over_hjReg = - 2 * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); // hEps - // COMPUTE STAR SOLUTION // hStar, huStar, hvStar - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = huni * hStarij * one_over_hiReg; - double hvStarij = hvni * hStarij * one_over_hiReg; + if (j != i) { - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = hunj * hStarji * one_over_hjReg; - double hvStarji = hvnj * hStarji * one_over_hjReg; + // Compute limiter based on water height + if (FCT_h[ij] >= 0.) { + Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[j], Rpos[i])); + } else { + Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[i], Rpos[j])); + } + + double lambdaj = + csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; + double Ph_ij = FCT_h[ij] / mi / lambdaj; + double Phu_ij = FCT_hu[ij] / mi / lambdaj; + double Phv_ij = FCT_hv[ij] / mi / lambdaj; + + // Here we have some conditions for the KE limiting + + double KE_limiter = 1; + + // We first check if local kinetic energy > 0 + if (kin_max[i] * hLow[i] <= KE_tiny) { + KE_limiter = 0.; + } + + // We then check if KE bound is already satisfied + double hi_with_lijPij = hLow[i] + Lij_array[ij] * Ph_ij; + double hui_with_lijPij = huLow[i] + Lij_array[ij] * Phu_ij; + double hvi_with_lijPij = hvLow[i] + Lij_array[ij] * Phv_ij; + double psi = kin_max[i] * hi_with_lijPij - + 0.5 * (hui_with_lijPij * hui_with_lijPij + + hvi_with_lijPij * hvi_with_lijPij); + if (psi > -KE_tiny) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } + + /*======================================================*/ + + double ai = -0.5 * (Phu_ij * Phu_ij + Phv_ij * Phv_ij); + double bi = + kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); + double delta_i = bi * bi - 4. * ai * ci; + double ri = 1.; + + if (delta_i < 0. || ai >= -0.) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } else { + double neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; + KE_limiter = fmin(KE_limiter, neg_root_i); + } - // compute limiter based on water height - if (FCT_h[ij] >= 0) { - Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[j], Rpos[i])); + // root of jth-DOF (To compute transpose component) + double lambdai = + csrRowIndeces_DofLoops[j + 1] - csrRowIndeces_DofLoops[j] - 1; + double mj = lumped_mass_matrix[j]; + double cj = kin_max[j] * hLow[j] - + 0.5 * (huLow[j] * huLow[j] + hvLow[j] * hvLow[j]); + double Ph_ji = -FCT_h[ij] / mj / lambdai; // Aij=-Aji + double Phu_ji = -FCT_hu[ij] / mj / lambdai; + double Phv_ji = -FCT_hv[ij] / mj / lambdai; + double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); + double bj = + kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); + + double delta_j = bj * bj - 4. * aj * cj; + double rj = 1.; + + if (delta_j < 0. || aj >= -0.) { + KE_limiter = fmin(KE_limiter, Lij_array[ij]); + } else { + double neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; + KE_limiter = fmin(KE_limiter, neg_root_j); + } + + // Compute KE limiter + Lij_array[ij] = fmin(KE_limiter, Lij_array[ij]); + // Lij_array[ij] = fmin(fmin(fabs(ri), fabs(rj)), Lij_array[ij]); } else { - Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[i], Rpos[j])); + // if i = j then lij = 0 + Lij_array[ij] = 0.; } - double lambdaj = - csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; - double Ph_ij = FCT_h[ij] / mi / lambdaj; - double Phu_ij = FCT_hu[ij] / mi / lambdaj; - double Phv_ij = FCT_hv[ij] / mi / lambdaj; - - double ai = -0.5 * (Phu_ij * Phu_ij + Phv_ij * Phv_ij); - double bi = Kmax[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); - - double r1 = ai == 0 - ? (bi == 0 ? 1. : -ci / bi) - : (-bi + std::sqrt(bi * bi - 4 * ai * ci)) / 2. / ai; - double r2 = ai == 0 - ? (bi == 0 ? 1. : -ci / bi) - : (-bi - std::sqrt(bi * bi - 4 * ai * ci)) / 2. / ai; - if (r1 < 0 && r2 < 0) { - r1 = 1.; - r2 = 1.; - } - double ri = fabs(fmax(r1, r2)); - - // root of jth-DOF (To compute transpose component) - double lambdai = - csrRowIndeces_DofLoops[j + 1] - csrRowIndeces_DofLoops[j] - 1; - double mj = lumped_mass_matrix[j]; - double cj = Kmax[j] * hLow[j] - - 0.5 * (huLow[j] * huLow[j] + hvLow[j] * hvLow[j]); - double Ph_ji = -FCT_h[ij] / mj / lambdai; // Aij=-Aji - double Phu_ji = -FCT_hu[ij] / mj / lambdai; - double Phv_ji = -FCT_hv[ij] / mj / lambdai; - double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); - double bj = Kmax[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); - - r1 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) - : (-bj + std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; - r2 = aj == 0 ? (bj == 0 ? 1. : -cj / bj) - : (-bj - std::sqrt(bj * bj - 4 * aj * cj)) / 2. / aj; - if (r1 < 0 && r2 < 0) { - r1 = 1.; - r2 = 1.; - } - double rj = fabs(fmax(r1, r2)); + // update ij + ij += 1; + } // end j loop + } // end i loop - // COMPUTE LIMITER // - Lij_array[ij] = - fmin(fmin(ri, Lij_array[ij]), fmin(rj, Lij_array[ij])); + /* Final loop to apply limiting and then define limited solution */ + ij = 0; + for (int i = 0; i < numDOFs; i++) { + + double one_over_mi = 1.0 / lumped_mass_matrix[i]; + double ith_Limiter_times_FluxCorrectionMatrix1 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix2 = 0.; + double ith_Limiter_times_FluxCorrectionMatrix3 = 0.; + + // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + + int j = csrColumnOffsets_DofLoops[offset]; // COMPUTE LIMITED FLUX // ith_Limiter_times_FluxCorrectionMatrix1 += Lij_array[ij] * FCT_h[ij]; @@ -627,18 +543,14 @@ class SW2DCV : public SW2DCV_base { // update ij ij += 1; - } + } // end j loop - // update ulow solution - double one_over_mi = 1.0 / lumped_mass_matrix[i]; + // then we add lij*Aij to uLow hLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix1; huLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix2; hvLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix3; - } // end i loop for computing limiter and sum_j(lij * Aij) - // update final limted solution, need to change to vector form - for (int i = 0; i < numDOFs; i++) { - double one_over_mi = 1.0 / lumped_mass_matrix[i]; + // Final loop to define limited solution limited_hnp1[i] = hLow[i]; limited_hunp1[i] = huLow[i] + dt * one_over_mi * new_SourceTerm_hu[i]; limited_hvnp1[i] = hvLow[i] + dt * one_over_mi * new_SourceTerm_hv[i]; @@ -662,7 +574,7 @@ class SW2DCV : public SW2DCV_base { (std::pow(limited_hnp1[i], VEL_FIX_POWER) + std::pow(aux, VEL_FIX_POWER)); } - } + } // end i loop // update FCT matrices as Fct = (1 - Lij)*Fct FCT_h = (1.0 - Lij_array) * FCT_h; @@ -685,7 +597,6 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &csrColumnOffsets_DofLoops = args.array("csrColumnOffsets_DofLoops"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); xt::pyarray &Cx = args.array("Cx"); xt::pyarray &Cy = args.array("Cy"); xt::pyarray &CTx = args.array("CTx"); @@ -696,6 +607,7 @@ class SW2DCV : public SW2DCV_base { int debug = args.scalar("debug"); double max_edge_based_cfl = 0.; + int ij = 0; for (int i = 0; i < numDOFsPerEqn; i++) { // solution at time tn for the ith DOF @@ -722,13 +634,13 @@ class SW2DCV : public SW2DCV_base { double cji_norm = sqrt(CTx[ij] * CTx[ij] + CTy[ij] * CTy[ij]); double nxij = Cx[ij] / cij_norm, nyij = Cy[ij] / cij_norm; double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; - dLow[ij] = fmax( - maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, hj, - huj, hvj, hEps, hEps, debug) * - cij_norm, // hEps - maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, hi, - hui, hvi, hEps, hEps, debug) * - cji_norm); // hEps + dLow[ij] = + fmax(maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, + hj, huj, hvj, hEps, debug) * + cij_norm, // hEps + maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, + hi, hui, hvi, hEps, debug) * + cji_norm); // hEps dLowii -= dLow[ij]; } else dLow[ij] = 0.; @@ -795,8 +707,9 @@ class SW2DCV : public SW2DCV_base { int ij = 0; std::valarray etaMax(numDOFsPerEqn), etaMin(numDOFsPerEqn); - // speed = sqrt(g max(h_0)), I divide by h_epsilon to get max(h_0) -EJT + // speed = sqrt(g max(h_0)), I divide by h_epsilon to get max(h_0) double speed = std::sqrt(g * hEps / eps); + dij_small = 0.0; for (int i = 0; i < numDOFsPerEqn; i++) { @@ -812,7 +725,6 @@ class SW2DCV : public SW2DCV_base { double ui = hui * one_over_hiReg; double vi = hvi * one_over_hiReg; double mi = lumped_mass_matrix[i]; - double meshSizei = std::sqrt(mi); // initialize etaMax and etaMin etaMax[i] = fabs(eta[i]); @@ -854,12 +766,8 @@ class SW2DCV : public SW2DCV_base { // flux for entropy ith_flux_term1 += aux_h; - ith_flux_term2 += - aux_hu + 0.5 * g * hj * hj * - Cx[ij]; // g * hi * (hj + 0.) * Cx[ij]; // NOTE: Zj=0 - ith_flux_term3 += - aux_hv + 0.5 * g * hj * hj * - Cy[ij]; // g * hi * (hj + 0.) * Cy[ij]; // NOTE: Zj=0 + ith_flux_term2 += aux_hu + 0.5 * g * hj * hj * Cx[ij]; + ith_flux_term3 += aux_hv + 0.5 * g * hj * hj * Cy[ij]; // NOTE: WE CONSIDER FLAT BOTTOM entropy_flux += @@ -878,9 +786,6 @@ class SW2DCV : public SW2DCV_base { ij += 1; } // end j loop - // Finally dij_small here - dij_small = 1E-14 * dij_small; - // define sum of entprime*flux sum_entprime_flux = (ith_flux_term1 * eta_prime1 + ith_flux_term2 * eta_prime2 + @@ -890,20 +795,17 @@ class SW2DCV : public SW2DCV_base { double small_rescale = g * hEps * hEps / eps; double rescale = fmax(fabs(etaMax[i] - etaMin[i]) / 2., small_rescale); - // define alternative rescale factor - double new_rescale = - fmax(fabs(entropy_flux) + fabs(-sum_entprime_flux), 1E-30); - // COMPUTE ENTROPY RESIDUAL // double one_over_entNormFactori = 1.0 / rescale; global_entropy_residual[i] = one_over_entNormFactori * fabs(entropy_flux - sum_entprime_flux); - - // COMPUTE SMOOTHNESS INDICATOR // if (hi <= hEps) { global_entropy_residual[i] = 1.0; } - } + } // end i loop + + // Finally dij_small here + dij_small = 1E-14 * dij_small; // ********** END OF LOOP IN DOFs ********** // } // end calculateEV @@ -912,28 +814,30 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); - double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); - xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -945,13 +849,11 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -962,19 +864,6 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &h_dof = args.array("h_dof"); xt::pyarray &hu_dof = args.array("hu_dof"); xt::pyarray &hv_dof = args.array("hv_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &q_mass_acc = args.array("q_mass_acc"); - xt::pyarray &q_mom_hu_acc = args.array("q_mom_hu_acc"); - xt::pyarray &q_mom_hv_acc = args.array("q_mom_hv_acc"); - xt::pyarray &q_mass_adv = args.array("q_mass_adv"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -1030,14 +919,16 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); xt::pyarray &q_velocity = args.array("q_velocity"); xt::pyarray &ebqe_velocity = args.array("ebqe_velocity"); xt::pyarray &flux = args.array("flux"); - xt::pyarray &elementResidual_h = args.array("elementResidual_h"); + xt::pyarray &elementResidual_h = + args.array("elementResidual_h"); xt::pyarray &Cx = args.array("Cx"); xt::pyarray &Cy = args.array("Cy"); xt::pyarray &CTx = args.array("CTx"); @@ -1053,7 +944,6 @@ class SW2DCV : public SW2DCV_base { double cfl_run = args.scalar("cfl_run"); double eps = args.scalar("eps"); double hEps = args.scalar("hEps"); - xt::pyarray &hReg = args.array("hReg"); xt::pyarray &hnp1_at_quad_point = args.array("hnp1_at_quad_point"); xt::pyarray &hunp1_at_quad_point = @@ -1078,15 +968,22 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &normalx = args.array("normalx"); xt::pyarray &normaly = args.array("normaly"); xt::pyarray &dLow = args.array("dLow"); - xt::pyarray &hBT = args.array("hBT"); - xt::pyarray &huBT = args.array("huBT"); - xt::pyarray &hvBT = args.array("hvBT"); int lstage = args.scalar("lstage"); - xt::pyarray &new_SourceTerm_hu = args.array("new_SourceTerm_hu"); - xt::pyarray &new_SourceTerm_hv = args.array("new_SourceTerm_hv"); + xt::pyarray &new_SourceTerm_hu = + args.array("new_SourceTerm_hu"); + xt::pyarray &new_SourceTerm_hv = + args.array("new_SourceTerm_hv"); xt::pyarray &global_entropy_residual = args.array("global_entropy_residual"); double dij_small = args.scalar("dij_small"); + xt::pyarray &hLow = args.array("hLow"); + xt::pyarray &huLow = args.array("huLow"); + xt::pyarray &hvLow = args.array("hvLow"); + xt::pyarray &h_min = args.array("h_min"); + xt::pyarray &h_max = args.array("h_max"); + xt::pyarray &kin_max = args.array("kin_max"); + xt::pyarray &urelax = args.array("urelax"); + xt::pyarray &drelax = args.array("drelax"); // FOR FRICTION// double n2 = std::pow(mannings, 2.); double gamma = 4. / 3; @@ -1183,22 +1080,256 @@ class SW2DCV : public SW2DCV_base { if (SECOND_CALL_CALCULATE_RESIDUAL == 0) // This is to save some time { + ///////////////////////////////////////////////////// + // ********** FIRST SET OF LOOP ON DOFs ********** // + ///////////////////////////////////////////////////// + // To compute: + // * Local bounds for limiting + // * Low order solution (in terms of bar states) + + // Here we declare some arrays for local bounds + std::valarray delta_Sqd_h(0.0, numDOFsPerEqn), + bar_deltaSqd_h(0.0, numDOFsPerEqn), delta_Sqd_kin(0.0, numDOFsPerEqn), + bar_deltaSqd_kin(0.0, numDOFsPerEqn); + xt::pyarray kin(numDOFsPerEqn), max_of_h_and_hEps(numDOFsPerEqn); + + // Define kinetic energy, kin = 1/2 q^2 / h + max_of_h_and_hEps = xt::where(h_dof_old > hEps, h_dof_old, hEps); + kin = 0.5 * (hu_dof_old * hu_dof_old + hv_dof_old * hv_dof_old); + kin *= 2.0 * h_dof_old / + (h_dof_old * h_dof_old + max_of_h_and_hEps * max_of_h_and_hEps); + + /* First loop to define: delta_Sqd_h, delta_Sqd_heta, delta_Sqd_kin */ + for (int i = 0; i < numDOFsPerEqn; i++) { + + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + + int j = csrColumnOffsets_DofLoops[offset]; + + if (i != j) { + delta_Sqd_h[i] += h_dof_old[i] - h_dof_old[j]; + delta_Sqd_kin[i] += kin[i] - kin[j]; + } + } // j loop ends here + } // i loops ends here + + // Stuff for bar states here (BT = BarTilde) + std::valarray hBT(0.0, dH_minus_dL.size()), + huBT(0.0, dH_minus_dL.size()), hvBT(0.0, dH_minus_dL.size()); + + /* Second loop to compute bar states (variable)BT */ + int ij = 0; + for (int i = 0; i < numDOFsPerEqn; i++) { - /////////////////////////////////////////////// - // ********** FIRST LOOP ON DOFs ********** // - /////////////////////////////////////////////// + // define things at ith node + double hi = h_dof_old[i]; + double hui = hu_dof_old[i]; + double hvi = hv_dof_old[i]; + double Zi = b_dof[i]; + double mi = lumped_mass_matrix[i]; + double one_over_hiReg = + 2.0 * hi / (hi * hi + std::pow(fmax(hi, hEps), 2)); + double ui = hui * one_over_hiReg; + double vi = hvi * one_over_hiReg; + + // define full pressure at ith node for definition of bar states + double pressure_i = 0.5 * g * hi * hi; + + // loop over the sparsity pattern of the i-th DOF + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; + + // define things at jth node + double hj = h_dof_old[j]; + double huj = hu_dof_old[j]; + double hvj = hv_dof_old[j]; + double Zj = b_dof[j]; + double one_over_hjReg = + 2.0 * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); + double uj = huj * one_over_hjReg; + double vj = hvj * one_over_hjReg; + // define pressure at jth node for bar states + double pressure_j = 0.5 * g * hj * hj; + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = hui * hStarij * one_over_hiReg; + double hvStarij = hvi * hStarij * one_over_hiReg; + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = huj * hStarji * one_over_hjReg; + double hvStarji = hvj * hStarji * one_over_hjReg; + + // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin + double muLowij = 0., muLij = 0., dLowij = 0., dLij = 0.; + if (i != j) { + // Put these computations first before it gets messy + bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; + bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; + + if (lstage == 0) + dLowij = dLow[ij]; + else { + double cij_norm = sqrt(Cx[ij] * Cx[ij] + Cy[ij] * Cy[ij]); + double cji_norm = sqrt(CTx[ij] * CTx[ij] + CTy[ij] * CTy[ij]); + double nxij = Cx[ij] / cij_norm, nyij = Cy[ij] / cij_norm; + double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; + dLowij = fmax( + maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, hj, + huj, hvj, hEps, false) * + cij_norm, + maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, hi, + hui, hvi, hEps, false) * + cji_norm); + } + // save dLij + dLij = dLowij; + + // compute muij + muLij = fmax(fmax(0., -(ui * Cx[ij] + vi * Cy[ij])), + fmax(0., (uj * Cx[ij] + vj * Cy[ij]))); + + // Define dLij as max of dLij and muLij + dLij = fmax(dLowij, muLij); + dLow[ij] = fmax(dLij, muLij); + + //////////////////////// + // COMPUTE BAR STATES // + //////////////////////// + double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, + hvBar_ij = 0, hvTilde_ij = 0; + + // h component + hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hj - ui * hi) * Cx[ij] + + (vj * hj - vi * hi) * Cy[ij]) + + 0.5 * (hj + hi); + hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hStarji - hj) - (hStarij - hi)); + // hu component + huBar_ij = + -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + + (vj * huj - vi * hui) * Cy[ij]) + + 0.5 * (huj + hui); + huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((huStarji - huj) - (huStarij - hui)); + // hv component + hvBar_ij = + -1. / (fmax(2.0 * dLij, dij_small)) * + ((uj * hvj - ui * hvi) * Cx[ij] + + (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + + 0.5 * (hvj + hvi); + hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * + ((hvStarji - hvj) - (hvStarij - hvi)); + + // Here we define uBar + uTilde + hBT[ij] = hBar_ij + hTilde_ij; + huBT[ij] = huBar_ij + huTilde_ij; + hvBT[ij] = hvBar_ij + hvTilde_ij; + } else { + // i==j + // Bar states by definition satisfy Utilde_ii + Ubar_ii = U_i + hBT[ij] = hi; + huBT[ij] = hui; + hvBT[ij] = hvi; + } + + // UPDATE ij // + ij += 1; + } // j loop ends here + + // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin + bar_deltaSqd_h[i] = + bar_deltaSqd_h[i] / + (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1) / + 2.0; + bar_deltaSqd_kin[i] = + bar_deltaSqd_kin[i] / + (csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1) / + 2.0; + + } // i loops ends here + + /* Then final loop of first set to get local bounds */ + ij = 0; + for (int i = 0; i < numDOFsPerEqn; i++) { + + // define m_i + double mi = lumped_mass_matrix[i]; + + /* Initialize hmin, hmax */ + h_min[i] = h_dof_old[i]; + h_max[i] = h_dof_old[i]; + + /* Initialize low order solution */ + hLow[i] = h_dof_old[i]; + huLow[i] = hu_dof_old[i]; + hvLow[i] = hv_dof_old[i]; + kin_max[i] = kin[i]; + + // loop in j (sparsity pattern) + for (int offset = csrRowIndeces_DofLoops[i]; + offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + + int j = csrColumnOffsets_DofLoops[offset]; + + double one_over_hBT = + 2.0 * hBT[ij] / + (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); + double psi_ij = one_over_hBT * + (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / + 2.0; // Eqn (6.31) + + // COMPUTE LOCAL BOUNDS // + kin_max[i] = fmax(psi_ij, kin_max[i]); + h_min[i] = std::min(h_min[i], hBT[ij]); + h_max[i] = std::max(h_max[i], hBT[ij]); + + // Then do relaxation of bounds here. If confused, see convex + // limiting paper + kin_max[i] = + std::min(urelax[i] * kin_max[i], + kin_max[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); + h_min[i] = std::max(drelax[i] * h_min[i], + h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); + h_max[i] = std::min(urelax[i] * h_max[i], + h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); + + /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ + // This is low order solution WITHOUT sources + if (i != j) { + hLow[i] += h_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hBT[ij]); + huLow[i] += hu_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * huBT[ij]); + hvLow[i] += hv_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + + dt / mi * (2 * dLow[ij] * hvBT[ij]); + } + // UPDATE ij // + ij += 1; + } // j loop ends here + + // clean up hLow from round off error + if (hLow[i] < hEps) + hLow[i] = 0.0; + } // i loop ends here + + //////////////////////////////////////////////////////// + // ********** Second set of loops on dofs ********** // + /////////////////////////////////////////////////////// // To compute: // * Hyperbolic part of the flux - // * Extended source term (eqn 6.19) + // * Extended source terms // * Smoothness indicator - int ij = 0; + ij = 0; std::valarray hyp_flux_h(numDOFsPerEqn), hyp_flux_hu(numDOFsPerEqn), hyp_flux_hv(numDOFsPerEqn), psi(numDOFsPerEqn), etaMax(numDOFsPerEqn), etaMin(numDOFsPerEqn); for (int i = 0; i < numDOFsPerEqn; i++) { - // solution at time tn for the ith DOF double hi = h_dof_old[i]; double hui = hu_dof_old[i]; @@ -1211,17 +1342,17 @@ class SW2DCV : public SW2DCV_base { double vi = hvi * one_over_hiReg; double mi = lumped_mass_matrix[i]; - /* COMPUTE EXTENDED SOURCE TERMS: + /* COMPUTE EXTENDED SOURCE TERMS for all equations: * Friction terms - * Potentially other sources as well - * NOTE: Be careful with sign of source terms. + * NOTE: Be careful with sign of source terms. Extended sources are on + * left side of equations. "new_SourceTerm" variables are on right */ // FRICTION if (LINEAR_FRICTION == 1) { extendedSourceTerm_hu[i] = mannings * hui * mi; extendedSourceTerm_hv[i] = mannings * hvi * mi; - // For use in the convex limiting function -EJT + // For use in the convex limiting function // actually didn't need to do this but it helps with signs new_SourceTerm_hu[i] = -mannings * hui * mi; new_SourceTerm_hv[i] = -mannings * hvi * mi; @@ -1236,7 +1367,7 @@ class SW2DCV : public SW2DCV_base { fmax(hi_to_the_gamma, xi * g * n2 * dt * veli_norm))); extendedSourceTerm_hu[i] = friction_aux * hui; extendedSourceTerm_hv[i] = friction_aux * hvi; - // For use in the convex limiting function -EJT + // For use in the convex limiting function new_SourceTerm_hu[i] = -friction_aux * hui; new_SourceTerm_hv[i] = -friction_aux * hvi; } @@ -1332,7 +1463,6 @@ class SW2DCV : public SW2DCV_base { ij = 0; for (int i = 0; i < numDOFsPerEqn; i++) { - double hi = h_dof_old[i]; double hui = hu_dof_old[i]; double hvi = hv_dof_old[i]; @@ -1397,10 +1527,10 @@ class SW2DCV : public SW2DCV_base { double nxji = CTx[ij] / cji_norm, nyji = CTy[ij] / cji_norm; dLowij = fmax( maxWaveSpeedSharpInitialGuess(g, nxij, nyij, hi, hui, hvi, hj, - huj, hvj, hEps, hEps, false) * + huj, hvj, hEps, false) * cij_norm, maxWaveSpeedSharpInitialGuess(g, nxji, nyji, hj, huj, hvj, hi, - hui, hvi, hEps, hEps, false) * + hui, hvi, hEps, false) * cji_norm); } // this is standard low-order dij, can you use dLij = @@ -1421,45 +1551,11 @@ class SW2DCV : public SW2DCV_base { // Then save dLow for limiting step, maybe a bit confusing dLow[ij] = fmax(dLij, muLij); - //////////////////////// - // COMPUTE BAR STATES // - //////////////////////// - double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, - hvBar_ij = 0, hvTilde_ij = 0; - // h component - hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hj - ui * hi) * Cx[ij] + - (vj * hj - vi * hi) * Cy[ij]) + - 0.5 * (hj + hi); - hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hStarji - hj) - (hStarij - hi)); - // hu component - huBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + - (vj * huj - vi * hui) * Cy[ij]) + - 0.5 * (huj + hui); - huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((huStarji - huj) - (huStarij - hui)); - // hv component - hvBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * - ((uj * hvj - ui * hvi) * Cx[ij] + - (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + - 0.5 * (hvj + hvi); - hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hvStarji - hvj) - (hvStarij - hvi)); - - // Here we define uBar + uTilde - hBT[ij] = hBar_ij + hTilde_ij; - huBT[ij] = huBar_ij + huTilde_ij; - hvBT[ij] = hvBar_ij + hvTilde_ij; - /////////////////////// // ENTROPY VISCOSITY // /////////////////////// - double dEVij = - fmax(global_entropy_residual[i], global_entropy_residual[j]); + double dEVij = cE * fmax(global_entropy_residual[i], + global_entropy_residual[j]); dHij = fmin(dLowij, dEVij); muHij = fmin(muLowij, dEVij); @@ -1486,10 +1582,6 @@ class SW2DCV : public SW2DCV_base { 0.; // Not true but the prod of this times Uj-Ui will be zero muH_minus_muL[ij] = 0.; // Not true but the prod of this times Uj-Ui will be zero - // Bar states by definition satisfy Utilde_ii + Ubar_ii = U_i - hBT[ij] = hi; - huBT[ij] = hui; - hvBT[ij] = hvi; } // update ij ij += 1; @@ -1512,9 +1604,9 @@ class SW2DCV : public SW2DCV_base { ith_dHij_minus_muHij_times_hvStarStates - ith_muHij_times_hvStates); // clean up potential negative water height due to machine precision - // if (globalResidual[offset_h + stride_h * i] >= -hEps && - // globalResidual[offset_h + stride_h * i] < hEps) - // globalResidual[offset_h + stride_h * i] = 0; + if (globalResidual[offset_h + stride_h * i] >= -hEps && + globalResidual[offset_h + stride_h * i] < hEps) + globalResidual[offset_h + stride_h * i] = 0; } else { // Distribute residual // NOTE: MASS MATRIX IS CONSISTENT @@ -1589,28 +1681,34 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); + xt::pyarray &mesh_velocity_dof = + args.array("mesh_velocity_dof"); double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -1622,13 +1720,11 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -1636,15 +1732,6 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &h_dof = args.array("h_dof"); xt::pyarray &hu_dof = args.array("hu_dof"); xt::pyarray &hv_dof = args.array("hv_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -1665,13 +1752,16 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &csrRowIndeces_h_h = args.array("csrRowIndeces_h_h"); xt::pyarray &csrColumnOffsets_h_h = args.array("csrColumnOffsets_h_h"); - xt::pyarray &csrRowIndeces_h_hu = args.array("csrRowIndeces_h_hu"); + xt::pyarray &csrRowIndeces_h_hu = + args.array("csrRowIndeces_h_hu"); xt::pyarray &csrColumnOffsets_h_hu = args.array("csrColumnOffsets_h_hu"); - xt::pyarray &csrRowIndeces_h_hv = args.array("csrRowIndeces_h_hv"); + xt::pyarray &csrRowIndeces_h_hv = + args.array("csrRowIndeces_h_hv"); xt::pyarray &csrColumnOffsets_h_hv = args.array("csrColumnOffsets_h_hv"); - xt::pyarray &csrRowIndeces_hu_h = args.array("csrRowIndeces_hu_h"); + xt::pyarray &csrRowIndeces_hu_h = + args.array("csrRowIndeces_hu_h"); xt::pyarray &csrColumnOffsets_hu_h = args.array("csrColumnOffsets_hu_h"); xt::pyarray &csrRowIndeces_hu_hu = @@ -1682,7 +1772,8 @@ class SW2DCV : public SW2DCV_base { args.array("csrRowIndeces_hu_hv"); xt::pyarray &csrColumnOffsets_hu_hv = args.array("csrColumnOffsets_hu_hv"); - xt::pyarray &csrRowIndeces_hv_h = args.array("csrRowIndeces_hv_h"); + xt::pyarray &csrRowIndeces_hv_h = + args.array("csrRowIndeces_hv_h"); xt::pyarray &csrColumnOffsets_hv_h = args.array("csrColumnOffsets_hv_h"); xt::pyarray &csrRowIndeces_hv_hu = @@ -1725,7 +1816,8 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); @@ -1825,28 +1917,34 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &mesh_grad_trial_ref = args.array("mesh_grad_trial_ref"); xt::pyarray &mesh_dof = args.array("mesh_dof"); - xt::pyarray &mesh_velocity_dof = args.array("mesh_velocity_dof"); + xt::pyarray &mesh_velocity_dof = + args.array("mesh_velocity_dof"); double MOVING_DOMAIN = args.scalar("MOVING_DOMAIN"); xt::pyarray &mesh_l2g = args.array("mesh_l2g"); xt::pyarray &dV_ref = args.array("dV_ref"); xt::pyarray &h_trial_ref = args.array("h_trial_ref"); - xt::pyarray &h_grad_trial_ref = args.array("h_grad_trial_ref"); + xt::pyarray &h_grad_trial_ref = + args.array("h_grad_trial_ref"); xt::pyarray &h_test_ref = args.array("h_test_ref"); - xt::pyarray &h_grad_test_ref = args.array("h_grad_test_ref"); + xt::pyarray &h_grad_test_ref = + args.array("h_grad_test_ref"); xt::pyarray &vel_trial_ref = args.array("vel_trial_ref"); xt::pyarray &vel_grad_trial_ref = args.array("vel_grad_trial_ref"); xt::pyarray &vel_test_ref = args.array("vel_test_ref"); - xt::pyarray &vel_grad_test_ref = args.array("vel_grad_test_ref"); + xt::pyarray &vel_grad_test_ref = + args.array("vel_grad_test_ref"); xt::pyarray &mesh_trial_trace_ref = args.array("mesh_trial_trace_ref"); xt::pyarray &mesh_grad_trial_trace_ref = args.array("mesh_grad_trial_trace_ref"); xt::pyarray &dS_ref = args.array("dS_ref"); - xt::pyarray &h_trial_trace_ref = args.array("h_trial_trace_ref"); + xt::pyarray &h_trial_trace_ref = + args.array("h_trial_trace_ref"); xt::pyarray &h_grad_trial_trace_ref = args.array("h_grad_trial_trace_ref"); - xt::pyarray &h_test_trace_ref = args.array("h_test_trace_ref"); + xt::pyarray &h_test_trace_ref = + args.array("h_test_trace_ref"); xt::pyarray &h_grad_test_trace_ref = args.array("h_grad_test_trace_ref"); xt::pyarray &vel_trial_trace_ref = @@ -1858,13 +1956,11 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &vel_grad_test_trace_ref = args.array("vel_grad_test_trace_ref"); xt::pyarray &normal_ref = args.array("normal_ref"); - xt::pyarray &boundaryJac_ref = args.array("boundaryJac_ref"); - xt::pyarray &elementDiameter = args.array("elementDiameter"); + xt::pyarray &boundaryJac_ref = + args.array("boundaryJac_ref"); + xt::pyarray &elementDiameter = + args.array("elementDiameter"); int nElements_global = args.scalar("nElements_global"); - double useRBLES = args.scalar("useRBLES"); - double useMetrics = args.scalar("useMetrics"); - double alphaBDF = args.scalar("alphaBDF"); - double nu = args.scalar("nu"); double g = args.scalar("g"); xt::pyarray &h_l2g = args.array("h_l2g"); xt::pyarray &vel_l2g = args.array("vel_l2g"); @@ -1872,15 +1968,6 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &h_dof = args.array("h_dof"); xt::pyarray &hu_dof = args.array("hu_dof"); xt::pyarray &hv_dof = args.array("hv_dof"); - xt::pyarray &h_dof_sge = args.array("h_dof_sge"); - xt::pyarray &hu_dof_sge = args.array("hu_dof_sge"); - xt::pyarray &hv_dof_sge = args.array("hv_dof_sge"); - xt::pyarray &q_mass_acc_beta_bdf = - args.array("q_mass_acc_beta_bdf"); - xt::pyarray &q_mom_hu_acc_beta_bdf = - args.array("q_mom_hu_acc_beta_bdf"); - xt::pyarray &q_mom_hv_acc_beta_bdf = - args.array("q_mom_hv_acc_beta_bdf"); xt::pyarray &q_cfl = args.array("q_cfl"); xt::pyarray &sdInfo_hu_hu_rowptr = args.array("sdInfo_hu_hu_rowptr"); @@ -1901,13 +1988,16 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &csrRowIndeces_h_h = args.array("csrRowIndeces_h_h"); xt::pyarray &csrColumnOffsets_h_h = args.array("csrColumnOffsets_h_h"); - xt::pyarray &csrRowIndeces_h_hu = args.array("csrRowIndeces_h_hu"); + xt::pyarray &csrRowIndeces_h_hu = + args.array("csrRowIndeces_h_hu"); xt::pyarray &csrColumnOffsets_h_hu = args.array("csrColumnOffsets_h_hu"); - xt::pyarray &csrRowIndeces_h_hv = args.array("csrRowIndeces_h_hv"); + xt::pyarray &csrRowIndeces_h_hv = + args.array("csrRowIndeces_h_hv"); xt::pyarray &csrColumnOffsets_h_hv = args.array("csrColumnOffsets_h_hv"); - xt::pyarray &csrRowIndeces_hu_h = args.array("csrRowIndeces_hu_h"); + xt::pyarray &csrRowIndeces_hu_h = + args.array("csrRowIndeces_hu_h"); xt::pyarray &csrColumnOffsets_hu_h = args.array("csrColumnOffsets_hu_h"); xt::pyarray &csrRowIndeces_hu_hu = @@ -1918,7 +2008,8 @@ class SW2DCV : public SW2DCV_base { args.array("csrRowIndeces_hu_hv"); xt::pyarray &csrColumnOffsets_hu_hv = args.array("csrColumnOffsets_hu_hv"); - xt::pyarray &csrRowIndeces_hv_h = args.array("csrRowIndeces_hv_h"); + xt::pyarray &csrRowIndeces_hv_h = + args.array("csrRowIndeces_hv_h"); xt::pyarray &csrColumnOffsets_hv_h = args.array("csrColumnOffsets_hv_h"); xt::pyarray &csrRowIndeces_hv_hu = @@ -1961,7 +2052,8 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &ebqe_bc_hu_ext = args.array("ebqe_bc_hu_ext"); xt::pyarray &ebqe_bc_flux_hu_diff_ext = args.array("ebqe_bc_flux_hu_diff_ext"); - xt::pyarray &ebqe_penalty_ext = args.array("ebqe_penalty_ext"); + xt::pyarray &ebqe_penalty_ext = + args.array("ebqe_penalty_ext"); xt::pyarray &ebqe_bc_hv_ext = args.array("ebqe_bc_hv_ext"); xt::pyarray &ebqe_bc_flux_hv_diff_ext = args.array("ebqe_bc_flux_hv_diff_ext"); diff --git a/proteus/mprans/SW2DCV.py b/proteus/mprans/SW2DCV.py index ae15914ccc..08798794fc 100644 --- a/proteus/mprans/SW2DCV.py +++ b/proteus/mprans/SW2DCV.py @@ -87,7 +87,6 @@ def choose_dt(self): argsDict["csrRowIndeces_DofLoops"] = rowptr_cMatrix argsDict["csrColumnOffsets_DofLoops"] = colind_cMatrix argsDict["hEps"] = self.transport.hEps - argsDict["hReg"] = self.transport.hReg argsDict["Cx"] = Cx argsDict["Cy"] = Cy argsDict["CTx"] = CTx @@ -255,8 +254,7 @@ class Coefficients(proteus.TransportCoefficients.TC_base): def __init__(self, bathymetry, - nu=1.004e-6, - g=9.8, + g=9.81, nd=2, sd=True, movingDomain=False, @@ -275,7 +273,6 @@ def __init__(self, self.useRBLES = useRBLES self.useMetrics = useMetrics self.sd = sd - self.nu = nu self.g = g self.nd = nd self.cE = cE @@ -370,7 +367,6 @@ def preStep(self, t, firstStep=False): # Init reflectingBoundaryIndex for partial reflecting boundaries self.model.reflectingBoundaryIndex = np.where(np.isin(self.model.mesh.nodeMaterialTypes, 99))[0].tolist() - # then redefine as numpy array self.model.reflectingBoundaryIndex = np.array(self.model.reflectingBoundaryIndex) # self.model.h_dof_old[:] = self.model.u[0].dof @@ -570,9 +566,6 @@ def __init__(self, # To compute edge_based_cfl from within choose_dt of RKEV self.edge_based_cfl = np.zeros(self.u[0].dof.shape) self.dLow = None - self.hBT = None - self.huBT = None - self.hvBT = None # Old DOFs # NOTE (Mql): It is important to link h_dof_old by reference with u[0].dof (and so on). # This is because I need the initial condition to be passed to them as well (before calling calculateResidual). @@ -584,9 +577,6 @@ def __init__(self, # Vector for mass matrix self.check_positivity_water_height = True # mesh - self.h_dof_sge = self.u[0].dof.copy() - self.hu_dof_sge = self.u[1].dof.copy() - self.hv_dof_sge = self.u[2].dof.copy() self.q['x'] = np.zeros((self.mesh.nElements_global, self.nQuadraturePoints_element, 3), 'd') self.ebqe['x'] = np.zeros((self.mesh.nExteriorElementBoundaries_global, self.nElementBoundaryQuadraturePoints_elementBoundary, 3), 'd') self.ebq_global[('totalFlux', 0)] = np.zeros((self.mesh.nElementBoundaries_global, self.nElementBoundaryQuadraturePoints_elementBoundary), 'd') @@ -595,6 +585,7 @@ def __init__(self, self.q[('dV_u', 0)] = (old_div(1.0, self.mesh.nElements_global)) * np.ones((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') self.q[('dV_u', 1)] = (old_div(1.0, self.mesh.nElements_global)) * np.ones((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') self.q[('dV_u', 2)] = (old_div(1.0, self.mesh.nElements_global)) * np.ones((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') + self.q['dV'] = self.q[('dV_u',0)] self.q[('u', 0)] = np.zeros((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') self.q[('u', 1)] = np.zeros((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') self.q[('u', 2)] = np.zeros((self.mesh.nElements_global, self.nQuadraturePoints_element), 'd') @@ -714,22 +705,35 @@ def __init__(self, self.hReg = None self.ML = None # lumped mass matrix self.MC_global = None # consistent mass matrix - # Global C Matrices (mql) + ### Global C Matrices (mql) self.cterm_global = None self.cterm_transpose_global = None - # For FCT + ### For convex limiting + self.urelax = None + self.drelax = None + self.dH_minus_dL = None + self.muH_minus_muL = None + self.size_of_domain = None + # + self.hLow = None + self.huLow = None + self.hvLow = None + # + self.limited_hnp1 = None + self.limited_hunp1 = None + self.limited_hvnp1 = None + self.h_min = None + self.h_max = None + self.kin_max = None + # self.extendedSourceTerm_hu = None self.extendedSourceTerm_hv = None self.new_SourceTerm_hu = None self.new_SourceTerm_hv = None - # for EV + ## for EV self.dij_small = None self.global_entropy_residual = None - - self.dH_minus_dL = None - self.muH_minus_muL = None - self.size_of_domain = None # for relaxation of bounds - # NORMALS + ## NORMALS self.COMPUTE_NORMALS = 1 self.normalx = None self.normaly = None @@ -830,10 +834,6 @@ def __init__(self, self.u[cj].femSpace, dofBoundaryConditionsSetterDict[cj], weakDirichletConditions=False) compKernelFlag = 0 - # if self.coefficients.useConstantH: - # self.elementDiameter = self.mesh.elementDiametersArray.copy() - # self.elementDiameter[:] = max(self.mesh.elementDiametersArray) - # else: self.elementDiameter = self.mesh.elementDiametersArray print(self.nSpace_global, " nSpace_global") self.sw2d = cSW2DCV_base(self.nSpace_global, @@ -907,15 +907,16 @@ def FCTStep(self): argsDict["dH_minus_dL"] = self.dH_minus_dL argsDict["muH_minus_muL"] = self.muH_minus_muL argsDict["hEps"] = self.hEps - argsDict["hReg"] = self.hReg argsDict["LUMPED_MASS_MATRIX"] = self.coefficients.LUMPED_MASS_MATRIX argsDict["dLow"] = self.dLow - argsDict["hBT"] = self.hBT - argsDict["huBT"] = self.huBT - argsDict["hvBT"] = self.hvBT argsDict["new_SourceTerm_hu"] = self.new_SourceTerm_hu argsDict["new_SourceTerm_hv"] = self.new_SourceTerm_hv - argsDict["size_of_domain"] = self.size_of_domain + argsDict["hLow"] = self.hLow + argsDict["huLow"] = self.huLow + argsDict["hvLow"] = self.hvLow + argsDict["h_min"] = self.h_min + argsDict["h_max"] = self.h_max + argsDict["kin_max"] = self.kin_max self.sw2d.convexLimiting(argsDict) # Pass the post processed hnp1 solution to global solution u @@ -1213,14 +1214,25 @@ def initDataStructures(self): # boundary Index: I do this in preStep since I need normalx and normaly to be initialized first # Allocate space for dLow (for the first stage in the SSP method) self.dLow = np.zeros(self.Cx.shape, 'd') - self.hBT = np.zeros(self.Cx.shape, 'd') - self.huBT = np.zeros(self.Cx.shape, 'd') - self.hvBT = np.zeros(self.Cx.shape, 'd') # get coordinates of DOFs self.getDOFsCoord() # some vectors for convex limiting + self.urelax = np.zeros(self.u[0].dof.shape, 'd') + self.drelax = np.zeros(self.u[0].dof.shape, 'd') self.dH_minus_dL = np.zeros(self.Cx.shape, 'd') self.muH_minus_muL = np.zeros(self.Cx.shape, 'd') + # + self.hLow = np.zeros(self.u[0].dof.shape, 'd') + self.huLow = np.zeros(self.u[0].dof.shape, 'd') + self.hvLow = np.zeros(self.u[0].dof.shape, 'd') + # + self.limited_hnp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hunp1 = np.zeros(self.u[0].dof.shape, 'd') + self.limited_hvnp1 = np.zeros(self.u[0].dof.shape, 'd') + self.h_min = np.zeros(self.u[0].dof.shape, 'd') + self.h_max = np.zeros(self.u[0].dof.shape, 'd') + self.kin_max = np.zeros(self.u[0].dof.shape, 'd') + # self.extendedSourceTerm_hu = np.zeros(self.u[0].dof.shape, 'd') self.extendedSourceTerm_hv = np.zeros(self.u[0].dof.shape, 'd') self.new_SourceTerm_hu = np.zeros(self.u[0].dof.shape, 'd') @@ -1234,6 +1246,52 @@ def initDataStructures(self): nghosts = self.u[0].par_dof.nghosts subdomain2global=self.u[0].femSpace.dofMap.subdomain2global # + self.par_urelax = LAT.ParVec_petsc4py(self.urelax, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_drelax = LAT.ParVec_petsc4py(self.drelax, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hLow = LAT.ParVec_petsc4py(self.hLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_huLow = LAT.ParVec_petsc4py(self.huLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_hvLow = LAT.ParVec_petsc4py(self.hvLow, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + # + self.par_limited_hnp1= LAT.ParVec_petsc4py(self.limited_hnp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hunp1 = LAT.ParVec_petsc4py(self.limited_hunp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_limited_hvnp1 = LAT.ParVec_petsc4py(self.limited_hvnp1, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_h_min = LAT.ParVec_petsc4py(self.h_min, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_h_max = LAT.ParVec_petsc4py(self.h_max, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + self.par_kin_max = LAT.ParVec_petsc4py(self.kin_max, + bs=1, + n=n,N=N,nghosts=nghosts, + subdomain2global=subdomain2global) + # self.par_extendedSourceTerm_hu = LAT.ParVec_petsc4py(self.extendedSourceTerm_hu, bs=1, n=n,N=N,nghosts=nghosts, @@ -1250,6 +1308,7 @@ def initDataStructures(self): bs=1, n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) + # self.par_global_entropy_residual = LAT.ParVec_petsc4py(self.global_entropy_residual, bs=1, n=n,N=N,nghosts=nghosts, @@ -1267,6 +1326,11 @@ def initDataStructures(self): n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) self.par_ML.scatter_forward_insert() + + self.urelax = 1.0 + pow(np.sqrt(np.sqrt(self.ML / self.size_of_domain)),3) + self.drelax = 1.0 - pow(np.sqrt(np.sqrt(self.ML / self.size_of_domain)),3) + self.par_urelax.scatter_forward_insert() + self.par_drelax.scatter_forward_insert() # self.dataStructuresInitialized = True # @@ -1324,13 +1388,12 @@ def getResidual(self, u, r): # lets call calculate EV first and distribute self.computeEV() + self.par_global_entropy_residual.scatter_forward_insert() argsDict = cArgumentsDict.ArgumentsDict() argsDict["mesh_trial_ref"] = self.u[0].femSpace.elementMaps.psi argsDict["mesh_grad_trial_ref"] = self.u[0].femSpace.elementMaps.grad_psi argsDict["mesh_dof"] = self.mesh.nodeArray - argsDict["mesh_velocity_dof"] = self.mesh.nodeVelocityArray - argsDict["MOVING_DOMAIN"] = self.MOVING_DOMAIN argsDict["mesh_l2g"] = self.mesh.elementNodesArray argsDict["dV_ref"] = self.elementQuadratureWeights[('u', 0)] argsDict["h_trial_ref"] = self.u[0].femSpace.psi @@ -1343,7 +1406,6 @@ def getResidual(self, u, r): argsDict["vel_grad_test_ref"] = self.u[1].femSpace.grad_psi argsDict["mesh_trial_trace_ref"] = self.u[0].femSpace.elementMaps.psi_trace argsDict["mesh_grad_trial_trace_ref"] = self.u[0].femSpace.elementMaps.grad_psi_trace - argsDict["dS_ref"] = self.elementBoundaryQuadratureWeights[('u', 0)] argsDict["h_trial_trace_ref"] = self.u[0].femSpace.psi_trace argsDict["h_grad_trial_trace_ref"] = self.u[0].femSpace.grad_psi_trace argsDict["h_test_trace_ref"] = self.u[0].femSpace.psi_trace @@ -1356,10 +1418,6 @@ def getResidual(self, u, r): argsDict["boundaryJac_ref"] = self.u[0].femSpace.elementMaps.boundaryJacobians argsDict["elementDiameter"] = self.elementDiameter argsDict["nElements_global"] = self.mesh.nElements_global - argsDict["useRBLES"] = self.coefficients.useRBLES - argsDict["useMetrics"] = self.coefficients.useMetrics - argsDict["alphaBDF"] = self.timeIntegration.alpha_bdf - argsDict["nu"] = self.coefficients.nu argsDict["g"] = self.coefficients.g argsDict["h_l2g"] = self.u[0].femSpace.dofMap.l2g argsDict["vel_l2g"] = self.u[1].femSpace.dofMap.l2g @@ -1370,16 +1428,6 @@ def getResidual(self, u, r): argsDict["h_dof"] = self.u[0].dof argsDict["hu_dof"] = self.u[1].dof argsDict["hv_dof"] = self.u[2].dof - argsDict["h_dof_sge"] = self.h_dof_sge - argsDict["hu_dof_sge"] = self.hu_dof_sge - argsDict["hv_dof_sge"] = self.hv_dof_sge - argsDict["q_mass_acc"] = self.timeIntegration.m_tmp[0] - argsDict["q_mom_hu_acc"] = self.timeIntegration.m_tmp[1] - argsDict["q_mom_hv_acc"] = self.timeIntegration.m_tmp[2] - argsDict["q_mass_adv"] = self.q[('f', 0)] - argsDict["q_mass_acc_beta_bdf"] = self.timeIntegration.beta_bdf[0] - argsDict["q_mom_hu_acc_beta_bdf"] = self.timeIntegration.beta_bdf[1] - argsDict["q_mom_hv_acc_beta_bdf"] = self.timeIntegration.beta_bdf[2] argsDict["q_cfl"] = self.q[('cfl', 0)] argsDict["sdInfo_hu_hu_rowptr"] = self.coefficients.sdInfo[(1, 1)][0] argsDict["sdInfo_hu_hu_colind"] = self.coefficients.sdInfo[(1, 1)][1] @@ -1433,7 +1481,6 @@ def getResidual(self, u, r): argsDict["cfl_run"] = self.timeIntegration.runCFL argsDict["eps"] = self.eps argsDict["hEps"] = self.hEps - argsDict["hReg"] = self.hReg argsDict["hnp1_at_quad_point"] = self.q[('u', 0)] argsDict["hunp1_at_quad_point"] = self.q[('u', 1)] argsDict["hvnp1_at_quad_point"] = self.q[('u', 2)] @@ -1452,22 +1499,40 @@ def getResidual(self, u, r): argsDict["normalx"] = self.normalx argsDict["normaly"] = self.normaly argsDict["dLow"] = self.dLow - argsDict["hBT"] = self.hBT - argsDict["huBT"] = self.huBT - argsDict["hvBT"] = self.hvBT argsDict["lstage"] = self.timeIntegration.lstage argsDict["new_SourceTerm_hu"] = self.new_SourceTerm_hu argsDict["new_SourceTerm_hv"] = self.new_SourceTerm_hv argsDict["global_entropy_residual"] = self.global_entropy_residual argsDict["dij_small"] = self.dij_small + argsDict["hLow"] = self.hLow + argsDict["huLow"] = self.huLow + argsDict["hvLow"] = self.hvLow + argsDict["h_min"] = self.h_min + argsDict["h_max"] = self.h_max + argsDict["kin_max"] = self.kin_max + argsDict["size_of_domain"] = self.size_of_domain + argsDict["urelax"] = self.urelax + argsDict["drelax"] = self.drelax - # call calculate residual - self.par_global_entropy_residual.scatter_forward_insert() + ## call calculate residual self.calculateResidual(argsDict) - # distribute source terms + ## distribute local bounds and low order solutions (with bar states) + self.par_hLow.scatter_forward_insert() + self.par_huLow.scatter_forward_insert() + self.par_hvLow.scatter_forward_insert() + self.par_limited_hnp1.scatter_forward_insert() + self.par_limited_hunp1.scatter_forward_insert() + self.par_limited_hvnp1.scatter_forward_insert() + # + self.par_h_min.scatter_forward_insert() + self.par_h_max.scatter_forward_insert() + self.par_kin_max.scatter_forward_insert() + + ## distribute source terms (not sure if needed) self.par_extendedSourceTerm_hu.scatter_forward_insert() self.par_extendedSourceTerm_hv.scatter_forward_insert() + ## self.par_new_SourceTerm_hu.scatter_forward_insert() self.par_new_SourceTerm_hv.scatter_forward_insert() @@ -1542,10 +1607,6 @@ def getJacobian(self, jacobian): argsDict["boundaryJac_ref"] = self.u[0].femSpace.elementMaps.boundaryJacobians argsDict["elementDiameter"] = self.elementDiameter argsDict["nElements_global"] = self.mesh.nElements_global - argsDict["useRBLES"] = self.coefficients.useRBLES - argsDict["useMetrics"] = self.coefficients.useMetrics - argsDict["alphaBDF"] = self.timeIntegration.alpha_bdf - argsDict["nu"] = self.coefficients.nu argsDict["g"] = self.coefficients.g argsDict["h_l2g"] = self.u[0].femSpace.dofMap.l2g argsDict["vel_l2g"] = self.u[1].femSpace.dofMap.l2g @@ -1553,12 +1614,6 @@ def getJacobian(self, jacobian): argsDict["h_dof"] = self.u[0].dof argsDict["hu_dof"] = self.u[1].dof argsDict["hv_dof"] = self.u[2].dof - argsDict["h_dof_sge"] = self.h_dof_sge - argsDict["hu_dof_sge"] = self.hu_dof_sge - argsDict["hv_dof_sge"] = self.hv_dof_sge - argsDict["q_mass_acc_beta_bdf"] = self.timeIntegration.beta_bdf[0] - argsDict["q_mom_hu_acc_beta_bdf"] = self.timeIntegration.beta_bdf[1] - argsDict["q_mom_hv_acc_beta_bdf"] = self.timeIntegration.beta_bdf[2] argsDict["q_cfl"] = self.q[('cfl', 0)] argsDict["sdInfo_hu_hu_rowptr"] = self.coefficients.sdInfo[(1, 1)][0] argsDict["sdInfo_hu_hu_colind"] = self.coefficients.sdInfo[(1, 1)][1] @@ -1756,9 +1811,6 @@ def calculateSolutionAtQuadrature(self): pass def calculateAuxiliaryQuantitiesAfterStep(self): - self.h_dof_sge[:] = self.u[0].dof - self.hu_dof_sge[:] = self.u[1].dof - self.hv_dof_sge[:] = self.u[2].dof OneLevelTransport.calculateAuxiliaryQuantitiesAfterStep(self) def getForce(self, cg, forceExtractionFaces, force, moment): From dfeeebd0ff756e893e2924c53ddaa6b9d3870b3b Mon Sep 17 00:00:00 2001 From: ejtovar Date: Wed, 17 Feb 2021 20:33:19 -0600 Subject: [PATCH 04/11] fixed some bugs related to convex limiting --- proteus/mprans/GN_SW2DCV.h | 137 ++++++++++++++++++------------------ proteus/mprans/GN_SW2DCV.py | 12 +++- proteus/mprans/SW2DCV.h | 87 ++++++++++++----------- proteus/mprans/SW2DCV.py | 7 +- 4 files changed, 127 insertions(+), 116 deletions(-) diff --git a/proteus/mprans/GN_SW2DCV.h b/proteus/mprans/GN_SW2DCV.h index 759de4febf..c6444706fe 100644 --- a/proteus/mprans/GN_SW2DCV.h +++ b/proteus/mprans/GN_SW2DCV.h @@ -232,6 +232,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &heta_min = args.array("heta_min"); xt::pyarray &heta_max = args.array("heta_max"); xt::pyarray &kin_max = args.array("kin_max"); + double KE_tiny = args.scalar("KE_tiny"); // Declare stuff for limiting on h and h*heta std::valarray Rneg(0.0, numDOFs), Rpos(0.0, numDOFs), @@ -435,9 +436,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { } } // i loop ends here - // for limiting kinetic energy - auto KE_tiny = xt::amax(kin_max)[0] * hEps; - /* Here we compute the limiters Lij_array */ ij = 0; for (int i = 0; i < numDOFs; i++) { @@ -1324,31 +1322,16 @@ class GN_SW2DCV : public GN_SW2DCV_base { } } - // define pressure at jth node for bar states - double pressure_j = 0.5 * g * hj * hj + pTildej; - - // Compute star states - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = hui * hStarij * one_over_hiReg; - double hvStarij = hvi * hStarij * one_over_hiReg; - double hetaStarij = hetai * std::pow(hStarij * one_over_hiReg, 2); - double hwStarij = hwi * hStarij * one_over_hiReg; - double hbetaStarij = hbetai * hStarij * one_over_hiReg; - - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = huj * hStarji * one_over_hjReg; - double hvStarji = hvj * hStarji * one_over_hjReg; - double hetaStarji = hetaj * std::pow(hStarji * one_over_hjReg, 2); - double hwStarji = hwj * hStarji * one_over_hjReg; - double hbetaStarji = hbetaj * hStarji * one_over_hjReg; - // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin double muLowij = 0., muLij = 0., dLowij = 0., dLij = 0.; + if (i != j) { // Put these computations first before it gets messy - bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; - bar_deltaSqd_heta[i] += delta_Sqd_heta[j] + delta_Sqd_heta[i]; - bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; + bar_deltaSqd_h[i] += 0.5 * delta_Sqd_h[j] + 0.5 * delta_Sqd_h[i]; + bar_deltaSqd_heta[i] += + 0.5 * delta_Sqd_heta[j] + 0.5 * delta_Sqd_heta[i]; + bar_deltaSqd_kin[i] += + 0.5 * delta_Sqd_kin[j] + 0.5 * delta_Sqd_kin[i]; if (lstage == 0) dLowij = dLow[ij]; @@ -1381,55 +1364,74 @@ class GN_SW2DCV : public GN_SW2DCV_base { //////////////////////// // COMPUTE BAR STATES // //////////////////////// - double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, - hvBar_ij = 0, hvTilde_ij = 0, hetaBar_ij = 0, - hetaTilde_ij = 0, hwBar_ij = 0, hwTilde_ij = 0, - hbetaBar_ij = 0, hbetaTilde_ij = 0; + + // define pressure at jth node for bar states + double pressure_j = 0.5 * g * hj * hj + pTildej; + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = hui * hStarij * one_over_hiReg; + double hvStarij = hvi * hStarij * one_over_hiReg; + double hetaStarij = hetai * std::pow(hStarij * one_over_hiReg, 2); + double hwStarij = hwi * hStarij * one_over_hiReg; + double hbetaStarij = hbetai * hStarij * one_over_hiReg; + + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = huj * hStarji * one_over_hjReg; + double hvStarji = hvj * hStarji * one_over_hjReg; + double hetaStarji = hetaj * std::pow(hStarji * one_over_hjReg, 2); + double hwStarji = hwj * hStarji * one_over_hjReg; + double hbetaStarji = hbetaj * hStarji * one_over_hjReg; + + double hBar_ij = 0., hTilde_ij = 0., huBar_ij = 0., huTilde_ij = 0., + hvBar_ij = 0., hvTilde_ij = 0., hetaBar_ij = 0., + hetaTilde_ij = 0., hwBar_ij = 0., hwTilde_ij = 0., + hbetaBar_ij = 0., hbetaTilde_ij = 0.; // h component - hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + hBar_ij = -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]) + 0.5 * (hj + hi); - hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hStarji - hj) - (hStarij - hi)); + hTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hStarji - hj - (hStarij - hi)); // hu component huBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * + -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]) + 0.5 * (huj + hui); - huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((huStarji - huj) - (huStarij - hui)); + huTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (huStarji - huj - (huStarij - hui)); // hv component hvBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * + -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + 0.5 * (hvj + hvi); - hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hvStarji - hvj) - (hvStarij - hvi)); + hvTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hvStarji - hvj - (hvStarij - hvi)); // heta component - hetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + hetaBar_ij = -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hetaj - ui * hetai) * Cx[ij] + (vj * hetaj - vi * hetai) * Cy[ij]) + 0.5 * (hetaj + hetai); - hetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hetaStarji - hetaj) - (hetaStarij - hetai)); + hetaTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hetaStarji - hetaj - (hetaStarij - hetai)); // hw component - hwBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + hwBar_ij = -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hwj - ui * hwi) * Cx[ij] + (vj * hwj - vi * hwi) * Cy[ij]) + 0.5 * (hwj + hwi); - hwTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hwStarji - hwj) - (hwStarij - hwi)); + hwTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hwStarji - hwj - (hwStarij - hwi)); // hbeta component - hbetaBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + hbetaBar_ij = -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hbetaj - ui * hbetai) * Cx[ij] + (vj * hbetaj - vi * hbetai) * Cy[ij]) + 0.5 * (hbetaj + hbetai); - hbetaTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hbetaStarji - hbetaj) - (hbetaStarij - hbetai)); + hbetaTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hbetaStarji - hbetaj - (hbetaStarij - hbetai)); // Here we define uBar + uTilde hBT[ij] = hBar_ij + hTilde_ij; @@ -1500,9 +1502,9 @@ class GN_SW2DCV : public GN_SW2DCV_base { double one_over_hBT = 2.0 * hBT[ij] / (hBT[ij] * hBT[ij] + std::pow(fmax(hBT[ij], hEps), 2)); - double psi_ij = - one_over_hBT * 0.5 * - (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]); // Eqn (6.31) + double psi_ij = one_over_hBT * + (huBT[ij] * huBT[ij] + hvBT[ij] * hvBT[ij]) / + 2.0; // Eqn (6.31) // COMPUTE LOCAL BOUNDS // kin_max[i] = fmax(psi_ij, kin_max[i]); @@ -1511,22 +1513,6 @@ class GN_SW2DCV : public GN_SW2DCV_base { heta_min[i] = std::min(heta_min[i], hetaBT[ij]); heta_max[i] = std::max(heta_max[i], hetaBT[ij]); - // Then do relaxation of bounds here. If confused, see convex - // limiting paper - kin_max[i] = - std::min(urelax[i] * kin_max[i], - kin_max[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); - h_min[i] = std::max(drelax[i] * h_min[i], - h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); - h_max[i] = std::min(urelax[i] * h_max[i], - h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); - heta_min[i] = - std::max(drelax[i] * heta_min[i], - heta_min[i] - std::abs(bar_deltaSqd_heta[i]) / 2.0); - heta_max[i] = - std::min(urelax[i] * heta_max[i], - heta_max[i] + std::abs(bar_deltaSqd_heta[i]) / 2.0); - /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ // This is low order solution WITHOUT sources if (i != j) { @@ -1547,6 +1533,19 @@ class GN_SW2DCV : public GN_SW2DCV_base { ij += 1; } // j loop ends here + // Then do relaxation of bounds here. If confused, see convex + // limiting paper + kin_max[i] = std::min(urelax[i] * kin_max[i], + kin_max[i] + std::abs(bar_deltaSqd_kin[i])); + h_min[i] = std::max(drelax[i] * h_min[i], + h_min[i] - std::abs(bar_deltaSqd_h[i])); + h_max[i] = std::min(urelax[i] * h_max[i], + h_max[i] + std::abs(bar_deltaSqd_h[i])); + heta_min[i] = std::max(drelax[i] * heta_min[i], + heta_min[i] - std::abs(bar_deltaSqd_heta[i])); + heta_max[i] = std::min(urelax[i] * heta_max[i], + heta_max[i] + std::abs(bar_deltaSqd_heta[i])); + // clean up hLow from round off error if (hLow[i] < hEps) { hLow[i] = 0.0; @@ -1652,7 +1651,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { hyp_flux_hbeta[i] = 0; // FOR SMOOTHNESS INDICATOR // - double alphai; // smoothness indicator of solution + double alphai; double alpha_numerator = 0; double alpha_denominator = 0; double alpha_zero = 0.5; // if only want smoothness @@ -1767,8 +1766,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { if (POWER_SMOOTHNESS_INDICATOR == 0) psi[i] = 1.0; else - psi[i] = std::pow( - alphai, POWER_SMOOTHNESS_INDICATOR); // NOTE: alpha^4 for mGN + psi[i] = std::pow(alphai, POWER_SMOOTHNESS_INDICATOR); } } // ********** END OF 2nd LOOP ON DOFS ********** // @@ -1861,8 +1859,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { // define pressure at jth node double pressure_j = 0.5 * g * hj * hj + pTildej; - // COMPUTE STAR SOLUTION // hStar, huStar, hvStar, hetaStar, hwStar, - // hbetaStar + // COMPUTE STAR STATES double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); double huStarij = hui * hStarij * one_over_hiReg; double hvStarij = hvi * hStarij * one_over_hiReg; diff --git a/proteus/mprans/GN_SW2DCV.py b/proteus/mprans/GN_SW2DCV.py index ce6544568e..93c9bbf502 100644 --- a/proteus/mprans/GN_SW2DCV.py +++ b/proteus/mprans/GN_SW2DCV.py @@ -816,6 +816,7 @@ def __init__(self, self.heta_min = None self.heta_max = None self.kin_max = None + self.KE_tiny = None # self.extendedSourceTerm_hu = None self.extendedSourceTerm_hv = None @@ -975,6 +976,8 @@ def __init__(self, def FCTStep(self): # NOTE: this function is meant to be called within the solver + comm = Comm.get() + rowptr, colind, MassMatrix = self.MC_global.getCSRrepresentation() # Extract hnp1 from global solution u index = list(range(0, len(self.timeIntegration.u))) @@ -988,9 +991,11 @@ def FCTStep(self): limited_hnp1 = np.zeros(self.h_dof_old.shape) limited_hunp1 = np.zeros(self.h_dof_old.shape) limited_hvnp1 = np.zeros(self.h_dof_old.shape) - # limited_hetanp1 = np.zeros(self.h_dof_old.shape) - # limited_hwnp1 = np.zeros(self.h_dof_old.shape) - # limited_hbetanp1 = np.zeros(self.h_dof_old.shape) + limited_hetanp1 = np.zeros(self.h_dof_old.shape) + limited_hwnp1 = np.zeros(self.h_dof_old.shape) + limited_hbetanp1 = np.zeros(self.h_dof_old.shape) + + self.KE_tiny = self.hEps * comm.globalMax(np.amax(self.kin_max)) argsDict = cArgumentsDict.ArgumentsDict() argsDict["dt"] = self.timeIntegration.dt @@ -1050,6 +1055,7 @@ def FCTStep(self): argsDict["heta_min"] = self.heta_min argsDict["heta_max"] = self.heta_max argsDict["kin_max"] = self.kin_max + argsDict["KE_tiny"] = self.KE_tiny self.dsw_2d.convexLimiting(argsDict) # scatter forward diff --git a/proteus/mprans/SW2DCV.h b/proteus/mprans/SW2DCV.h index dc979526c1..57b88748ba 100644 --- a/proteus/mprans/SW2DCV.h +++ b/proteus/mprans/SW2DCV.h @@ -274,6 +274,7 @@ class SW2DCV : public SW2DCV_base { xt::pyarray &h_min = args.array("h_min"); xt::pyarray &h_max = args.array("h_max"); xt::pyarray &kin_max = args.array("kin_max"); + double KE_tiny = args.scalar("KE_tiny"); // Declare stuff for limiting on h and h*heta std::valarray Rneg(0.0, numDOFs), Rpos(0.0, numDOFs); @@ -419,12 +420,10 @@ class SW2DCV : public SW2DCV_base { } } // i loop ends here - // for limiting kinetic energy - auto KE_tiny = xt::amax(kin_max)[0] * hEps; - /* Here we compute the limiters Lij_array */ ij = 0; for (int i = 0; i < numDOFs; i++) { + double mi = lumped_mass_matrix[i]; double ci = kin_max[i] * hLow[i] - @@ -433,6 +432,7 @@ class SW2DCV : public SW2DCV_base { // LOOP OVER THE SPARSITY PATTERN (j-LOOP)// for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + int j = csrColumnOffsets_DofLoops[offset]; if (j != i) { @@ -618,6 +618,7 @@ class SW2DCV : public SW2DCV_base { for (int offset = csrRowIndeces_DofLoops[i]; offset < csrRowIndeces_DofLoops[i + 1]; offset++) { + // loop in j (sparsity pattern) int j = csrColumnOffsets_DofLoops[offset]; @@ -1099,7 +1100,7 @@ class SW2DCV : public SW2DCV_base { kin *= 2.0 * h_dof_old / (h_dof_old * h_dof_old + max_of_h_and_hEps * max_of_h_and_hEps); - /* First loop to define: delta_Sqd_h, delta_Sqd_heta, delta_Sqd_kin */ + /* First loop to define: delta_Sqd_h, delta_Sqd_kin */ for (int i = 0; i < numDOFsPerEqn; i++) { for (int offset = csrRowIndeces_DofLoops[i]; @@ -1150,23 +1151,15 @@ class SW2DCV : public SW2DCV_base { 2.0 * hj / (hj * hj + std::pow(fmax(hj, hEps), 2)); double uj = huj * one_over_hjReg; double vj = hvj * one_over_hjReg; - // define pressure at jth node for bar states - double pressure_j = 0.5 * g * hj * hj; - - // Compute star states - double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); - double huStarij = hui * hStarij * one_over_hiReg; - double hvStarij = hvi * hStarij * one_over_hiReg; - double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); - double huStarji = huj * hStarji * one_over_hjReg; - double hvStarji = hvj * hStarji * one_over_hjReg; // for bar_deltaSqd_h, bar_deltaSqd_heta, bar_deltaSqd_kin double muLowij = 0., muLij = 0., dLowij = 0., dLij = 0.; + if (i != j) { // Put these computations first before it gets messy - bar_deltaSqd_h[i] += delta_Sqd_h[j] + delta_Sqd_h[i]; - bar_deltaSqd_kin[i] += delta_Sqd_kin[j] + delta_Sqd_kin[i]; + bar_deltaSqd_h[i] += 0.5 * delta_Sqd_h[j] + 0.5 * delta_Sqd_h[i]; + bar_deltaSqd_kin[i] += + 0.5 * delta_Sqd_kin[j] + 0.5 * delta_Sqd_kin[i]; if (lstage == 0) dLowij = dLow[ij]; @@ -1197,32 +1190,44 @@ class SW2DCV : public SW2DCV_base { //////////////////////// // COMPUTE BAR STATES // //////////////////////// - double hBar_ij = 0, hTilde_ij = 0, huBar_ij = 0, huTilde_ij = 0, - hvBar_ij = 0, hvTilde_ij = 0; + + // define pressure at jth node for bar states + double pressure_j = 0.5 * g * hj * hj; + + // Compute star states + double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); + double huStarij = hui * hStarij * one_over_hiReg; + double hvStarij = hvi * hStarij * one_over_hiReg; + double hStarji = fmax(0., hj + Zj - fmax(Zi, Zj)); + double huStarji = huj * hStarji * one_over_hjReg; + double hvStarji = hvj * hStarji * one_over_hjReg; + + double hBar_ij = 0., hTilde_ij = 0., huBar_ij = 0., huTilde_ij = 0., + hvBar_ij = 0., hvTilde_ij = 0.; // h component - hBar_ij = -1. / (fmax(2.0 * dLij, dij_small)) * + hBar_ij = -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hj - ui * hi) * Cx[ij] + (vj * hj - vi * hi) * Cy[ij]) + 0.5 * (hj + hi); - hTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hStarji - hj) - (hStarij - hi)); + hTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hStarji - hj - (hStarij - hi)); // hu component huBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * + -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * huj - ui * hui + pressure_j - pressure_i) * Cx[ij] + (vj * huj - vi * hui) * Cy[ij]) + 0.5 * (huj + hui); - huTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((huStarji - huj) - (huStarij - hui)); + huTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (huStarji - huj - (huStarij - hui)); // hv component hvBar_ij = - -1. / (fmax(2.0 * dLij, dij_small)) * + -1. / (2.0 * fmax(dLij, dij_small)) * ((uj * hvj - ui * hvi) * Cx[ij] + (vj * hvj - vi * hvi + pressure_j - pressure_i) * Cy[ij]) + 0.5 * (hvj + hvi); - hvTilde_ij = (dLij - muLij) / (fmax(2.0 * dLij, dij_small)) * - ((hvStarji - hvj) - (hvStarij - hvi)); + hvTilde_ij = (dLij - muLij) / (2.0 * fmax(dLij, dij_small)) * + (hvStarji - hvj - (hvStarij - hvi)); // Here we define uBar + uTilde hBT[ij] = hBar_ij + hTilde_ij; @@ -1287,16 +1292,6 @@ class SW2DCV : public SW2DCV_base { h_min[i] = std::min(h_min[i], hBT[ij]); h_max[i] = std::max(h_max[i], hBT[ij]); - // Then do relaxation of bounds here. If confused, see convex - // limiting paper - kin_max[i] = - std::min(urelax[i] * kin_max[i], - kin_max[i] + std::abs(bar_deltaSqd_kin[i]) / 2.0); - h_min[i] = std::max(drelax[i] * h_min[i], - h_min[i] - std::abs(bar_deltaSqd_h[i]) / 2.0); - h_max[i] = std::min(urelax[i] * h_max[i], - h_max[i] + std::abs(bar_deltaSqd_h[i]) / 2.0); - /* COMPUTE LOW ORDER SOLUTION. See EQN 6.23 in SW friction paper */ // This is low order solution WITHOUT sources if (i != j) { @@ -1307,10 +1302,20 @@ class SW2DCV : public SW2DCV_base { hvLow[i] += hv_dof_old[i] * (-dt / mi * 2 * dLow[ij]) + dt / mi * (2 * dLow[ij] * hvBT[ij]); } + // UPDATE ij // ij += 1; } // j loop ends here + // Then do relaxation of bounds here. If confused, see convex + // limiting paper + kin_max[i] = std::min(urelax[i] * kin_max[i], + kin_max[i] + std::abs(bar_deltaSqd_kin[i])); + h_min[i] = std::max(drelax[i] * h_min[i], + h_min[i] - std::abs(bar_deltaSqd_h[i])); + h_max[i] = std::min(urelax[i] * h_max[i], + h_max[i] + std::abs(bar_deltaSqd_h[i])); + // clean up hLow from round off error if (hLow[i] < hEps) hLow[i] = 0.0; @@ -1378,7 +1383,7 @@ class SW2DCV : public SW2DCV_base { hyp_flux_hv[i] = 0; // FOR SMOOTHNESS INDICATOR // - double alphai; // smoothness indicator of solution + double alphai; double alpha_numerator = 0; double alpha_denominator = 0; double alpha_zero = 0.5; // if only want smoothness @@ -1447,9 +1452,7 @@ class SW2DCV : public SW2DCV_base { if (POWER_SMOOTHNESS_INDICATOR == 0) psi[i] = 1.0; else - psi[i] = std::pow( - alphai, - POWER_SMOOTHNESS_INDICATOR); // NOTE: alpha^2 in the paper + psi[i] = std::pow(alphai, POWER_SMOOTHNESS_INDICATOR); } } // ********** END OF 2nd LOOP ON DOFS ********** // @@ -1500,7 +1503,7 @@ class SW2DCV : public SW2DCV_base { // define pressure at jth node double pressure_j = 0.5 * g * hj * hj; - // COMPUTE STAR SOLUTION // hStar, huStar and hvStar + // COMPUTE STAR STATES double hStarij = fmax(0., hi + Zi - fmax(Zi, Zj)); double huStarij = hui * hStarij * one_over_hiReg; double hvStarij = hvi * hStarij * one_over_hiReg; diff --git a/proteus/mprans/SW2DCV.py b/proteus/mprans/SW2DCV.py index 08798794fc..d9e68e112c 100644 --- a/proteus/mprans/SW2DCV.py +++ b/proteus/mprans/SW2DCV.py @@ -725,6 +725,7 @@ def __init__(self, self.h_min = None self.h_max = None self.kin_max = None + self.KE_tiny = None # self.extendedSourceTerm_hu = None self.extendedSourceTerm_hv = None @@ -873,6 +874,7 @@ def __init__(self, def FCTStep(self): # NOTE: this function is meant to be called within the solver + comm = Comm.get() rowptr, colind, MassMatrix = self.MC_global.getCSRrepresentation() # Extract hnp1 from global solution u index = list(range(0, len(self.timeIntegration.u))) @@ -884,6 +886,8 @@ def FCTStep(self): limited_hunp1 = np.zeros(self.h_dof_old.shape) limited_hvnp1 = np.zeros(self.h_dof_old.shape) + self.KE_tiny = self.hEps * comm.globalMax(np.amax(self.kin_max)) + argsDict = cArgumentsDict.ArgumentsDict() argsDict["dt"] = self.timeIntegration.dt argsDict["NNZ"] = self.nnz @@ -917,6 +921,7 @@ def FCTStep(self): argsDict["h_min"] = self.h_min argsDict["h_max"] = self.h_max argsDict["kin_max"] = self.kin_max + argsDict["KE_tiny"] = self.kin_tiny self.sw2d.convexLimiting(argsDict) # Pass the post processed hnp1 solution to global solution u @@ -1201,7 +1206,7 @@ def initDataStructures(self): self.hu_dof_old = np.copy(self.u[1].dof) self.hv_dof_old = np.copy(self.u[2].dof) # hEps - self.eps = 1E-7 + self.eps = 1E-5 self.hEps = self.eps * comm.globalMax(self.u[0].dof.max()) # size_of_domain used in relaxation of bounds From fdfd95c1a0fafc13326b299fcd316f6a83b3ec07 Mon Sep 17 00:00:00 2001 From: ejtovar Date: Thu, 18 Feb 2021 12:27:45 -0600 Subject: [PATCH 05/11] removed some unnecessary lines --- proteus/mprans/GN_SW2DCV.py | 51 ------------------------------------- proteus/mprans/SW2DCV.py | 21 --------------- 2 files changed, 72 deletions(-) diff --git a/proteus/mprans/GN_SW2DCV.py b/proteus/mprans/GN_SW2DCV.py index 93c9bbf502..4a79bdeec6 100644 --- a/proteus/mprans/GN_SW2DCV.py +++ b/proteus/mprans/GN_SW2DCV.py @@ -1026,12 +1026,6 @@ def FCTStep(self): argsDict["limited_hetanp1"] = limited_hetanp1 argsDict["limited_hwnp1"] = limited_hwnp1 argsDict["limited_hbetanp1"] = limited_hbetanp1 - # argsDict["limited_hnp1"] = self.limited_hnp1 - # argsDict["limited_hunp1"] = self.limited_hunp1 - # argsDict["limited_hvnp1"] = self.limited_hvnp1 - # argsDict["limited_hetanp1"] = self.limited_hetanp1 - # argsDict["limited_hwnp1"] = self.limited_hwnp1 - # argsDict["limited_hbetanp1"] = self.limited_hbetanp1 argsDict["csrRowIndeces_DofLoops"] = rowptr argsDict["csrColumnOffsets_DofLoops"] = colind argsDict["MassMatrix"] = MassMatrix @@ -1058,14 +1052,6 @@ def FCTStep(self): argsDict["KE_tiny"] = self.KE_tiny self.dsw_2d.convexLimiting(argsDict) - # scatter forward - # self.par_limited_hnp1.scatter_forward_insert() - # self.par_limited_hunp1.scatter_forward_insert() - # self.par_limited_hvnp1.scatter_forward_insert() - # self.par_limited_hetanp1.scatter_forward_insert() - # self.par_limited_hwnp1.scatter_forward_insert() - # self.par_limited_hbetanp1.scatter_forward_insert() - # Pass the post processed hnp1 solution to global solution u self.timeIntegration.u[hIndex] = limited_hnp1 self.timeIntegration.u[huIndex] = limited_hunp1 @@ -1073,12 +1059,6 @@ def FCTStep(self): self.timeIntegration.u[hetaIndex] = limited_hetanp1 self.timeIntegration.u[hwIndex] = limited_hwnp1 self.timeIntegration.u[hbetaIndex] = limited_hbetanp1 - # self.timeIntegration.u[hIndex] = self.limited_hnp1 - # self.timeIntegration.u[huIndex] = self.limited_hunp1 - # self.timeIntegration.u[hvIndex] = self.limited_hvnp1 - # self.timeIntegration.u[hetaIndex] = self.limited_hetanp1 - # self.timeIntegration.u[hwIndex] = self.limited_hwnp1 - # self.timeIntegration.u[hbetaIndex] = self.limited_hbetanp1 def computeEV(self): entropy_residual = np.zeros(self.u[0].dof.shape) @@ -1462,31 +1442,6 @@ def initDataStructures(self): n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) # - self.par_limited_hnp1= LAT.ParVec_petsc4py(self.limited_hnp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hunp1 = LAT.ParVec_petsc4py(self.limited_hunp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hvnp1 = LAT.ParVec_petsc4py(self.limited_hvnp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hetanp1 = LAT.ParVec_petsc4py(self.limited_hetanp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hwnp1 = LAT.ParVec_petsc4py(self.limited_hwnp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hbetanp1 = LAT.ParVec_petsc4py(self.limited_hbetanp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - # self.par_h_min = LAT.ParVec_petsc4py(self.h_min, bs=1, n=n,N=N,nghosts=nghosts, @@ -1785,12 +1740,6 @@ def getResidual(self, u, r): self.par_hetaLow.scatter_forward_insert() self.par_hwLow.scatter_forward_insert() self.par_hbetaLow.scatter_forward_insert() - self.par_limited_hnp1.scatter_forward_insert() - self.par_limited_hunp1.scatter_forward_insert() - self.par_limited_hvnp1.scatter_forward_insert() - self.par_limited_hetanp1.scatter_forward_insert() - self.par_limited_hwnp1.scatter_forward_insert() - self.par_limited_hbetanp1.scatter_forward_insert() # self.par_h_min.scatter_forward_insert() self.par_h_max.scatter_forward_insert() diff --git a/proteus/mprans/SW2DCV.py b/proteus/mprans/SW2DCV.py index d9e68e112c..83888605bb 100644 --- a/proteus/mprans/SW2DCV.py +++ b/proteus/mprans/SW2DCV.py @@ -719,9 +719,6 @@ def __init__(self, self.huLow = None self.hvLow = None # - self.limited_hnp1 = None - self.limited_hunp1 = None - self.limited_hvnp1 = None self.h_min = None self.h_max = None self.kin_max = None @@ -1231,9 +1228,6 @@ def initDataStructures(self): self.huLow = np.zeros(self.u[0].dof.shape, 'd') self.hvLow = np.zeros(self.u[0].dof.shape, 'd') # - self.limited_hnp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hunp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hvnp1 = np.zeros(self.u[0].dof.shape, 'd') self.h_min = np.zeros(self.u[0].dof.shape, 'd') self.h_max = np.zeros(self.u[0].dof.shape, 'd') self.kin_max = np.zeros(self.u[0].dof.shape, 'd') @@ -1272,18 +1266,6 @@ def initDataStructures(self): n=n,N=N,nghosts=nghosts, subdomain2global=subdomain2global) # - self.par_limited_hnp1= LAT.ParVec_petsc4py(self.limited_hnp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hunp1 = LAT.ParVec_petsc4py(self.limited_hunp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) - self.par_limited_hvnp1 = LAT.ParVec_petsc4py(self.limited_hvnp1, - bs=1, - n=n,N=N,nghosts=nghosts, - subdomain2global=subdomain2global) self.par_h_min = LAT.ParVec_petsc4py(self.h_min, bs=1, n=n,N=N,nghosts=nghosts, @@ -1526,9 +1508,6 @@ def getResidual(self, u, r): self.par_hLow.scatter_forward_insert() self.par_huLow.scatter_forward_insert() self.par_hvLow.scatter_forward_insert() - self.par_limited_hnp1.scatter_forward_insert() - self.par_limited_hunp1.scatter_forward_insert() - self.par_limited_hvnp1.scatter_forward_insert() # self.par_h_min.scatter_forward_insert() self.par_h_max.scatter_forward_insert() From 387a3124495a00cb5f2e84bb9746d5d20ea741a0 Mon Sep 17 00:00:00 2001 From: ejtovar Date: Sat, 20 Feb 2021 17:18:40 -0600 Subject: [PATCH 06/11] had a bug in KE limiting --- proteus/mprans/GN_SW2DCV.h | 32 +++++++++++++++----------------- proteus/mprans/GN_SW2DCV.py | 14 -------------- proteus/mprans/SW2DCV.h | 32 ++++++++++++++++---------------- proteus/mprans/SW2DCV.py | 2 +- 4 files changed, 32 insertions(+), 48 deletions(-) diff --git a/proteus/mprans/GN_SW2DCV.h b/proteus/mprans/GN_SW2DCV.h index c6444706fe..385ce3d83f 100644 --- a/proteus/mprans/GN_SW2DCV.h +++ b/proteus/mprans/GN_SW2DCV.h @@ -234,7 +234,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { xt::pyarray &kin_max = args.array("kin_max"); double KE_tiny = args.scalar("KE_tiny"); - // Declare stuff for limiting on h and h*heta + // Create some vectors for limiting on h and h*eta std::valarray Rneg(0.0, numDOFs), Rpos(0.0, numDOFs), Rneg_heta(0.0, numDOFs), Rpos_heta(0.0, numDOFs); @@ -358,7 +358,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { // Main loop to define limiters and computed limited solution ////// //////////////////////////////////////////////////////////////////// - // Create Lij_array for initialization + // Create Lij_array and initialize with 1 std::valarray Lij_array(1.0, dH_minus_dL.size()); /* Loop over limiting iterations */ @@ -436,7 +436,7 @@ class GN_SW2DCV : public GN_SW2DCV_base { } } // i loop ends here - /* Here we compute the limiters Lij_array */ + /* Here we compute the limiters */ ij = 0; for (int i = 0; i < numDOFs; i++) { @@ -470,21 +470,20 @@ class GN_SW2DCV : public GN_SW2DCV_base { } /*======================================================*/ - /* KE limiting */ + /* Kinetic Energy limiting */ double lambdaj = csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; double Ph_ij = FCT_h[ij] / mi / lambdaj; double Phu_ij = FCT_hu[ij] / mi / lambdaj; double Phv_ij = FCT_hv[ij] / mi / lambdaj; - // Here we have some conditions for the KE limiting - + // Here we initialize limiter based on kinetic energy double KE_limiter = 1; + double neg_root_i = 1., neg_root_j = 1.; // We first check if local kinetic energy > 0 - if (kin_max[i] * hLow[i] <= KE_tiny) { + if (kin_max[i] * hLow[i] <= KE_tiny) KE_limiter = 0.; - } // We then check if KE bound is already satisfied double hi_with_lijPij = hLow[i] + Lij_array[ij] * Ph_ij; @@ -503,13 +502,11 @@ class GN_SW2DCV : public GN_SW2DCV_base { double bi = kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); double delta_i = bi * bi - 4. * ai * ci; - double ri = 1.; if (delta_i < 0. || ai >= -0.) { KE_limiter = fmin(KE_limiter, Lij_array[ij]); } else { - double neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; - KE_limiter = fmin(KE_limiter, neg_root_i); + neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; } // root of jth-DOF (To compute transpose component) @@ -524,20 +521,21 @@ class GN_SW2DCV : public GN_SW2DCV_base { double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); double bj = kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); - double delta_j = bj * bj - 4. * aj * cj; - double rj = 1.; if (delta_j < 0. || aj >= -0.) { KE_limiter = fmin(KE_limiter, Lij_array[ij]); } else { - double neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; - KE_limiter = fmin(KE_limiter, neg_root_j); + neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; } - // Compute KE limiter + // define final limiter based on KE + KE_limiter = + fmin(KE_limiter, fmin(fabs(neg_root_i), fabs(neg_root_j))); + + // Here we set final limiter Lij_array[ij] = fmin(KE_limiter, Lij_array[ij]); - // Lij_array[ij] = fmin(fmin(fabs(ri), fabs(rj)), Lij_array[ij]); + } else { // if i = j then lij = 0 Lij_array[ij] = 0.; diff --git a/proteus/mprans/GN_SW2DCV.py b/proteus/mprans/GN_SW2DCV.py index 4a79bdeec6..c28f450f6d 100644 --- a/proteus/mprans/GN_SW2DCV.py +++ b/proteus/mprans/GN_SW2DCV.py @@ -804,13 +804,6 @@ def __init__(self, self.hwLow = None self.hbetaLow = None # - self.limited_hnp1 = None - self.limited_hunp1 = None - self.limited_hvnp1 = None - self.limited_hetanp1 = None - self.limited_hwnp1 = None - self.limited_hbetanp1 = None - # self.h_min = None self.h_max = None self.heta_min = None @@ -1378,13 +1371,6 @@ def initDataStructures(self): self.hwLow = np.zeros(self.u[0].dof.shape, 'd') self.hbetaLow = np.zeros(self.u[0].dof.shape, 'd') # - self.limited_hnp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hunp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hvnp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hetanp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hwnp1 = np.zeros(self.u[0].dof.shape, 'd') - self.limited_hbetanp1 = np.zeros(self.u[0].dof.shape, 'd') - # self.h_min = np.zeros(self.u[0].dof.shape, 'd') self.h_max = np.zeros(self.u[0].dof.shape, 'd') self.heta_min = np.zeros(self.u[0].dof.shape, 'd') diff --git a/proteus/mprans/SW2DCV.h b/proteus/mprans/SW2DCV.h index 57b88748ba..d323681825 100644 --- a/proteus/mprans/SW2DCV.h +++ b/proteus/mprans/SW2DCV.h @@ -362,7 +362,7 @@ class SW2DCV : public SW2DCV_base { // Main loop to define limiters and computed limited solution ////// //////////////////////////////////////////////////////////////////// - // Create Lij_array for initialization + // Create Lij_array and initialize with 1 std::valarray Lij_array(1.0, dH_minus_dL.size()); /* Loop over limiting iterations */ @@ -420,7 +420,7 @@ class SW2DCV : public SW2DCV_base { } } // i loop ends here - /* Here we compute the limiters Lij_array */ + /* Here we compute the limiters */ ij = 0; for (int i = 0; i < numDOFs; i++) { @@ -444,20 +444,21 @@ class SW2DCV : public SW2DCV_base { Lij_array[ij] = fmin(Lij_array[ij], std::min(Rneg[i], Rpos[j])); } + /*======================================================*/ + /* Kinetic Energy limiting */ double lambdaj = csrRowIndeces_DofLoops[i + 1] - csrRowIndeces_DofLoops[i] - 1; double Ph_ij = FCT_h[ij] / mi / lambdaj; double Phu_ij = FCT_hu[ij] / mi / lambdaj; double Phv_ij = FCT_hv[ij] / mi / lambdaj; - // Here we have some conditions for the KE limiting - + // Here we initialize limiter based on kinetic energy double KE_limiter = 1; + double neg_root_i = 1., neg_root_j = 1.; // We first check if local kinetic energy > 0 - if (kin_max[i] * hLow[i] <= KE_tiny) { + if (kin_max[i] * hLow[i] <= KE_tiny) KE_limiter = 0.; - } // We then check if KE bound is already satisfied double hi_with_lijPij = hLow[i] + Lij_array[ij] * Ph_ij; @@ -476,13 +477,11 @@ class SW2DCV : public SW2DCV_base { double bi = kin_max[i] * Ph_ij - (huLow[i] * Phu_ij + hvLow[i] * Phv_ij); double delta_i = bi * bi - 4. * ai * ci; - double ri = 1.; if (delta_i < 0. || ai >= -0.) { KE_limiter = fmin(KE_limiter, Lij_array[ij]); } else { - double neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; - KE_limiter = fmin(KE_limiter, neg_root_i); + neg_root_i = (-bi - std::sqrt(delta_i)) / 2. / ai; } // root of jth-DOF (To compute transpose component) @@ -497,20 +496,21 @@ class SW2DCV : public SW2DCV_base { double aj = -0.5 * (Phu_ji * Phu_ji + Phv_ji * Phv_ji); double bj = kin_max[j] * Ph_ji - (huLow[j] * Phu_ji + hvLow[j] * Phv_ji); - double delta_j = bj * bj - 4. * aj * cj; - double rj = 1.; if (delta_j < 0. || aj >= -0.) { KE_limiter = fmin(KE_limiter, Lij_array[ij]); } else { - double neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; - KE_limiter = fmin(KE_limiter, neg_root_j); + neg_root_j = (-bj - std::sqrt(delta_j)) / 2. / aj; } - // Compute KE limiter + // define final limiter based on KE + KE_limiter = + fmin(KE_limiter, fmin(fabs(neg_root_i), fabs(neg_root_j))); + + // Here we set final limiter Lij_array[ij] = fmin(KE_limiter, Lij_array[ij]); - // Lij_array[ij] = fmin(fmin(fabs(ri), fabs(rj)), Lij_array[ij]); + } else { // if i = j then lij = 0 Lij_array[ij] = 0.; @@ -550,7 +550,7 @@ class SW2DCV : public SW2DCV_base { huLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix2; hvLow[i] += one_over_mi * ith_Limiter_times_FluxCorrectionMatrix3; - // Final loop to define limited solution + // Finally define the limited solution limited_hnp1[i] = hLow[i]; limited_hunp1[i] = huLow[i] + dt * one_over_mi * new_SourceTerm_hu[i]; limited_hvnp1[i] = hvLow[i] + dt * one_over_mi * new_SourceTerm_hv[i]; diff --git a/proteus/mprans/SW2DCV.py b/proteus/mprans/SW2DCV.py index 83888605bb..be3aea28a6 100644 --- a/proteus/mprans/SW2DCV.py +++ b/proteus/mprans/SW2DCV.py @@ -918,7 +918,7 @@ def FCTStep(self): argsDict["h_min"] = self.h_min argsDict["h_max"] = self.h_max argsDict["kin_max"] = self.kin_max - argsDict["KE_tiny"] = self.kin_tiny + argsDict["KE_tiny"] = self.KE_tiny self.sw2d.convexLimiting(argsDict) # Pass the post processed hnp1 solution to global solution u From 3e773be1b3274b6b994ad020f97a5d7f3d2b5e6f Mon Sep 17 00:00:00 2001 From: ejtovar Date: Sun, 21 Feb 2021 14:55:50 -0600 Subject: [PATCH 07/11] Updating comparison files since I changed the solver --- .../SWFlow/comparison_files/comparison_conical_island_h_t2.csv | 2 +- .../comparison_files/comparison_dSWEs_steady_state_h_t2.csv | 2 +- .../tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv | 2 +- .../SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv | 2 +- .../tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv | 2 +- .../comparison_files/comparison_reef_island_runup_h_t2.csv | 2 +- .../SWFlow/comparison_files/comparison_santos_step_h_t2.csv | 2 +- .../tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv | 2 +- .../SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv | 2 +- .../comparison_files/comparison_transcritical_bump_h_t2.csv | 2 +- proteus/tests/SWFlow/{test_SWFlows.py => test_SWFlow.py} | 0 11 files changed, 10 insertions(+), 10 deletions(-) rename proteus/tests/SWFlow/{test_SWFlows.py => test_SWFlow.py} (100%) diff --git a/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv index e6d76420f4..11a883ba10 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv @@ -1 +1 @@ -0.32000000144595564,0.320000027503311,0.32000023475609357,0.32000047247277846,0.32000357759114406,0.320007584327111,0.32005157572120585,0.3201318143702888,0.3207097420331375,0.3223862652923435,0.3292248439887417,0.3487005626074625,0.3724042508949411,0.3676013151963543,0.3438788882631352,0.32746896988190066,0.3219766860520782,0.32056791482774283,0.320138325143836,0.3200422829245896,0.3200132260139837,0.32000515580511507,0.3200039556679668,0.320001406550819,0.3200016068135232,0.32000024512165226,0.3200004924984907,0.3200000196034322,0.3200001242775834,0.3199999966457416,0.32000002680107065,0.31999999829193226,0.3200000051867652,0.3199999995728789,0.3200000009290156,0.3199999999138744,0.32000000015712204,0.3199999999843215,0.32000000002589624,0.3199999999969132,0.32000000000796475,0.31999997945301517,0.32000010666587625,0.3200000655822819,0.3200013361871339,0.3200013533870071,0.32001699170932074,0.32002690248074045,0.320214784229519,0.320524177273385,0.322716796731799,0.32891944052017996,0.3470404660947679,0.3745501912860639,0.36868447834084106,0.34284108142678993,0.32696482499279295,0.3221449752040897,0.32047786337462286,0.3201509014027392,0.3200289690139429,0.3200066777834824,0.31999606675541115,0.3199976162791336,0.31999617487684073,0.3199992347341849,0.3199986175695237,0.31999993686426886,0.31999963033973255,0.32000000952646884,0.3199999185394451,0.3200000055642768,0.31999998413638814,0.3200000014423131,0.319999997149526,0.32000000029189724,0.3199999995169891,0.32000000005244544,0.31999999992164113,0.320000000008955,0.31999999998606454,0.3200000000028604,0.3199999966837632,0.32000003244699166,0.32000021734377015,0.3200004942813221,0.32000348185204597,0.3200074831436928,0.3200514805145294,0.3201269417695296,0.32071667431712203,0.32229796832756885,0.3293543415675435,0.34886554696461874,0.3718220538564098,0.3675992537023831,0.3438786324940531,0.32747692983115817,0.3219648051124494,0.32056899464724287,0.32014609271828787,0.3200496815172319,0.32002803998501395,0.3200133785785966,0.3200155600625276,0.3200054781574326,0.3200062347201843,0.32000044448124626,0.32000170978853726,0.31999994396705644,0.3200003733269581,0.31999996822309895,0.32000007007829256,0.31999999241869,0.32000001213724705,0.3199999985896995,0.320000002000114,0.3199999997621458,0.32000000031729303,0.31999999996171263,0.320000000049502,0.31999999999323536,0.32000000001452233,0.3199999763433029,0.3200001177384667,0.32000004059080417,0.3200014290325045,0.3200011000670923,0.32001782952879226,0.32002391220160736,0.3202234088245793,0.32048906224520607,0.32280719236284383,0.3288283758103584,0.3472158663967866,0.37462488051117226,0.36870176394886556,0.3428265904526927,0.3270117892161213,0.3221458400755856,0.32046878078285135,0.3201423207427692,0.31998508512062374,0.31997372531955626,0.3199512136802916,0.31997442931826153,0.31996980275993736,0.3199978702222608,0.3199913159372966,0.3200003427707735,0.3199980776603509,0.32000020120594797,0.31999965398559205,0.32000004375774405,0.3199999427473715,0.3200000075040706,0.3199999908397436,0.32000000118951166,0.31999999857414047,0.3200000001834305,0.3199999997838724,0.32000000002828255,0.3199999999639998,0.32000000000845685,0.31999998934842966,0.32000003954786893,0.32000018865171787,0.320000541636829,0.32000327175144294,0.3200077780615783,0.32005001555153567,0.32012776862473546,0.3207082023041131,0.3222821696862472,0.3293392492075924,0.3488322883406485,0.3717981135544063,0.36759600398057235,0.34387270899414124,0.3274684657562723,0.3219746088991415,0.32056922475360883,0.320221664251642,0.32014670662454725,0.3201772836266553,0.32008492982297554,0.3201306143620435,0.3200379033451144,0.3200429586350634,0.3199984826241104,0.3200101975077661,0.3199986953164157,0.3200017403253582,0.31999973453458386,0.3200002716483394,0.31999995991042474,0.3200000421604261,0.31999999410345564,0.320000006477124,0.31999999912151456,0.3200000009737908,0.31999999986804584,0.32000000014364244,0.31999999997823053,0.3200000000397485,0.3199999742867752,0.32000012565665614,0.3200000316295988,0.32000147623826913,0.3200010536641047,0.32001811549419756,0.32002375199969907,0.3202249087815166,0.3204892028703989,0.3228125622907801,0.32882842139605595,0.3472237958032484,0.374628419295127,0.36870369017773713,0.34283071180659297,0.3270063477659897,0.3221678672400552,0.32037579924119214,0.32015312539141066,0.3195248817792426,0.319642266945632,0.3196511249548989,0.3197045437238647,0.3197378122566813,0.3200478304907855,0.3199445003381999,0.32000935114063567,0.3199911922571905,0.32000165048678764,0.31999877352853046,0.3200002072654444,0.31999981268366084,0.32000002780008996,0.3199999711776355,0.32000000405399687,0.3199999956529829,0.3200000006121727,0.3199999993694522,0.3200000000915269,0.3199999999015597,0.32000000002590984,0.3199999861027544,0.3200000413998094,0.32000017844070683,0.3200005490140786,0.3200032162682753,0.3200077981983661,0.32004975255518114,0.32012771544812196,0.3207072851018004,0.32228135109938305,0.32933803205049683,0.34883090586056137,0.37179762019212537,0.36760169871160264,0.3438643490710726,0.3274642457407443,0.3220039964076711,0.3205107066618861,0.3207341066073009,0.32175504185551274,0.3213164587868774,0.32018969007504045,0.32102130557060793,0.32059876827070466,0.32021412391915594,0.319979181014941,0.32004486793559916,0.3199894518438167,0.3200050939429877,0.3199990381941727,0.32000078638279494,0.3199998832454199,0.320000124543537,0.31999998233640337,0.32000001911106163,0.3199999972031289,0.32000000276196117,0.3199999995817743,0.3200000003813974,0.3199999999358602,0.3200000000981225,0.3199999727184132,0.32000012786716375,0.32000003036620756,0.3200014871158907,0.32000105051388694,0.3200181643406178,0.32002375664287236,0.3202250839452483,0.3204892893820754,0.32281293699946745,0.3288287003191546,0.3472233979536769,0.3746338989447356,0.3686864660500618,0.34296982513544844,0.3270299286657181,0.32224481967562785,0.3198845566169072,0.3231906485154953,0.2815197429868639,0.2507590089207164,0.24555715072965115,0.2653291162597726,0.3146608002771759,0.32210983050202635,0.31964783609390846,0.320134830149131,0.3199843158047646,0.3200035303915155,0.31999700810093384,0.3200003623828014,0.31999946995858786,0.3200000735684423,0.31999991632098923,0.320000012982365,0.3199999880510302,0.3200000019402016,0.3199999984095388,0.3200000002644864,0.3199999997754572,0.3200000000650159,0.31999998526677365,0.32000004164754736,0.32000017629882727,0.3200005494778459,0.3200032073497208,0.3200077973079864,0.3200497220850168,0.3201277038967427,0.3207072160869036,0.3222813883323129,0.32933792884863533,0.34883245358458814,0.3717953575432471,0.3676311690121128,0.3438449222666921,0.3276137928431898,0.2878951034256295,0.15840768622251322,0.03952212530718991,0.007801235404166183,0.0019494401218387281,0.0,0.0021598725277479657,0.002416778077134282,0.09872165130374956,0.22544762087790846,0.31984541052114823,0.3200816140783357,0.32000889227809576,0.3200008623108065,0.32000239663929486,0.31999965014621073,0.3200003747362683,0.31999993444274055,0.3200000506669124,0.3199999908701753,0.3200000064258058,0.31999999885451974,0.32000000079211877,0.3199999998475631,0.32000000018707153,0.31999997238393374,0.3200001283078323,0.320000030343508,0.3200014885418873,0.32000105125867073,0.3200181673576229,0.3200237648146191,0.3202250708092075,0.32048935286690033,0.3228127062862639,0.3288292615657876,0.3472216972883872,0.37463704768850825,0.3686730597746028,0.3429838043087555,0.3262616277060527,0.16588338041168993,0.00897513898476602,0.0005854156441039526,2.295995126472153e-05,1.264220222045768e-05,0.0,0.0,3.389727560567509e-05,0.002472863105825659,0.0889541037910849,0.24665690521998923,0.31983503618942,0.3200516368830858,0.31998414131621666,0.32000407199384895,0.31999826742240145,0.320000391585725,0.3199997974159883,0.3200000416091192,0.3199999761110145,0.320000004608849,0.31999999719888494,0.32000000052201316,0.319999999641686,0.32000000010694274,0.31999998516189126,0.32000004162822826,0.32000017615686127,0.3200005491083491,0.3200032079100154,0.3200077933233296,0.32004973520904684,0.320127667108426,0.32070736012293766,0.3222811201363838,0.3293389230405311,0.3488298387070568,0.37180539671038154,0.36760430040221426,0.34400460431484015,0.3270420624289793,0.22220245444195671,0.0721218895605996,0.008946868133783134,0.0012717186620175213,0.0008985825593325874,0.0024847090730496266,0.0,2.6441044968628217e-06,0.012195185244505989,0.151171306466354,0.295598847287354,0.31999697278599554,0.3200324617971851,0.3199938933933155,0.3200046511665765,0.319999047388934,0.3200005953177318,0.31999987961088217,0.3200000725572296,0.31999998583837685,0.3200000085993708,0.3199999983830874,0.32000000101125625,0.3199999997981049,0.3200000002304179,0.31999997237935934,0.3200001282614291,0.3200000304589553,0.3200014880329438,0.3200010524360035,0.3200181623767936,0.32002377758808626,0.32022502089513666,0.3204895005687374,0.32281220706236136,0.32883095048347705,0.3472177452108517,0.37464991715298934,0.36864099334424516,0.3431185560537851,0.3264457677185399,0.3236243839969966,0.30623778313418937,0.21366000373960947,0.14493023653340603,0.10349340471142687,0.09416005128216269,0.12314156940372689,0.18120163714076265,0.2669065400915424,0.31941674918634816,0.3201778826083044,0.31993001780309305,0.3200159601428263,0.3199898898129896,0.3200020280446425,0.3199986198463287,0.3200002678114109,0.3199998278348988,0.3200000332349856,0.3199999779253535,0.32000000406420465,0.31999999733756546,0.3200000004835285,0.31999999965348613,0.32000000010336693,0.3199999853227521,0.32000004158762974,0.32000017655757196,0.3200005489668264,0.3200032096858717,0.3200077925401844,0.320049743048402,0.3201276615150028,0.32070739203865484,0.32228108656540194,0.32933895788182543,0.34882944363535057,0.3718051760660282,0.3675975953762001,0.34395443680901994,0.32739589058315194,0.3226351189499973,0.32168499996023237,0.3220084973545274,0.32057541051117144,0.3208013554943058,0.3208899945253972,0.3203958016544911,0.3204902489318829,0.3202348341036773,0.3200035512311954,0.32009936109335846,0.31998265039840634,0.32001684669047187,0.31999705177753046,0.3200025552714432,0.3199995418321041,0.3200003598418859,0.31999993598999793,0.3200000476923118,0.3199999915927187,0.32000000605246665,0.31999999894721337,0.32000000075146695,0.31999999985784694,0.32000000017857866,0.3199999727022656,0.32000012778764636,0.32000003052354214,0.32000148635081405,0.3200010518315882,0.3200181579699131,0.32002376736268967,0.320225034013712,0.32048937021392543,0.3228125987990033,0.32882922919764934,0.3472222085075829,0.37463155620369876,0.3686937941030982,0.34282696661645795,0.32692191269429793,0.3221207598665456,0.31999508229791906,0.31979959505987604,0.3195841588478192,0.31974345826473605,0.31969580628376615,0.31979554721367054,0.3197769525190956,0.32001863235012407,0.31991583766456805,0.32000676637325715,0.31997928470786385,0.3200026194542608,0.3199962927379711,0.32000056067437466,0.31999940954511896,0.3200000940864235,0.3199999139324758,0.3200000140016325,0.3199999882754061,0.3200000019190378,0.3199999984684062,0.320000000252865,0.31999999978516713,0.3200000000611553,0.31999998615491343,0.32000004135550436,0.3200001786543456,0.32000054870977246,0.3200032179019409,0.32000779606800683,0.3200497642264345,0.32012770355959014,0.3207073543951826,0.3222813326684031,0.3293381994224819,0.348830853372074,0.37179809680949744,0.3675965369934307,0.3438839740665937,0.3274668329481578,0.32203925219836727,0.3206497628394336,0.32031617169619797,0.32013319704186627,0.3201554680962384,0.320086741505749,0.3201101679634674,0.3200563488315956,0.32005332170029155,0.3200035124661381,0.3200186139651031,0.3199989238087181,0.3200042698464036,0.3199995532918973,0.32000078635171847,0.31999989770900344,0.32000012919501764,0.3199999816408714,0.32000001943530326,0.3199999971168315,0.32000000273334833,0.31999999958460595,0.3200000003703185,0.31999999993678185,0.3200000000947567,0.3199999742656109,0.320000125607602,0.3200000316975881,0.3200014758474864,0.3200010541053344,0.32001811283013815,0.3200237546117991,0.320224892692551,0.32048921755097537,0.32281248403997054,0.32882854020591173,0.34722358646401796,0.3746289350571011,0.368703130226688,0.34282636327838,0.3270044647163306,0.32213786119469257,0.3204374663753188,0.3201176159196947,0.3199765501156655,0.31997797679559226,0.31995527507126303,0.319974024477883,0.31996656856475725,0.3199937905546703,0.3199867720846805,0.31999946393266193,0.3199961071612454,0.3200001821923841,0.31999913358186427,0.3200000772752272,0.3199998376924253,0.3200000184938181,0.319999972675666,0.32000000348882,0.3199999957810648,0.32000000057328815,0.3199999993899526,0.3200000000871679,0.31999999990559874,0.32000000002448675,0.31999998937374474,0.32000003953203227,0.3200001887414703,0.3200005415521512,0.3200032723237196,0.3200077776226948,0.32005001883379625,0.320127767084522,0.32070821705000174,0.3222821733276042,0.32933926680669673,0.34883230542174626,0.371798127725405,0.36759618935833005,0.34387271287970156,0.3274711061152104,0.32196678748080976,0.3205748453828081,0.32015475548921546,0.32005156341416774,0.32002835081805553,0.3200128345516673,0.3200157709376018,0.32000681083125027,0.32000816452608466,0.32000125583498784,0.3200029273703644,0.3200000893273264,0.32000079213486066,0.3199999686290549,0.3200001735563496,0.3199999868126646,0.32000003286741346,0.319999996695045,0.3200000056424119,0.3199999993492373,0.3200000008911351,0.31999999988846445,0.3200000001338671,0.31999999998034345,0.32000000003730467,0.31999997636796607,0.32000011770703807,0.3200000406072397,0.32000142891193495,0.3200011001451024,0.3200178288620984,0.3200239124862744,0.3202234057698835,0.3204890629317839,0.32280718276632436,0.32882838331476427,0.3472158605916067,0.3746248774695791,0.36870187112424546,0.34282624925305605,0.32701296388331536,0.3221444130304304,0.3204797361322071,0.3201488665009329,0.3200278481180384,0.32000700645178065,0.3199965139641361,0.31999773852253754,0.3199959610774083,0.3199988904522462,0.3199981503630342,0.3199997856800829,0.31999938534731365,0.3199999859271384,0.3199998412897124,0.32000000534810036,0.31999996548697873,0.3200000023667205,0.3199999933894013,0.32000000059674305,0.3199999988485736,0.32000000012074703,0.3199999998141186,0.3200000000217428,0.3199999999680868,0.3200000000072045,0.3199999966924472,0.32000003244339403,0.3200002173697881,0.32000049426775223,0.3200034819869674,0.3200074831036983,0.3200514811116357,0.32012694180526247,0.3207166761067749,0.3222979700145254,0.32935434008762277,0.34886555404040853,0.37182203120051943,0.36759927469316644,0.3438784395739783,0.32747716863919873,0.32196302630577933,0.3205684586642638,0.3201376904323827,0.32004160516591107,0.32001159226992015,0.3200040385045747,0.3200024664841347,0.32000096000713096,0.32000098894939755,0.3200002670216117,0.3200004177478415,0.3200000422009821,0.32000012732018884,0.320000002731047,0.32000003201047567,0.31999999908578547,0.32000000694227687,0.31999999958938263,0.32000000134339557,0.31999999989247435,0.3200000002379704,0.31999999997735595,0.3200000000399086,0.3199999999952965,0.32000000001220985,0.31999997945440944,0.32000010665827894,0.3200000655849282,0.32000133615654097,0.3200013533932783,0.3200169915793646,0.3200269024672505,0.3202147838344777,0.320524177035329,0.3227167964583619,0.3289194399040434,0.34704047102893676,0.3745501874696827,0.3686845138814387,0.3428410741589055,0.3269651120144863,0.3221450091530914,0.32047957308975883,0.32015215496870314,0.320033823243923,0.32001020086565235,0.3200017824328202,0.3200003722767932,0.3199996511668022,0.3199998988694631,0.3199997551709763,0.3199999552637539,0.3199999029353291,0.31999999280107133,0.31999997128442353,0.31999999942507107,0.31999999288630365,0.3200000001514152,0.3199999984513517,0.3200000000777302,0.3199999996961132,0.32000000002137285,0.3199999999450489,0.3200000000047884,0.31999999998932255,0.32000000000184015,0.32000000145008434,0.32000002750224144,0.3200002347667072,0.32000047247059715,0.3200035776360918,0.32000758433070403,0.32005157586931693,0.320131814449206,0.32070974224148563,0.3223862657317448,0.32922484261872564,0.3487005635863762,0.3724042412654459,0.36760131496288434,0.34387882243331036,0.32746899820865916,0.3219761517991556,0.32056761654273175,0.3201364010280995,0.32004072166241937,0.3200097994943103,0.3200031730539793,0.3200010304110452,0.3200003824547445,0.32000028525450835,0.3200000797915822,0.3200001092089958,0.32000001707559833,0.320000035915349,0.3200000026427923,0.3200000100093965,0.320000000162072,0.3200000023974374,0.31999999994720013,0.32000000051115113,0.3199999999755784,0.32000000009883955,0.3199999999937723,0.320000000018049,0.31999999999829143,0.32000000000600204 \ No newline at end of file +0.32000002473823985,0.3200000816728123,0.3200003129372687,0.3200011963528035,0.3200044369617626,0.32001694839714295,0.3200630474389563,0.32024062194538583,0.32084099633296165,0.3229957331069224,0.32969167523798826,0.3488147950033949,0.3722803583873506,0.3673291630349901,0.3438225157491934,0.3278307448651122,0.3225354940164562,0.32075868975523575,0.32022478703974416,0.3200638797932853,0.3200170375525123,0.3200046062717389,0.3200012108601937,0.32000032621088775,0.32000008567533056,0.3200000230771395,0.3200000060603154,0.32000000163247366,0.3200000004286879,0.3200000001154936,0.32000000003033546,0.3200000000081701,0.32000000000214557,0.3200000000005779,0.3200000000001518,0.3200000000000408,0.3200000000000107,0.3200000000000028,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002313038844,0.32000007658708385,0.32000029906504884,0.3200011366430686,0.3200042409098509,0.32001610158947835,0.32006024332802663,0.3202293011069366,0.3207791200270884,0.32304578446690513,0.32940764614759893,0.3472467152279752,0.37459785966247205,0.36848962419759346,0.34282477700514197,0.327368142355794,0.3225218962090752,0.3207159493418878,0.32021672548262786,0.3200612627389384,0.3200164285930099,0.32000441007087566,0.32000116700406733,0.32000031220353375,0.32000008254300416,0.32000002206620565,0.32000000583694765,0.3200000015596326,0.32000000041327264,0.32000000011070695,0.3200000000292349,0.32000000000781614,0.3200000000020679,0.3200000000005532,0.3200000000001463,0.32000000000003914,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000222034639,0.32000007646351114,0.3200002990796977,0.3200011254026051,0.320004239978277,0.3200159388285915,0.3200602490107751,0.3202270361859457,0.32081713477279783,0.3228663733537597,0.3297418835459458,0.3489389892419183,0.37176557162091184,0.3673700294463916,0.3438033124466722,0.3277945613006331,0.3224840138865775,0.3207330940957088,0.32021741844999535,0.3200606914272528,0.32001637046051123,0.3200043603677813,0.32000115962932474,0.32000030695988924,0.3200000808793405,0.32000002153220514,0.3200000056228799,0.32000000154833463,0.3200000004243015,0.3200000001094366,0.32000000002871476,0.32000000000771855,0.3200000000020585,0.32000000000054735,0.3200000000001459,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002286027474,0.3200000759091506,0.32000029848600087,0.3200011269389181,0.3200042322928029,0.3200159619778833,0.32006010633217924,0.32022732614357285,0.3207723608185913,0.32306044431899394,0.3293239960352088,0.3474043541767731,0.37466953906776634,0.3685156343182,0.3428116732978919,0.32740049116976033,0.3225244838315495,0.32071153189371526,0.3202158905908845,0.32006059631672445,0.320016254541853,0.32000426526289005,0.32000107721681237,0.32000024902551166,0.32000006339720827,0.32000001185300153,0.3200000060585563,0.32000000242038396,0.3200000004208586,0.3200000000813634,0.3200000000274852,0.3200000000075185,0.32000000000205053,0.32000000000054857,0.32000000000014545,0.3200000000000387,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000221864808,0.3200000764432918,0.3200002990415591,0.3200011250968746,0.3200042393069582,0.3200159340545446,0.3200602346520045,0.32022693353575293,0.32081507382923896,0.32286149809465625,0.3297265662671098,0.348908243466464,0.37174160218981345,0.36736705791197544,0.34379607299962844,0.32778872810184795,0.32248557009655976,0.3207345367210794,0.3202160520319669,0.32005944966397487,0.32001455026175935,0.3200026540978709,0.3199993083924324,0.3199993277091,0.31999966194421525,0.3200000398433254,0.32000005298559564,0.3200000024031411,0.31999999881683927,0.32000000000673273,0.32000000001345386,0.3200000000071066,0.32000000000211715,0.3200000000005524,0.32000000000014656,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002285923446,0.32000007590920404,0.32000029848470923,0.3200011269394708,0.3200042322639726,0.320015961862143,0.3200601055159207,0.3202273165670063,0.3207723558811919,0.3230622892170079,0.3293240079521353,0.347412400632641,0.37467306412214724,0.3685186387240452,0.34281501141343457,0.3274007507177813,0.32252646251616723,0.32069105206836956,0.3202093475590551,0.32004981097662155,0.31997353934465766,0.3199805850580952,0.31996395547656176,0.31998697521229735,0.32000157379086047,0.32000183867150883,0.3200000373059977,0.3199999221520152,0.31999999512757693,0.3199999992920858,0.319999999981051,0.32000000000923157,0.3200000000023603,0.32000000000061646,0.32000000000014855,0.320000000000039,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649004,0.32000007644329587,0.32000029904182253,0.32000112509680523,0.3200042393084158,0.32001593404987444,0.3200602346147984,0.3202269306191513,0.32081483081756135,0.32286124437419317,0.32972527957302666,0.3489070396608211,0.3717404358474878,0.3673744108185969,0.3437841702803447,0.32778138879797397,0.32249022583878695,0.32073671940017323,0.32034297034791903,0.3204446168492497,0.32040627471942085,0.32043890289681,0.3202788794620509,0.32007403902657405,0.3200892104536043,0.3199975053586533,0.3199962867623561,0.3199997840603637,0.31999997026050275,0.319999997284245,0.31999999993772554,0.32000000001979084,0.3200000000057789,0.32000000000077017,0.32000000000016193,0.32000000000003925,0.32000000000001033,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.320000298484715,0.3200011269395373,0.32000423226420494,0.32001596186780723,0.32006010558214704,0.3202273167629018,0.32077237960186467,0.32306237254097026,0.32932438657016616,0.3474120973162846,0.37467834717518633,0.36850344981196426,0.3429372674931349,0.32738703287759763,0.32235764536116907,0.32007792004413194,0.3213456178825493,0.2875707945948762,0.25205114005287127,0.24594064763807513,0.2677817951146013,0.3170471337822235,0.32128780441014293,0.3197056393981026,0.3199907044318404,0.31999944725343554,0.3199998656326877,0.31999998762220705,0.3200000001624344,0.320000000158984,0.3200000000138653,0.32000000000144446,0.32000000000018625,0.3200000000000404,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.3200002990418238,0.3200011250968191,0.3200042393088778,0.3200159340609723,0.3200602347709953,0.3202269328220744,0.32081484246451025,0.32286121993114636,0.329725314791121,0.3489086603148876,0.3717379587093653,0.36741088815131817,0.34377152871635147,0.3279181765302057,0.2880826483939386,0.15814413859741122,0.04088401315840327,0.0,0.0,0.0,0.0,0.0,0.0995965128444665,0.22521695837261244,0.3199686353108995,0.31999238756842735,0.3199991321283239,0.3199999876189495,0.32000000383703775,0.32000000047728494,0.32000000003717854,0.3200000000025293,0.32000000000023104,0.3200000000000417,0.3200000000000104,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.3200002984847153,0.32000112693955296,0.3200042322647635,0.32001596187918413,0.32006010574542576,0.3202273188641537,0.3207724140205595,0.32306215006627176,0.3293255042729516,0.34740952671515274,0.37468544737617626,0.36847988160930917,0.343000390425603,0.3263629765099731,0.16606591345953947,0.008909034134778355,0.0006962831641671968,0.00025881685178437625,0.0,0.0,0.0,4.591085678700988e-06,0.0029001005973743714,0.08852640657871137,0.2466845813369244,0.319830966702752,0.31999843134225,0.32000004678654675,0.3200000110615834,0.32000000087153185,0.32000000006302687,0.3200000000033338,0.32000000000027,0.32000000000004264,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.32000029904182414,0.32000112509683487,0.32000423930936284,0.32001593407282614,0.32006023494575164,0.3202269362207053,0.320814912347681,0.32286105006801136,0.32972644953142993,0.34890602591392433,0.3717483337089003,0.36738808436180626,0.34396540303313033,0.3271504188891713,0.22192931638755364,0.07220057685172841,0.009835882105440352,0.008878211688175694,0.0,0.0,0.0,0.0,0.012145839095790908,0.15126282734688165,0.2956440704588525,0.31998540939530107,0.31999944248956547,0.32000002521732945,0.3200000070503877,0.3200000007232296,0.32000000004875784,0.32000000000309464,0.3200000000002483,0.32000000000004236,0.3200000000000104,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.32000029848471545,0.32000112693955995,0.3200042322649965,0.32001596188371934,0.3200601058223298,0.320227320224279,0.32077245735546206,0.32306192058957617,0.3293272432918434,0.34740540206498716,0.3746985482259504,0.36844756305230736,0.3431371455269783,0.326571528033016,0.3234807123781126,0.30559019448574504,0.21369536475603246,0.14076950153880063,0.10518485161561059,0.09607961521474175,0.12272642743245457,0.18132458104322413,0.2667978713024763,0.31943853042443066,0.3201378734861291,0.31993897018966216,0.3199996545831054,0.32000002434797986,0.32000000417870533,0.32000000043007265,0.32000000003004414,0.32000000000209594,0.32000000000021156,0.32000000000004103,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.32000029904182414,0.3200011250968311,0.32000423930922617,0.32001593406905476,0.3200602348936862,0.320226935487817,0.3208149041914822,0.322861075216601,0.3297263741624388,0.34890559176019237,0.3717482709721335,0.3673769941962334,0.3438897755419277,0.32770706993298704,0.3230943824406787,0.3210547112976887,0.32142954622651,0.32165381413334315,0.32082331081131726,0.32039623595225253,0.320265838577859,0.32049271668053214,0.3202341051984063,0.3199679541176828,0.32000053247458154,0.3199994839478929,0.3200000287615109,0.32000001520977417,0.32000000216020147,0.3200000001887603,0.32000000001591195,0.3200000000012526,0.32000000000017975,0.32000000000003975,0.32000000000001033,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.32000029848471534,0.32000112693954885,0.32000423226456115,0.3200159618747538,0.32006010568319077,0.32022731834910667,0.3207724020976399,0.32306218574107615,0.32932506189697386,0.34741045678886123,0.3746772689882738,0.36850680218590515,0.3428102585622774,0.3273003514671633,0.32246364792607135,0.3204577341357346,0.3201829202262174,0.32007216367737723,0.31997598427793184,0.3199841955633064,0.3199378980956634,0.3199647626555791,0.31998436483264037,0.3199865891604755,0.3199988453937034,0.32000001791052507,0.32000000978931387,0.3200000046533187,0.32000000054479794,0.320000000077832,0.32000000000631385,0.32000000000084894,0.32000000000015744,0.3200000000000393,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649004,0.3200000764432959,0.3200002990418227,0.320001125096815,0.3200042393087016,0.3200159340559007,0.3200602347052771,0.320226932268447,0.3208148600623659,0.3228612187528356,0.3297255210673004,0.3489068403232319,0.37174165784323854,0.36736834626607556,0.34380863647647986,0.32778828491475065,0.32254240623118846,0.32079539659006384,0.3202110556579491,0.3200593463650712,0.32001480040430974,0.32000276692097607,0.3199989300452113,0.3199982040386371,0.3199980993163498,0.31999929066986194,0.31999957010237157,0.3199999687317625,0.3200000008803321,0.3200000003460942,0.32000000017360564,0.32000000001910583,0.32000000000353285,0.3200000000006177,0.3200000000001503,0.3200000000000387,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002285923446,0.3200000759092041,0.3200002984847094,0.32000112693947735,0.320004232264157,0.3200159618657629,0.3200601055614378,0.320227317231218,0.32077236003743986,0.32306223252984556,0.3293241884820548,0.34741200408148865,0.37467380631692426,0.3685171273672531,0.3428110317816284,0.3273912561553675,0.32251523002261995,0.3206845521117203,0.3202120761110777,0.32006021702694176,0.3200162115600658,0.32000425102088836,0.32000103795148976,0.3200001904686028,0.3200000049722329,0.3199999577866098,0.3199999889444525,0.31999999053951644,0.3199999997240108,0.320000000117889,0.320000000033594,0.320000000010794,0.3200000000022385,0.3200000000005703,0.3200000000001463,0.3200000000000387,0.32000000000001017,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000221864809,0.3200000764432918,0.32000029904155913,0.3200011250968785,0.3200042393070742,0.3200159340567599,0.32006023468528205,0.32022693408229397,0.3208150816800892,0.32286149605093517,0.3297266068790822,0.3489082534273183,0.3717417608211073,0.36736724587783465,0.34379735171743675,0.3277901957254107,0.3224879279513855,0.3207365833270655,0.320216579528124,0.32006058067741183,0.3200163395978877,0.3200043556433475,0.3200011561960314,0.3200003046674428,0.32000007848022005,0.32000001998282607,0.3200000043505848,0.3200000012248244,0.3200000001923816,0.3200000000980081,0.3200000000292454,0.3200000000078015,0.32000000000210566,0.32000000000054923,0.32000000000014583,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228602749,0.32000007590915064,0.320000298486001,0.32000112693892024,0.32000423229286024,0.3200159619790169,0.3200601063449884,0.32022732632325024,0.3207723608845863,0.3230604337411087,0.3293240156944696,0.3474043126325424,0.3746695736828475,0.36851556265250873,0.3428113828445939,0.3274000158934861,0.3225238017999811,0.3207112763650112,0.3202158433967337,0.3200606466592917,0.3200163414984333,0.32000436376487373,0.3200011606205853,0.3200003088469556,0.3200000820342246,0.32000002177763687,0.3200000057763827,0.3200000015199413,0.32000000040604465,0.32000000010590546,0.3200000000289271,0.32000000000774165,0.32000000000205775,0.32000000000054796,0.3200000000001454,0.3200000000000387,0.32000000000001017,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000222034639,0.32000007646351114,0.3200002990796977,0.32000112540260617,0.32000423997830957,0.3200159388291599,0.3200602490193946,0.32022703631672567,0.32081713619977403,0.3228663736450862,0.32974188696225504,0.34893899577332904,0.37176557575519253,0.36737004627969605,0.3438033469202726,0.3277946874126978,0.32248411208497796,0.32073314719984747,0.32021740330941295,0.3200606908476985,0.3200163735311673,0.32000436380904373,0.3200011629742424,0.32000030897631704,0.32000008228399296,0.32000002185704113,0.320000005819809,0.32000000154584807,0.32000000041142,0.3200000001093278,0.3200000000290866,0.32000000000773676,0.3200000000020609,0.3200000000005474,0.3200000000001459,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000231303884,0.32000007658708385,0.3200002990650489,0.3200011366430694,0.32000424090986684,0.32001610158979343,0.3200602433312479,0.3202293011508691,0.3207791199015537,0.32304578282457475,0.32940764752303797,0.3472467130816866,0.37459785963763026,0.3684896307856584,0.34282475432108434,0.3273681490571727,0.32252186373463393,0.3207159673409579,0.3202167223642505,0.3200612614247427,0.3200164285812063,0.3200044101764324,0.32000116709690696,0.3200003122820855,0.3200000825792455,0.32000002209239775,0.32000000584186994,0.3200000015628518,0.32000000041326254,0.320000000110556,0.3200000000292346,0.3200000000078207,0.3200000000020681,0.3200000000005532,0.3200000000001463,0.32000000000003914,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002473823985,0.3200000816728123,0.3200003129372687,0.320001196352804,0.3200044369617784,0.3200169483974109,0.3200630474426954,0.3202406219994826,0.3208409967318285,0.32299573315944424,0.3296916764765536,0.3488147963648057,0.372280357043069,0.367329166862464,0.3438225022852558,0.3278307553619449,0.32253549342494914,0.32075868158166465,0.3202247845223423,0.32006387932503644,0.32001703747840304,0.3200046062728994,0.32000121086541145,0.32000032621449803,0.3200000856782257,0.3200000230782396,0.3200000060611251,0.3200000016326082,0.3200000004287768,0.320000000115494,0.3200000000303323,0.3200000000081702,0.3200000000021457,0.3200000000005779,0.3200000000001518,0.3200000000000408,0.3200000000000107,0.3200000000000028,0.3200000000000006,0.32000000000000006,0.31999999999999995 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv index d3de620a96..f66b1259f6 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv @@ -1 +1 @@ -1.0000005770824896,1.0000011783159937,1.0000023348428144,1.0000048335408955,1.0000096140888717,1.0000198522680352,1.0000396280682198,1.0000814611299855,1.0001633993972072,1.0003338559234014,1.0006735202052979,1.001365803080784,1.0027663358823555,1.0055606771420549,1.011188817367339,1.0220303914066928,1.0424941362753788,1.076473287588041,1.1266571954965292,1.1772347604991271,1.1988226394756631,1.1762220908090188,1.1261936596851396,1.0767321693874763,1.042725603859516,1.0221299662543908,1.0111899871447518,1.0055448424659927,1.0027519854390021,1.0013562508156193,1.000670204228094,1.0003303492599782,1.0001629479830054,1.000080376312828,1.0000396054045226,1.0000195487790788,1.0000096258879743,1.000004753641831,1.0000023424050577,1.0000011548736478,1.0000005770824896,1.0000005770824896,1.0000011639238824,1.0000023626192536,1.00000479827863,1.0000097211199959,1.0000197156279966,1.000039979797362,1.0000809935953772,1.0001642918848856,1.000332657226104,1.0006742589519984,1.001364116244841,1.0027595250304535,1.0055538972732911,1.0111566628878523,1.0219746355070358,1.0423413174370568,1.0768129348777957,1.1265194277277946,1.1765432898009152,1.1990889271209284,1.1755186012108385,1.1260528511125032,1.077093093300635,1.042582452443043,1.0220748340103687,1.0111537829680741,1.0055326635807933,1.002750001646438,1.0013535629528802,1.000671054111867,1.0003295396196588,1.00016330640815,1.0000801538191513,1.0000397090867506,1.0000194927345847,1.0000096528980906,1.0000047400352994,1.0000023480061206,1.0000011498188095,1.0000005770824896,1.0000005770824896,1.000001177235646,1.000002333968217,1.000004831036052,1.0000096094946735,1.0000198432553162,1.0000396076373672,1.0000814258975874,1.0001633129158987,1.0003337194651463,1.00067310219751,1.0013655065329476,1.0027635492857851,1.0055619919637175,1.0111704567393411,1.0220475296754956,1.0424357191416014,1.0765304518077021,1.126718913541207,1.1772009995033406,1.198669646254015,1.176176473364042,1.1262832899706794,1.076811146626436,1.0426736133734495,1.022124990137875,1.0111663040868175,1.005546863259755,1.002750112894503,1.0013572597869407,1.0006702215850014,1.0003305352692546,1.0001630054704738,1.0000804043687488,1.0000396257605781,1.0000195528449312,1.000009631639931,1.000004754208153,1.0000023436811643,1.0000011550828254,1.0000005770824896,1.0000005770824896,1.0000011639238828,1.0000023626192531,1.0000047982786302,1.0000097211199959,1.0000197156279964,1.000039979797361,1.0000809935953778,1.0001642918848845,1.000332657226104,1.0006742589519992,1.0013641162448408,1.0027595250304526,1.0055538972732916,1.0111566628878523,1.0219746355070356,1.0423413174370564,1.076812934877795,1.1265194277277955,1.1765432898009158,1.1990889271209286,1.1755186012108392,1.1260528511125023,1.0770930933006353,1.042582452443042,1.0220748340103687,1.0111537829680741,1.005532663580793,1.002750001646438,1.00135356295288,1.0006710541118693,1.0003295396196576,1.0001633064081492,1.0000801538191506,1.0000397090867506,1.0000194927345838,1.0000096528980904,1.0000047400353007,1.0000023480061195,1.000001149818809,1.0000005770824896,1.0000005770824896,1.0000011783159932,1.0000023348428142,1.000004833540896,1.0000096140888708,1.0000198522680348,1.0000396280682193,1.000081461129986,1.0001633993972068,1.0003338559234012,1.0006735202052979,1.0013658030807835,1.0027663358823555,1.0055606771420549,1.0111888173673382,1.022030391406693,1.0424941362753783,1.0764732875880405,1.1266571954965297,1.1772347604991282,1.1988226394756625,1.1762220908090173,1.1261936596851403,1.0767321693874763,1.0427256038595156,1.0221299662543903,1.011189987144753,1.005544842465993,1.0027519854390023,1.0013562508156206,1.0006702042280953,1.0003303492599773,1.000162947983005,1.0000803763128274,1.000039605404523,1.0000195487790793,1.0000096258879752,1.0000047536418308,1.0000023424050581,1.0000011548736472,1.0000005770824896 \ No newline at end of file +1.0000005770824896,1.000001178315994,1.0000023348428146,1.0000048335408955,1.0000096140888717,1.0000198522680357,1.00003962806822,1.000081461129986,1.0001633993972072,1.0003338559234014,1.0006735202052963,1.0013658030807848,1.0027663358823549,1.0055606771420549,1.0111888173673382,1.022030391406693,1.0424941362753783,1.076473287588041,1.1266571954965297,1.177234760499127,1.1988226394756627,1.1762220908090182,1.126193659685141,1.0767321693874763,1.042725603859516,1.0221299662543917,1.0111899871447523,1.0055448424659934,1.0027519854390023,1.0013562508156206,1.0006702042280935,1.0003303492599784,1.0001629479830048,1.000080376312828,1.0000396054045226,1.0000195487790793,1.0000096258879745,1.0000047536418304,1.000002342405058,1.0000011548736478,1.0000005770824896,1.0000005770824896,1.0000011639238824,1.000002362619253,1.00000479827863,1.0000097211199948,1.0000197156279973,1.000039979797362,1.0000809935953772,1.0001642918848852,1.0003326572261044,1.0006742589519988,1.0013641162448415,1.0027595250304535,1.0055538972732916,1.0111566628878523,1.0219746355070365,1.0423413174370568,1.076812934877796,1.1265194277277946,1.1765432898009147,1.1990889271209284,1.1755186012108385,1.1260528511125028,1.0770930933006355,1.0425824524430425,1.0220748340103687,1.0111537829680741,1.0055326635807926,1.002750001646438,1.0013535629528798,1.0006710541118673,1.000329539619658,1.000163306408151,1.0000801538191506,1.0000397090867512,1.0000194927345838,1.0000096528980906,1.0000047400352998,1.0000023480061206,1.000001149818809,1.0000005770824896,1.0000005770824896,1.000001177235646,1.0000023339682178,1.000004831036052,1.0000096094946735,1.000019843255317,1.0000396076373668,1.000081425897587,1.0001633129158987,1.0003337194651458,1.00067310219751,1.0013655065329476,1.0027635492857854,1.005561991963718,1.0111704567393418,1.0220475296754952,1.0424357191416016,1.0765304518077023,1.1267189135412075,1.1772009995033403,1.1986696462540152,1.176176473364042,1.1262832899706798,1.0768111466264363,1.0426736133734504,1.022124990137874,1.0111663040868177,1.0055468632597553,1.002750112894503,1.0013572597869398,1.0006702215850014,1.0003305352692544,1.0001630054704744,1.000080404368749,1.0000396257605786,1.000019552844932,1.0000096316399305,1.0000047542081525,1.000002343681164,1.000001155082825,1.0000005770824896,1.0000005770824896,1.000001163923883,1.0000023626192522,1.0000047982786304,1.000009721119996,1.0000197156279966,1.0000399797973618,1.0000809935953772,1.0001642918848845,1.0003326572261038,1.0006742589519997,1.0013641162448406,1.0027595250304535,1.0055538972732911,1.0111566628878523,1.021974635507036,1.042341317437057,1.0768129348777955,1.126519427727795,1.1765432898009167,1.199088927120929,1.1755186012108392,1.1260528511125028,1.0770930933006355,1.0425824524430425,1.0220748340103687,1.0111537829680737,1.0055326635807933,1.002750001646438,1.0013535629528802,1.0006710541118684,1.0003295396196574,1.0001633064081492,1.0000801538191506,1.0000397090867512,1.000019492734583,1.0000096528980909,1.0000047400353007,1.0000023480061206,1.0000011498188095,1.0000005770824896,1.0000005770824896,1.0000011783159932,1.000002334842815,1.0000048335408962,1.0000096140888712,1.0000198522680344,1.0000396280682193,1.0000814611299857,1.000163399397207,1.0003338559234012,1.0006735202052974,1.0013658030807835,1.002766335882356,1.0055606771420549,1.011188817367339,1.0220303914066933,1.042494136275379,1.076473287588041,1.1266571954965303,1.1772347604991273,1.1988226394756623,1.1762220908090182,1.12619365968514,1.0767321693874765,1.0427256038595158,1.022129966254391,1.0111899871447525,1.0055448424659932,1.0027519854390015,1.0013562508156204,1.0006702042280948,1.0003303492599782,1.0001629479830045,1.0000803763128274,1.000039605404523,1.000019548779079,1.0000096258879745,1.0000047536418313,1.0000023424050575,1.0000011548736478,1.0000005770824896 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv index 97ab40a594..e928f443c3 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv @@ -1 +1 @@ -1.8749731235450864,1.8750143870499114,1.8749037013219951,1.8751282732115317,1.87422211056315,1.8766290041082128,1.8634831090832136,1.9026336011016998,1.483568134811086,0.09994151556836622,0.008406221638099301,0.0,1.894914384069853e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749847657218903,1.875043723667748,1.8749458285962504,1.8752456121130092,1.8747556597161443,1.8767282192379793,1.875046364476305,1.9286242229184443,1.6622289123028224,0.37179093710147404,0.007013523128833754,0.00036872232416129783,3.7597455758725223e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749690430666655,1.8750238588121373,1.8749147163193878,1.875111824522771,1.8745603262954202,1.8756467374792107,1.8673456603345753,1.8955911063515525,1.4602552882636965,0.16218810460750654,0.008831663883052926,0.0,1.908433431526603e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749848945993564,1.8750401500900573,1.8749609725290433,1.8751321462191342,1.874886813255779,1.8761165098954582,1.875765955564387,1.9259789875633972,1.6485651125002287,0.3806488469505931,0.007355982964660819,0.00045682424135759503,1.952248222141011e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749708298461853,1.8750233125678148,1.8749236308013801,1.8751053926058168,1.874659448400462,1.8755953645556782,1.867946487318457,1.8956821948589013,1.4582980699188623,0.1611675857534255,0.008865212240068043,0.0,9.928858231774165e-07,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.874985548405061,1.8750360494532612,1.8749636484418615,1.8751192174489923,1.8748918514021606,1.8760544379919466,1.8757233360432135,1.9257587857829157,1.6484611823762534,0.3808906670425741,0.007377728112567039,0.0004656375270428661,2.020441467305003e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.874972377766484,1.875023078949124,1.8749275851890599,1.875107784194759,1.8745910752497028,1.87563395947262,1.8679881418033861,1.8957264246093217,1.4581631460299858,0.16123002872148465,0.008876573378165557,0.0,2.0187774904691655e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749853520787652,1.8750351629394686,1.8749625595718662,1.8751413639657082,1.8748844895252437,1.8760652044078023,1.8757171660190424,1.925762050716955,1.6484712230657192,0.380846911488514,0.007379485921683069,0.0004589723935631197,4.0416989665172666e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749723120483313,1.8750231241139526,1.8749259702381993,1.875104918689467,1.8746160163766772,1.8756231634909968,1.8679879683089111,1.8957254952064957,1.4581406485662758,0.16123727060086962,0.008878341945652807,0.0,2.019914868814126e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.874986094396987,1.8750353934054749,1.8749616008415226,1.8751358172334782,1.8748835051635084,1.876057681855189,1.8757187111882896,1.925763318562038,1.6484785863526459,0.3808435915527556,0.007379764292731229,0.0004582861456697922,4.040956256389852e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749723642520086,1.8750231487982678,1.8749259293969873,1.8751046165892813,1.8746146055682376,1.8756234632514248,1.8679877592007985,1.895724855103062,1.458141045907364,0.16123888427137092,0.008878586741826325,0.0,2.0197925962481815e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749858501008805,1.8750352653162339,1.8749617976287922,1.8751350967153995,1.874882261092918,1.876054669072426,1.8757188567164063,1.925763198733349,1.6484785443650076,0.3808437034700673,0.007379774692581649,0.0004582787729133881,4.04088065246216e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.87497223542205,1.875023120816423,1.874925322285461,1.8751033516910347,1.8746245315162477,1.8756185764819815,1.8679885393347178,1.8957252396139932,1.4581416824814026,0.16123750233939652,0.008878365966378247,0.0,2.0195530235548223e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749863445597956,1.8750351391332551,1.8749616123736064,1.8751461178006372,1.8748741869948868,1.8760441768583653,1.8757188311189983,1.925761599489705,1.6484746294915587,0.38084645184384014,0.00737955851969148,0.0004589139839465242,4.040375888500861e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749717990920862,1.8750230711877403,1.874924019093513,1.8751004181417392,1.8746459158390514,1.8756076872574436,1.8679884307939743,1.8957267531704334,1.458150404760647,0.1612215100464494,0.008876121836937308,0.0,2.0174228601119632e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749851929883863,1.8750359263632252,1.8749604239663058,1.875138670049431,1.8748757872159523,1.8760490439968944,1.8757229915387308,1.9257601768596353,1.6484309060667701,0.3808678556649434,0.0073766949331917735,0.00046486501532087615,2.0183743524294298e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.874970189520741,1.875022192505908,1.8749242014604297,1.8751006338139,1.8746179036431472,1.8756094873379645,1.8679507912360012,1.895683509768214,1.4582776394650239,0.16115503260930666,0.008862101140127535,0.0,1.004772030670163e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749841500580253,1.8750424087438191,1.8749559941466067,1.8751596980176708,1.874878413758585,1.8761426587325647,1.8757652334608814,1.9259862059729969,1.6485351500236336,0.3806400852437978,0.007348878266842445,0.00046437064520601316,2.001747621146545e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749687135999695,1.8750231793630534,1.8749126959328426,1.8751096204920787,1.8745086618363689,1.8756483174480476,1.8672919741169287,1.8955964357477737,1.4603546363738333,0.16227899726771997,0.008830899236726877,0.0,1.931485022635541e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749845922017698,1.8750435743204799,1.8749459584085464,1.8752424245115726,1.8747643445657327,1.8768864075642189,1.8749894924830006,1.928613022404572,1.6624659894538567,0.3720241255860329,0.00701810647470388,0.0003888862689451167,3.75333420089932e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8749732820016902,1.8750141854317919,1.874905286721684,1.8751254399560562,1.8742055388223464,1.8766029145093022,1.8634108609630577,1.9026092139917232,1.4837550480957242,0.10021750746482426,0.008409989260146121,0.0,1.8918834487867894e-06,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +1.875000006752869,1.875000085828717,1.8750015231603725,1.8750156068775117,1.875112488661173,1.8762820658409454,1.8646360252888745,1.9016016287751671,1.4900739502555964,0.10417274716901029,0.00039711434979890036,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000050770357,1.875000082272169,1.8750013643121335,1.875018896260375,1.875054326762743,1.875755662600235,1.8748928873892574,1.9216169487567196,1.670658951902623,0.3808597245846964,0.001157839113734775,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000065019852,1.8750000917360745,1.8750020980916349,1.875027675961293,1.8751241889290826,1.875721860275629,1.8684653493553998,1.8939283836242518,1.4674628842329127,0.1683933248180973,0.00038629793690459396,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000006766649,1.8750001139744974,1.8750022892567397,1.8750318928939849,1.8751386944332922,1.876062036099369,1.8751339203454434,1.9177415547655474,1.6559425013206983,0.39149738539229667,0.0012842291055574153,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000078644162,1.8750001146660096,1.8750026441499568,1.8750337565715798,1.875164296463624,1.875640687874918,1.8687940449787999,1.8942757402952983,1.4648507645292028,0.16726202952712074,0.00039319237389590696,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000074645814,1.8750001271154484,1.875002475060895,1.8750346875252761,1.875144328309,1.876008544205754,1.8751294818599353,1.9175690707962623,1.6561268625380043,0.39185315870135234,0.001292973905214457,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000082701785,1.8750001187960712,1.8750027461784702,1.8750345425903991,1.8751676728417108,1.8756387918328057,1.8688377003437386,1.894307604743743,1.4647981441590145,0.16734561206732448,0.0003961102743623312,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007578929,1.8750001293219412,1.875002498977974,1.8750350013202852,1.8751448419016041,1.876005717487765,1.8751307243499677,1.9175642114892033,1.6561739846941634,0.3918183062593839,0.0012936959668087048,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083329554,1.8750001193357075,1.8750027589308194,1.875034649212312,1.875168206273563,1.875638267993714,1.868840376692444,1.894305083851982,1.4648153743758967,0.16736689101741803,0.00039614096084402263,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000075931363,1.8750001295976462,1.8750025020076517,1.8750350425200164,1.8751448863871683,1.8760056724160918,1.8751314132463488,1.9175636847758664,1.6561732954345296,0.3918127131448962,0.0012936861651585488,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083397875,1.8750001193953185,1.8750027603806603,1.8750346604666657,1.8751682594772185,1.8756381393445245,1.8688405196144,1.8943048237729547,1.4648169463852985,0.16736852924272635,0.0003961380715375027,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000075931363,1.8750001295976462,1.8750025020076517,1.8750350425200164,1.8751448863871683,1.8760056724160914,1.8751314132463488,1.9175636847758666,1.656173295434529,0.3918127131448962,0.0012936861651585484,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083329552,1.8750001193357075,1.8750027589308194,1.875034649212312,1.875168206273563,1.8756382679937138,1.868840376692444,1.8943050838519817,1.4648153743758967,0.16736689101741797,0.0003961409608440225,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007578929,1.8750001293219416,1.875002498977974,1.8750350013202852,1.8751448419016041,1.8760057174877653,1.8751307243499677,1.917564211489204,1.6561739846941637,0.391818306259384,0.0012936959668087048,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000082701785,1.875000118796071,1.87500274617847,1.8750345425903991,1.8751676728417102,1.8756387918328057,1.8688377003437384,1.894307604743743,1.4647981441590145,0.1673456120673244,0.0003961102743623314,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000074645814,1.8750001271154484,1.8750024750608947,1.8750346875252761,1.875144328309,1.876008544205754,1.8751294818599362,1.9175690707962625,1.6561268625380043,0.39185315870135234,0.0012929739052144572,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007864416,1.8750001146660096,1.8750026441499568,1.8750337565715798,1.875164296463624,1.8756406878749181,1.8687940449787999,1.8942757402952983,1.4648507645292026,0.16726202952712074,0.00039319237389590696,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000067666488,1.8750001139744974,1.8750022892567395,1.8750318928939849,1.8751386944332922,1.8760620360993683,1.8751339203454436,1.9177415547655468,1.6559425013206983,0.39149738539229667,0.0012842291055574157,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000065019852,1.8750000917360745,1.8750020980916347,1.875027675961293,1.8751241889290826,1.8757218602756298,1.8684653493554002,1.8939283836242518,1.467462884232913,0.16839332481809732,0.0003862979369045938,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000050770357,1.8750000822721695,1.8750013643121335,1.8750188962603747,1.8750543267627426,1.8757556626002345,1.8748928873892572,1.9216169487567192,1.6706589519026225,0.38085972458469647,0.001157839113734775,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000067528687,1.8750000858287166,1.8750015231603725,1.8750156068775117,1.8751124886611725,1.876282065840945,1.864636025288874,1.9016016287751665,1.4900739502555964,0.10417274716901026,0.00039711434979890073,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv index 71990bd096..dabf80475f 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv @@ -1 +1 @@ -1.0,0.7500000000105729,0.7500000000064295,1.0,0.7500004259693253,0.7500002570841655,0.7499989169471397,0.7500028682631008,0.7499981368210413,0.7499831210977048,0.7500390728135822,0.749771749334763,0.7502760419955697,0.7502422708364372,0.750291635143973,0.7506729269638872,0.7500633598828014,0.749843166799062,0.750143503221372,0.7500103708690976,0.7500272869543139,0.7499896440335483,0.7500059720635704,0.7499980754589642,0.7500001385073398,0.750000049090258,0.7497597399776574,0.7499098187464788,0.749413018333978,0.7500147331000566,0.7499281600793548,0.7492703220784254,0.7499999302234088,0.7491363270824061,0.7497885019351833,0.7503819184481528,0.749994075136079,0.7500220877115016,0.7499728087161154,0.7500302561218245,0.7503546116044685,0.7500016691772239,0.7499997368510869,0.7499999219776787,0.7500388119503033,0.750001903978383,0.7500009953785789,0.7499909340111255,0.7516746573141008,0.7500070220274003,0.7493513445414902,0.7499628106926368,0.7482414565198314,0.7500002106047007,0.7501560353449197,0.7904180998124106,0.7503952280890568,0.7499974816850258,0.7502469688956919,0.7513066654747202,0.7500035798439659,0.7500001395072051,0.7499991666903205,0.7499516721788322,0.750547997718658,0.7496725856331059,0.7499997324384141,0.74966903313215,0.7499393884320291,0.7499996906159299,0.7499992974067922,0.7500148679846823,0.7487946270245329,0.7500042641640668,0.749797592830148,0.7500003230869228,0.7500020477721738,0.7497986267226814,0.7500053736813103,0.7499976350034846,0.7499932672094558,0.7499903793080835,0.7500360213260661,0.7499998272366408,0.7499985461936213,0.7542090078984922,0.7496713678504054,0.7502626142617106,0.7498682204374161,0.7500001184315589,0.7500028188076174,0.7498438542587438,0.7468430538060918,0.7498381800929629,0.7500004599763781,0.7506448821119585,0.7480551192223912,0.7499802433933443,0.7500018139159351,0.7500512377883474,0.7500000411232486,0.7504258403596684,1.0,0.7481145825023805,0.7499872633506379,0.7500656624058257,0.7460204438841458,0.7500009805270524,0.7504930637501668,0.7487903154202415,0.7499994910330159,0.8153581472920244,0.7442045649629085,0.7500008778261391,0.7500000153124828,0.7490751327389911,1.0,0.8421880087814462,0.8303203640655127,0.7499992171938303,1.0,0.8391936318020317,0.7500000518925913,0.7499999997909084,0.7499999994798283,0.7500000001451972,0.7499999852125767,0.7499999963840418,0.7500000008453238,0.7499999983199257,0.7499999736942726,0.7499999836906178,0.7500000087321598,0.7500000014628113,0.7499999999223506,0.7500000000057312,0.7500000004699109,0.7500000000965854,0.75000000032476,0.7499999980729679,0.749999999992544,0.7500000000611138,0.7499999999979818,0.7499999999815565,0.7500000000190092,0.749999999998941,0.7500000000063525,0.7499999999815002,0.7499999999417699 \ No newline at end of file +1.0,0.75,0.75,1.0,0.7500000000073724,0.7499999999997002,0.7499999999569099,0.7499999987889172,0.7499999808694036,0.7499997651492778,0.7499982402369758,0.7499941167783433,0.7499833136145743,0.7499859049834832,0.7499917439647185,0.7499878620411933,0.7499924803548221,0.7500028694542862,0.7500047192086836,0.7500010000759205,0.7500001531362113,0.7500000192588656,0.750000001792403,0.7500000001203555,0.7499999999999541,0.749999999999371,0.7499999485552269,0.7499965902292165,0.7500157411536653,0.7499999357182036,0.7500005831767943,0.7499819350054931,0.7500000000179637,0.7500614405836838,0.750023424351721,0.7500096712823723,0.7499999946934025,0.7499923011757014,0.7500039407198505,0.7500000762620849,0.749981500294057,0.7500000004487684,0.7499999999900874,0.7500000000007807,0.7500207163255503,0.7499999997363438,0.749998966228408,0.7500000071560549,0.7514267956866647,0.7499999449511071,0.7500259966018847,0.7500005779298847,0.7461418381506764,0.7500000000025999,0.7500007105234197,0.78430119315471,0.7507839752277823,0.7499999969772144,0.7500039267893124,0.7501366257112141,0.7500000385070739,0.7499999999964828,0.7500000000868455,0.7499997126171511,0.7507301440080332,0.7501174749616408,0.7500000026792115,0.7499697931973663,0.7500064697678326,0.7499999999135847,0.7499999998335984,0.749999032990776,0.7496343424946985,0.7499999998506606,0.750079242679066,0.7499999999955279,0.7500000024599612,0.7498000978979923,0.7499999957813732,0.7500000567182429,0.7499999943361697,0.75000000669346,0.7500005409963966,0.7500000000006786,0.7499999998652032,0.752083282254053,0.7500218312969331,0.7499939102683744,0.7500049469395689,0.7499999999909093,0.7499999841757341,0.7500126225851828,0.7483660542008235,0.7499930430594415,0.7499999993006308,0.7500507162031664,0.7489419453465432,0.749999904570763,0.7500000000603018,0.7500000633609366,0.7499999999950617,0.7502387187122324,1.0,0.7446974815875695,0.7499999521210499,0.7499988580063501,0.7420199596065232,0.749999471758056,0.7508934237221221,0.7502989551124126,0.7500000000000313,0.8088816226936704,0.7411053601201313,0.7500000000326672,0.7499999999999524,0.7445959681713037,1.0,0.8365050286385303,0.8248006762685067,0.7499999999972493,1.0,0.8333091345539045,0.7499999999994699,0.75,0.75,0.75,0.7499999999999946,0.7499999999999949,0.75,0.75,0.749999999999998,0.7499999999999996,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv index da147162df..5275b9a025 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv @@ -1 +1 @@ -0.0,0.0,0.0,0.0,0.0,0.0,0.16453809461088784,0.8233715742354758,1.443641515345269,2.0513950565188996,2.6347651338100126,3.1960897390633214,3.7348730253959284,4.251457486259565,4.745809034896075,5.217938018561808,5.667843195005986,6.095527407106525,6.500987717444724,6.884227227065169,7.245242964261893,7.584037854862489,7.900609093250553,8.194959428854379,8.467086198483354,8.716992015700143,8.944674330298696,9.150135651224629,9.333373516858595,9.494390355714405,9.633183774982207,9.749756140388703,9.844105116578557,9.916233006755796,9.966137557326036,9.99382090409509,9.999281176820617,9.982519871401184,9.943535682474822,9.882330180971351,9.798901355375238,9.693251439225143,9.565378129361168,9.41528377321967,9.242965985896022,9.048427183944472,8.831664912413174,8.592681656963906,8.331474899612468,8.048047157440516,7.742395969809017,7.414523582627677,7.064428343503563,6.692110543238669,6.297573246643971,5.880806321493848,5.441836481684068,4.980603277577162,4.497243168089517,3.9914674719093393,3.4638987629068003,2.9131297627791812,2.3418880417492556,1.7427579437609513,1.132516530855763,0.49039016278860953,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17063707221256283,0.8258352100429671,1.443143708270502,2.052385226381585,2.6346891371791274,3.1961549523145205,3.7348774562097686,4.251470332021986,4.745807633848662,5.217942320501523,5.667843310923933,6.095529597138383,6.500988135817735,6.884228344286862,7.245243468426776,7.5840383434200005,7.900609634929121,8.194959525768283,8.467086758107879,8.71699185908205,8.944674898050746,9.150135326976724,9.333374087636567,9.494389920383902,9.633184345915517,9.74975563362257,9.844105683713874,9.916232462833825,9.966138099626237,9.993820409893289,9.999281553432269,9.982519495822732,9.943536209534685,9.882329652739003,9.79890192015026,9.693250948773924,9.565378700185349,9.415283362969218,9.242966556374643,9.048426897641583,8.831665477957701,8.592681555079423,8.331475447691092,8.048047321747717,7.742396452351373,7.414524090654921,7.064428546514841,6.692111283976814,6.297572188879784,5.880806222756606,5.441830250582261,4.980597293163855,4.497217550574328,3.99142731932119,3.463723110290843,2.913056644068709,2.341037070851054,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039404,0.8233451516067436,1.4442360606865552,2.0512985457248964,2.63489167087237,3.1960719972367815,3.734877050424193,4.251458543519943,4.745813145972912,5.217937203545765,5.667845214763979,6.095526903947858,6.500988897874284,6.8842269205311535,7.245243705437303,7.584037660885711,7.900609566499259,8.19495930552365,8.467086497959865,8.716991938861629,8.944674513704097,9.15013560556591,9.333373622072054,9.49439033083069,9.633183828460801,9.749756128727197,9.844105138063988,9.91623300247591,9.966137562530665,9.993820902522833,9.99928117860963,9.98251986951131,9.943535690126428,9.882330175129066,9.798901383174663,9.693251424384961,9.565378193880544,9.415283743119941,9.242966108088753,9.048427130298773,8.831665121233032,8.592681567669228,8.331475238938213,8.048047012151763,7.742396516905825,7.414523339286854,7.06442927126116,6.692110111230403,6.297575006964063,5.880805884077139,5.441838925726399,4.980603367403127,4.497245700381287,3.9914587969287325,3.463940586704718,2.9130781625253688,2.342179298953843,1.7426515920252363,1.1330756673199627,0.49028274681506945,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1707206069828271,0.827133639353106,1.4427999924056514,2.052031639896863,2.634731552946122,3.196101599611255,3.7348930775365123,4.251458596108597,4.7458098826590245,5.217939510887614,5.667843737173558,6.095528385608118,6.500988281116463,6.884227637652063,7.245243545729184,7.584037898426171,7.900609682688803,8.194959241512535,8.4670867889485,8.716991679609482,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283474,9.633184354164609,9.749755602562216,9.844105688654864,9.916232450611755,9.966138102376345,9.993820406592457,9.999281555362444,9.982519491265984,9.943536212951061,9.882329636776703,9.798901926210993,9.693250910814761,9.565378710177347,9.415283289903913,9.24296657218958,9.048426771559367,8.83166550272937,8.592681349154866,8.331475487771229,8.048046989551109,7.7423965252466065,7.414523528516587,7.06442871545367,6.692110178511221,6.297572716835042,5.880803479714871,5.441832642818861,4.9805890382343065,4.497226861387612,3.991399144021369,3.463750855405036,2.9129092064015145,2.341076274896351,1.7437099234449605,1.1307343880548872,0.4938239433211966,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1627051150463562,0.8230825415667715,1.4441834301274552,2.051393872505913,2.6349177833059905,3.196076941672937,3.734882869760084,4.251459729471447,4.745814483006352,5.217937470886174,5.6678455810685415,6.095527064038327,6.500989080328943,6.88422702207337,7.245243816230414,7.5840377260549445,7.900609637001741,8.194959347249053,8.467086542931744,8.716991965126226,8.944674541750619,9.150135621444397,9.333373638718871,9.494390339700743,9.63318383750534,9.749756132968034,9.844105142293948,9.916233003872883,9.966137564144173,9.993820902501671,9.9992811795471,9.982519869653732,9.943535692285293,9.882330176922208,9.798901388699612,9.693251429291333,9.56537820527286,9.41528375291484,9.242966128640171,9.048427147333545,8.831665155759907,8.59268159515479,8.33147529560518,8.048047054384197,7.742396613402673,7.414523401782891,7.064429458282312,6.692110207937445,6.297575441062394,5.880806088334927,5.441840024229656,4.980603827090698,4.497249250713551,3.9914598154887644,3.4639566844645655,2.91309935766652,2.342225926219517,1.742717844795196,1.1331205813562777,0.49028342072999853,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1707206069828272,0.827133639353106,1.44279999240565,2.052031639896862,2.6347315529461226,3.1961015996112563,3.734893077536513,4.251458596108597,4.745809882659024,5.217939510887616,5.667843737173554,6.0955283856081195,6.500988281116466,6.884227637652063,7.245243545729187,7.584037898426173,7.900609682688805,8.194959241512539,8.467086788948505,8.716991679609478,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283483,9.633184354164605,9.749755602562217,9.84410568865486,9.91623245061175,9.966138102376343,9.993820406592455,9.99928155536245,9.98251949126599,9.943536212951066,9.88232963677671,9.798901926210998,9.693250910814765,9.56537871017735,9.415283289903915,9.24296657218958,9.048426771559372,8.831665502729372,8.592681349154871,8.331475487771229,8.048046989551114,7.7423965252466065,7.414523528516589,7.064428715453674,6.692110178511219,6.297572716835043,5.880803479714871,5.441832642818859,4.980589038234303,4.4972268613876105,3.9913991440213668,3.463750855405035,2.912909206401515,2.3410762748963516,1.7437099234449605,1.1307343880548877,0.49382394332119617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039432,0.8233451516067437,1.4442360606865547,2.051298545724897,2.6348916708723706,3.196071997236782,3.734877050424192,4.251458543519943,4.745813145972911,5.21793720354577,5.667845214763981,6.095526903947857,6.5009888978742865,6.884226920531155,7.245243705437304,7.584037660885708,7.900609566499258,8.194959305523653,8.467086497959865,8.71699193886164,8.94467451370409,9.150135605565914,9.333373622072056,9.494390330830687,9.633183828460803,9.749756128727197,9.84410513806399,9.916233002475906,9.966137562530662,9.993820902522831,9.999281178609628,9.98251986951131,9.943535690126428,9.882330175129063,9.798901383174666,9.693251424384957,9.565378193880541,9.415283743119941,9.242966108088757,9.048427130298776,8.831665121233033,8.59268156766923,8.331475238938216,8.048047012151764,7.742396516905831,7.414523339286856,7.06442927126116,6.692110111230401,6.297575006964068,5.880805884077139,5.441838925726403,4.980603367403125,4.497245700381287,3.9914587969287307,3.4639405867047195,2.9130781625253688,2.3421792989538437,1.742651592025237,1.1330756673199627,0.4902827468150699,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1706370722125629,0.8258352100429669,1.4431437082705019,2.052385226381583,2.6346891371791274,3.1961549523145196,3.7348774562097695,4.251470332021983,4.7458076338486626,5.217942320501525,5.667843310923925,6.095529597138383,6.500988135817728,6.884228344286864,7.245243468426774,7.584038343419998,7.900609634929124,8.194959525768288,8.467086758107875,8.716991859082047,8.94467489805074,9.15013532697673,9.333374087636567,9.494389920383908,9.633184345915522,9.74975563362257,9.844105683713874,9.916232462833818,9.966138099626239,9.993820409893292,9.999281553432267,9.982519495822732,9.943536209534685,9.882329652739008,9.798901920150255,9.693250948773926,9.56537870018534,9.415283362969216,9.242966556374634,9.048426897641585,8.8316654779577,8.592681555079416,8.331475447691087,8.04804732174772,7.7423964523513735,7.414524090654919,7.06442854651484,6.692111283976813,6.297572188879785,5.880806222756606,5.441830250582257,4.98059729316386,4.497217550574325,3.9914273193211884,3.4637231102908452,2.9130566440687087,2.3410370708510566,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16453809461088778,0.8233715742354752,1.4436415153452693,2.0513950565188983,2.6347651338100126,3.196089739063321,3.7348730253959284,4.251457486259565,4.745809034896077,5.2179380185618065,5.667843195005984,6.09552740710653,6.50098771744472,6.8842272270651685,7.245242964261893,7.584037854862496,7.900609093250557,8.19495942885438,8.467086198483361,8.71699201570014,8.944674330298696,9.15013565122463,9.333373516858591,9.494390355714412,9.633183774982205,9.749756140388708,9.844105116578548,9.916233006755792,9.966137557326036,9.993820904095077,9.99928117682062,9.982519871401186,9.943535682474822,9.882330180971348,9.798901355375232,9.693251439225136,9.565378129361175,9.415283773219674,9.242965985896024,9.04842718394447,8.83166491241318,8.592681656963912,8.33147489961247,8.04804715744051,7.742395969809017,7.4145235826276705,7.064428343503563,6.692110543238665,6.29757324664397,5.880806321493852,5.441836481684067,4.980603277577162,4.497243168089524,3.991467471909346,3.4638987629068003,2.9131297627791803,2.3418880417492542,1.7427579437609508,1.1325165308557623,0.4903901627886097,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +0.0,0.0,0.0,0.0,0.0,0.0,0.16453809461088809,0.8233715742354761,1.4436415153452693,2.0513950565189005,2.6347651338100126,3.196089739063321,3.734873025395928,4.251457486259568,4.745809034896075,5.217938018561809,5.667843195005988,6.095527407106528,6.500987717444724,6.88422722706517,7.245242964261893,7.584037854862489,7.900609093250553,8.194959428854379,8.467086198483354,8.716992015700143,8.944674330298696,9.150135651224629,9.333373516858595,9.494390355714405,9.633183774982207,9.749756140388703,9.844105116578557,9.916233006755796,9.966137557326036,9.99382090409509,9.999281176820617,9.982519871401184,9.943535682474822,9.882330180971351,9.798901355375238,9.693251439225143,9.565378129361168,9.41528377321967,9.242965985896022,9.048427183944472,8.831664912413174,8.592681656963906,8.331474899612468,8.048047157440516,7.742395969809017,7.414523582627677,7.064428343503563,6.692110543238669,6.297573246643971,5.880806321493848,5.441836481684068,4.980603277577162,4.497243168089517,3.9914674719093393,3.4638987629068003,2.9131297627791812,2.3418880417492556,1.7427579437609513,1.132516530855763,0.49039016278860953,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17063707221256294,0.8258352100429669,1.4431437082705028,2.0523852263815847,2.634689137179127,3.19615495231452,3.734877456209768,4.251470332021984,4.745807633848662,5.21794232050152,5.6678433109239315,6.095529597138384,6.5009881358177335,6.884228344286862,7.245243468426775,7.5840383434200005,7.900609634929121,8.194959525768283,8.467086758107879,8.71699185908205,8.944674898050746,9.150135326976724,9.333374087636567,9.494389920383902,9.633184345915517,9.74975563362257,9.844105683713874,9.916232462833825,9.966138099626237,9.993820409893289,9.999281553432269,9.982519495822732,9.943536209534685,9.882329652739003,9.79890192015026,9.693250948773924,9.565378700185349,9.415283362969218,9.242966556374643,9.048426897641583,8.831665477957701,8.592681555079423,8.331475447691092,8.048047321747717,7.742396452351373,7.414524090654921,7.064428546514841,6.692111283976814,6.297572188879784,5.880806222756606,5.441830250582261,4.980597293163855,4.497217550574328,3.99142731932119,3.463723110290843,2.913056644068709,2.341037070851054,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039485,0.8233451516067432,1.4442360606865559,2.0512985457248964,2.6348916708723698,3.19607199723678,3.7348770504241937,4.251458543519943,4.745813145972914,5.217937203545765,5.66784521476398,6.0955269039478575,6.500988897874284,6.884226920531155,7.245243705437304,7.584037660885711,7.900609566499259,8.19495930552365,8.467086497959865,8.716991938861629,8.944674513704097,9.15013560556591,9.333373622072054,9.49439033083069,9.633183828460801,9.749756128727197,9.844105138063988,9.91623300247591,9.966137562530665,9.993820902522833,9.99928117860963,9.98251986951131,9.943535690126428,9.882330175129066,9.798901383174663,9.693251424384961,9.565378193880544,9.415283743119941,9.242966108088753,9.048427130298773,8.831665121233032,8.592681567669228,8.331475238938213,8.048047012151763,7.742396516905825,7.414523339286854,7.06442927126116,6.692110111230403,6.297575006964063,5.880805884077139,5.441838925726399,4.980603367403127,4.497245700381287,3.9914587969287325,3.463940586704718,2.9130781625253688,2.342179298953843,1.7426515920252363,1.1330756673199627,0.49028274681506945,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17072060698282715,0.8271336393531055,1.4427999924056503,2.052031639896863,2.6347315529461226,3.1961015996112536,3.7348930775365123,4.251458596108597,4.745809882659023,5.217939510887613,5.667843737173559,6.095528385608119,6.500988281116463,6.884227637652063,7.245243545729185,7.584037898426171,7.900609682688803,8.194959241512537,8.4670867889485,8.716991679609482,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283474,9.633184354164609,9.749755602562216,9.844105688654864,9.916232450611755,9.966138102376345,9.993820406592457,9.999281555362444,9.982519491265984,9.943536212951061,9.882329636776703,9.798901926210993,9.693250910814761,9.565378710177347,9.415283289903913,9.24296657218958,9.048426771559367,8.83166550272937,8.592681349154866,8.331475487771229,8.048046989551109,7.7423965252466065,7.414523528516587,7.06442871545367,6.692110178511221,6.297572716835042,5.880803479714871,5.441832642818861,4.9805890382343065,4.497226861387612,3.991399144021369,3.463750855405036,2.9129092064015145,2.341076274896351,1.7437099234449605,1.1307343880548872,0.4938239433211966,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1627051150463568,0.8230825415667712,1.4441834301274552,2.0513938725059138,2.6349177833059914,3.196076941672937,3.7348828697600847,4.2514597294714465,4.745814483006352,5.2179374708861745,5.667845581068539,6.0955270640383254,6.500989080328945,6.88422702207337,7.245243816230415,7.5840377260549445,7.900609637001741,8.194959347249053,8.467086542931744,8.716991965126226,8.944674541750619,9.150135621444397,9.333373638718871,9.494390339700743,9.63318383750534,9.749756132968034,9.844105142293948,9.916233003872883,9.966137564144173,9.993820902501671,9.9992811795471,9.982519869653732,9.943535692285293,9.882330176922208,9.798901388699612,9.693251429291333,9.56537820527286,9.41528375291484,9.242966128640171,9.048427147333545,8.831665155759907,8.59268159515479,8.33147529560518,8.048047054384197,7.742396613402673,7.414523401782891,7.064429458282312,6.692110207937445,6.297575441062394,5.880806088334927,5.441840024229656,4.980603827090698,4.497249250713551,3.9914598154887644,3.4639566844645655,2.91309935766652,2.342225926219517,1.742717844795196,1.1331205813562777,0.49028342072999853,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17072060698282726,0.8271336393531055,1.442799992405651,2.052031639896862,2.634731552946123,3.196101599611255,3.7348930775365123,4.251458596108597,4.7458098826590245,5.217939510887614,5.667843737173552,6.095528385608121,6.500988281116466,6.884227637652063,7.245243545729185,7.584037898426173,7.900609682688805,8.194959241512539,8.467086788948505,8.716991679609478,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283483,9.633184354164605,9.749755602562217,9.84410568865486,9.91623245061175,9.966138102376343,9.993820406592455,9.99928155536245,9.98251949126599,9.943536212951066,9.88232963677671,9.798901926210998,9.693250910814765,9.56537871017735,9.415283289903915,9.24296657218958,9.048426771559372,8.831665502729372,8.592681349154871,8.331475487771229,8.048046989551114,7.7423965252466065,7.414523528516589,7.064428715453674,6.692110178511219,6.297572716835043,5.880803479714871,5.441832642818859,4.980589038234303,4.4972268613876105,3.9913991440213668,3.463750855405035,2.912909206401515,2.3410762748963516,1.7437099234449605,1.1307343880548877,0.49382394332119617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039482,0.8233451516067434,1.4442360606865559,2.051298545724897,2.6348916708723706,3.196071997236782,3.734877050424193,4.2514585435199415,4.745813145972912,5.217937203545769,5.667845214763981,6.095526903947857,6.5009888978742865,6.8842269205311535,7.245243705437304,7.584037660885707,7.900609566499258,8.194959305523653,8.467086497959865,8.71699193886164,8.944674513704093,9.150135605565914,9.333373622072056,9.494390330830687,9.633183828460803,9.749756128727197,9.84410513806399,9.916233002475906,9.966137562530662,9.993820902522831,9.999281178609628,9.98251986951131,9.943535690126428,9.882330175129063,9.798901383174666,9.693251424384957,9.565378193880541,9.415283743119941,9.242966108088757,9.048427130298776,8.831665121233033,8.59268156766923,8.331475238938216,8.048047012151764,7.742396516905831,7.414523339286856,7.06442927126116,6.692110111230401,6.297575006964068,5.880805884077139,5.441838925726403,4.980603367403125,4.497245700381287,3.9914587969287307,3.4639405867047195,2.9130781625253688,2.3421792989538437,1.742651592025237,1.1330756673199627,0.4902827468150699,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1706370722125627,0.8258352100429668,1.4431437082705028,2.052385226381582,2.634689137179128,3.1961549523145196,3.7348774562097677,4.251470332021983,4.7458076338486626,5.217942320501524,5.667843310923927,6.095529597138383,6.500988135817731,6.884228344286864,7.245243468426774,7.584038343419998,7.900609634929124,8.19495952576829,8.467086758107875,8.716991859082047,8.944674898050742,9.15013532697673,9.333374087636567,9.494389920383908,9.633184345915522,9.74975563362257,9.844105683713874,9.916232462833818,9.966138099626239,9.993820409893292,9.999281553432267,9.982519495822732,9.943536209534685,9.882329652739008,9.798901920150255,9.693250948773926,9.56537870018534,9.415283362969216,9.242966556374634,9.048426897641585,8.8316654779577,8.592681555079416,8.331475447691087,8.04804732174772,7.7423964523513735,7.414524090654919,7.06442854651484,6.692111283976813,6.297572188879785,5.880806222756606,5.441830250582257,4.98059729316386,4.497217550574325,3.9914273193211884,3.4637231102908452,2.9130566440687087,2.3410370708510566,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.164538094610888,0.8233715742354755,1.4436415153452695,2.0513950565188983,2.634765133810012,3.1960897390633205,3.7348730253959284,4.251457486259564,4.745809034896077,5.2179380185618065,5.667843195005985,6.095527407106528,6.500987717444722,6.884227227065169,7.245242964261893,7.584037854862496,7.900609093250557,8.194959428854379,8.467086198483361,8.716992015700143,8.94467433029869,9.150135651224632,9.33337351685859,9.494390355714412,9.633183774982205,9.749756140388708,9.844105116578548,9.916233006755792,9.966137557326036,9.993820904095077,9.99928117682062,9.982519871401186,9.943535682474822,9.882330180971348,9.798901355375232,9.693251439225136,9.565378129361175,9.415283773219674,9.242965985896024,9.04842718394447,8.83166491241318,8.592681656963912,8.33147489961247,8.04804715744051,7.742395969809017,7.4145235826276705,7.064428343503563,6.692110543238665,6.29757324664397,5.880806321493852,5.441836481684067,4.980603277577162,4.497243168089524,3.991467471909346,3.4638987629068003,2.9131297627791803,2.3418880417492542,1.7427579437609508,1.1325165308557623,0.4903901627886097,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv index 28e962b9dc..de34c8b50f 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv @@ -1 +1 @@ -0.7813240844564745,0.7859207697676235,0.8246949277188196,0.9424065799292063,1.1187319439648076,1.0724909048989892,0.9067214714651496,0.8102774008877072,0.7854858034786969,0.727771309417681,0.6432333125043729,0.5595040595624052,0.47589541808887653,0.392331628030124,0.308766498967706,0.2533334162670632,0.2126668682560308,0.17199933966069503,0.13133643349241497,0.09066095012647016,0.05001062870435483,0.00933333480208262,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7793852430332063,0.7884026135586688,0.817237363531028,0.9357008851758668,1.1473083329465554,1.0832922672785936,0.8962373102580149,0.8056617182695657,0.7863527843921481,0.7274147037522598,0.6432668635453445,0.559490971905292,0.4758980998742981,0.39233229836530864,0.3087672688526151,0.25333385720184204,0.21266690711274577,0.17199897994009075,0.13133471418740197,0.06632797857395868,0.03240662584789251,0.009326022709676517,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7812602187029112,0.7855567524012104,0.8244953442802462,0.9434727787185462,1.1143608045317412,1.072130227543275,0.9083807450445847,0.810211106405291,0.7853044042632327,0.7278166284905576,0.6432234171472482,0.5595059015044148,0.475894527886551,0.39233103639543443,0.30876579316920916,0.25333299865855397,0.2126664781941885,0.145881103727458,0.07248592966499931,0.03727615460845565,0.03240947198705759,0.009333477948588595,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787066494973837,0.7894941203932524,0.8170393981502364,0.9370340030783237,1.147846753431986,1.0822650153056537,0.8956769297923479,0.8070430106135642,0.7863041858434372,0.7274351851640753,0.6432698915130435,0.559492594512635,0.47590017490698366,0.39233514557697996,0.3087683914477493,0.24122101405120783,0.16006916693874615,0.07891838195337014,0.04216098729241981,0.037274826817060305,0.03240577596398012,0.009326340748171645,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810641414480954,0.7854279718372201,0.8242709546601485,0.9431684392593727,1.1142659304626141,1.072199592278354,0.9082300639738683,0.8100885370839686,0.7851965256371847,0.7231483703629368,0.6312225312417852,0.5401942007383305,0.4492592182427197,0.35838061455435144,0.2674991967614746,0.17662288084968955,0.08574754052678327,0.047038906279102795,0.04216153252442859,0.037276205288539636,0.03240846279615017,0.009333577536378871,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787105588701196,0.7895638029305132,0.8170619770717256,0.9370950465042062,1.1478901267352812,1.082263211227513,0.8956838186645415,0.8071059854720442,0.7863232662136845,0.7147335797338563,0.6106624750398524,0.5070077238499501,0.4035314993637133,0.3000895327660611,0.19660724923620296,0.09317275641497093,0.05192327394392865,0.0470426293685989,0.042161031917458125,0.0372756717909613,0.03240593250938938,0.009326489627145385,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810454726525481,0.7854181751872243,0.8242554299036101,0.9431611133700255,1.1142567477155196,1.0721983652247484,0.908219599608478,0.8100817008503912,0.7851868432120346,0.704322298191696,0.5829267137517044,0.46247489210366977,0.34200859199956113,0.2216571054300941,0.10139421985565666,0.05674996272057821,0.05190322258584181,0.04704022474252691,0.04215927843432444,0.03727646241549614,0.03240791232158931,0.00933363172285581,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787128926615399,0.7895694272466709,0.8170635383900394,0.9370973460621278,1.1478921876187533,1.082264620673566,0.8956850497857394,0.8071095916799396,0.7863262632471678,0.6887068306225874,0.5438870299179815,0.3995036735515877,0.2553725871547222,0.11126025215742122,0.061615006369848895,0.05690864656149776,0.051914407358072,0.047046979360470774,0.042160620010187874,0.03727816341723201,0.032405436081469834,0.009326739550183477,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810436497553008,0.7854172676218663,0.8242544439138914,0.943160981305952,1.114256194296732,1.0721979908176946,0.9082194272132975,0.8100810861790686,0.7851821511843394,0.6659111733434007,0.4842965006987638,0.3039500411076378,0.12312346835446994,0.04913831929015945,0.009400280940632832,0.04937826814099468,0.051927972651344335,0.047063985127763316,0.04214607417693097,0.03728107270628838,0.03240647625696502,0.00933395121382693,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787132243471409,0.7895699003677971,0.8170636558161212,0.9370974695310607,1.1478924422284158,1.082264640131319,0.8956854443176574,0.8071081889398264,0.7863325393926828,0.6259878022331121,0.3830420949769103,0.14062530819963004,0.02737390388969285,0.0,0.0,0.0,0.028904296350938212,0.04710175968511787,0.042131238851736,0.03728177747723283,0.03240419776214892,0.009326812863162774,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810434895734448,0.7854171896558875,0.8242543731572617,0.9431609476823881,1.114256199479555,1.0721978651770334,0.9082207133812544,0.8100762381388111,0.7851907924597227,0.5438672815751062,0.17154298575083546,0.0762572615528931,0.0,0.0,0.0,0.0,0.0,0.046974748749389894,0.0421737343155978,0.0372671684172185,0.03240870084637156,0.009333304153304479,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787132243471406,0.7895699003677968,0.8170636558161211,0.9370974695310603,1.1478924422284158,1.08226464013132,0.8956854443176573,0.8071081889398259,0.786332539392683,0.6259878022331121,0.3830420949769102,0.14062530819963004,0.027373903889692706,0.0,0.0,0.0,0.028904296350938108,0.04710175968511787,0.04213123885173604,0.03728177747723284,0.03240419776214894,0.009326812863162774,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810436497553007,0.785417267621866,0.824254443913891,0.9431609813059516,1.1142561942967317,1.072197990817695,0.9082194272132975,0.8100810861790685,0.7851821511843395,0.665911173343401,0.484296500698764,0.30395004110763757,0.12312346835446963,0.04913831929015923,0.00940028094063261,0.04937826814099445,0.05192797265134433,0.047063985127763316,0.04214607417693096,0.037281072706288394,0.03240647625696503,0.009333951213826934,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787128926615402,0.7895694272466707,0.8170635383900393,0.9370973460621279,1.1478921876187538,1.0822646206735658,0.8956850497857389,0.8071095916799396,0.7863262632471679,0.6887068306225876,0.5438870299179813,0.39950367355158745,0.255372587154722,0.11126025215742077,0.06161500636984893,0.05690864656149774,0.051914407358072,0.047046979360470795,0.04216062001018786,0.037278163417232016,0.03240543608146981,0.009326739550183477,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.781045472652548,0.7854181751872248,0.8242554299036098,0.9431611133700253,1.1142567477155194,1.0721983652247484,0.908219599608478,0.8100817008503912,0.7851868432120345,0.7043222981916961,0.582926713751704,0.46247489210366993,0.3420085919995608,0.22165710543009426,0.10139421985565666,0.05674996272057822,0.05190322258584183,0.0470402247425269,0.04215927843432443,0.037276462415496134,0.032407912321589294,0.009333631722855812,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.77871055887012,0.7895638029305134,0.8170619770717255,0.9370950465042058,1.1478901267352817,1.0822632112275132,0.8956838186645413,0.8071059854720437,0.7863232662136845,0.7147335797338563,0.6106624750398524,0.5070077238499502,0.4035314993637133,0.3000895327660611,0.19660724923620287,0.09317275641497091,0.05192327394392865,0.04704262936859889,0.04216103191745813,0.0372756717909613,0.03240593250938938,0.009326489627145385,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810641414480956,0.7854279718372204,0.8242709546601487,0.9431684392593724,1.114265930462614,1.0721995922783538,0.9082300639738681,0.8100885370839686,0.7851965256371847,0.7231483703629371,0.6312225312417852,0.5401942007383307,0.4492592182427196,0.35838061455435155,0.2674991967614746,0.17662288084968955,0.08574754052678321,0.04703890627910279,0.0421615325244286,0.03727620528853964,0.03240846279615016,0.009333577536378864,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7787066494973838,0.7894941203932527,0.8170393981502362,0.9370340030783235,1.147846753431986,1.0822650153056537,0.8956769297923476,0.8070430106135642,0.7863041858434371,0.7274351851640757,0.6432698915130431,0.5594925945126352,0.47590017490698333,0.39233514557697985,0.30876839144774926,0.2412210140512079,0.16006916693874615,0.07891838195337011,0.042160987292419815,0.037274826817060326,0.03240577596398012,0.009326340748171647,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7812602187029114,0.7855567524012107,0.8244953442802465,0.9434727787185462,1.1143608045317412,1.072130227543275,0.9083807450445847,0.8102111064052909,0.7853044042632328,0.7278166284905576,0.6432234171472482,0.5595059015044148,0.4758945278865512,0.39233103639543443,0.30876579316920894,0.253332998658554,0.21266647819418838,0.14588110372745777,0.07248592966499919,0.03727615460845565,0.03240947198705759,0.009333477948588602,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7793852430332067,0.7884026135586688,0.817237363531028,0.9357008851758671,1.1473083329465554,1.0832922672785932,0.8962373102580147,0.8056617182695653,0.7863527843921477,0.7274147037522597,0.6432668635453446,0.5594909719052918,0.47589809987429793,0.3923322983653085,0.3087672688526151,0.25333385720184204,0.21266690711274583,0.17199897994009078,0.13133471418740197,0.06632797857395868,0.03240662584789253,0.009326022709676519,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7813240844564742,0.7859207697676238,0.8246949277188194,0.9424065799292062,1.118731943964808,1.0724909048989892,0.9067214714651495,0.8102774008877074,0.7854858034786967,0.7277713094176812,0.6432333125043728,0.5595040595624052,0.4758954180888767,0.3923316280301239,0.3087664989677062,0.25333341626706307,0.21266686825603087,0.1719993396606949,0.13133643349241497,0.09066095012647014,0.05001062870435484,0.009333334802082632,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +0.7813870758453461,0.7859245983858376,0.8247050211205322,0.9424039888397837,1.1187321934331163,1.0724908574253553,0.9067215071793732,0.8102773974734242,0.7854858052492031,0.7277713091372533,0.6432333128720554,0.5595040597032283,0.4758954184076791,0.3923316291160457,0.3087664964397302,0.2533334255652739,0.21266683687831126,0.17199937597506093,0.13133620109235425,0.09066127337611159,0.05001016137560753,0.009333124573756364,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7794884422526686,0.7884143047039096,0.8172444774878415,0.9356983710384047,1.1473083708296197,1.0832921779609146,0.8962373426036601,0.8056617117291598,0.7863527854435163,0.7274147029847418,0.6432668635871595,0.5594909713739777,0.47589809937447003,0.3923322976618888,0.3087672662422272,0.2533338652157984,0.21266689729442545,0.17199907467166098,0.1313346629513451,0.06632851333167038,0.03240658773925256,0.009326305109135772,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7812852842942352,0.7855580937912097,0.8245061816026098,0.9434711748900355,1.1143612031518075,1.072130185921349,0.9083807727535861,0.8102111041466393,0.7853044061016778,0.7278166281489273,0.6432234179706826,0.5595059017385354,0.47589453034701895,0.3923310388664993,0.30876579757393513,0.2533330119137899,0.2126664403705008,0.14588112500363323,0.07248553760601081,0.037276153720445356,0.03240822546752621,0.009332511341036798,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788221503386785,0.7895045399096742,0.817047329202329,0.9370310368228373,1.1478465585432167,1.0822649312614008,0.8956769754388592,0.8070430042630998,0.7863041871466705,0.7274351838450098,0.6432698916589614,0.5594925910497873,0.47590017340473695,0.39233513082751814,0.3087683767495585,0.24122098904199646,0.1600691190847492,0.0789186283167023,0.04216075472661364,0.03727701401249463,0.03240192553174191,0.00933138126672698,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810911393780215,0.7854293700714281,0.8242819801957165,0.9431669196491352,1.114266359391289,1.0721995511715114,0.90823009408847,0.8100885341635531,0.7851965280700863,0.7231483696650428,0.6312225348487437,0.5401942004106371,0.44925923913958604,0.35838062399782844,0.26749928946299045,0.1766230602673485,0.08574754905455514,0.04703914269497268,0.042160116353124125,0.03728009380080456,0.03240217607882402,0.009330974390830304,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788260483866445,0.789574314310526,0.8170698620866703,0.9370920767579904,1.147889922488486,1.0822631245704415,0.8956838657557693,0.8071059784445214,0.7863232679302541,0.714733576484353,0.6106624769896858,0.5070077036903092,0.4035315011920199,0.3000893981736428,0.19660729850097716,0.09317196139774933,0.05192314345131101,0.047043095292799236,0.042159725889785525,0.03728001526887097,0.03240229665656421,0.009330984152682102,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810722493136502,0.785419547807061,0.8242664434861693,0.9431595979789656,1.114257178173395,1.0721983246425895,0.9082196306024682,0.810081697674279,0.78518684662278,0.7043222957112438,0.5829267272074534,0.46247487903633433,0.34200872227196,0.2216572244017629,0.10139487186948634,0.0567540386691817,0.051902842355393275,0.047041039706835736,0.04216001232448244,0.03728000321591981,0.03240229312242227,0.009330973970110274,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788283399266127,0.7895799544347943,0.8170714248388737,0.9370943769580904,1.1478919828622818,1.0822645334387047,0.8956850968981096,0.8071095843390333,0.7863262657313977,0.688706824090174,0.5438870437614823,0.3995036005410455,0.25537280835949316,0.11125909186988325,0.06161818253272323,0.05690160340666382,0.0519293372467987,0.04704742666658272,0.04216008457196604,0.03728001405476364,0.03240230767748175,0.009330984481731617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.781070392721205,0.7854186364917723,0.8242654576774623,0.9431594664640794,1.1142566249490362,1.0721979503590644,0.9082194583409905,0.8100810829967902,0.7851821546899312,0.6659111706099775,0.4842965166450265,0.3039500102024844,0.12312366801073213,0.04914006998489618,0.009398595976762373,0.049384893548239335,0.051921426230407894,0.04705947094051775,0.0421591234105971,0.0372800056670554,0.03240230078296971,0.009330973969069515,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788286675018283,0.7895804268525524,0.8170715425415402,0.9370945002544699,1.1478922373536673,1.0822645528239674,0.8956854913873853,0.8071081817468198,0.7863325410813746,0.6259877984232642,0.3830420968391501,0.1406252846546449,0.027373873949047882,0.0,0.0,0.0,0.02891111831445859,0.047097148767159445,0.04215497340505774,0.037280011764353985,0.03240231354288314,0.009330984481308879,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810702293105918,0.7854185584476432,0.8242653871866045,0.943159432925509,1.1142566301756198,1.072197824733119,0.9082207444860054,0.8100762351217026,0.7851907953532378,0.5438672808572882,0.17154299271240475,0.0762572686819532,0.0,0.0,0.0,0.0,0.0,0.04697567640128119,0.042165233082942136,0.03728012303813208,0.032402306053253754,0.009330973971944554,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788286675018284,0.7895804268525523,0.8170715425415406,0.9370945002544702,1.1478922373536677,1.0822645528239674,0.8956854913873853,0.8071081817468199,0.7863325410813746,0.6259877984232642,0.3830420968391501,0.1406252846546449,0.02737387394904779,0.0,0.0,0.0,0.028911118314458494,0.047097148767159445,0.04215497340505774,0.037280011764353985,0.03240231354288314,0.009330984481308879,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810703927212053,0.7854186364917726,0.8242654576774623,0.9431594664640794,1.114256624949036,1.0721979503590644,0.9082194583409902,0.8100810829967896,0.7851821546899314,0.6659111706099776,0.4842965166450265,0.30395001020248413,0.12312366801073177,0.04914006998489597,0.009398595976762156,0.049384893548239134,0.05192142623040791,0.04705947094051772,0.0421591234105971,0.0372800056670554,0.03240230078296971,0.009330973969069515,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788283399266129,0.7895799544347943,0.817071424838874,0.9370943769580905,1.1478919828622818,1.0822645334387047,0.8956850968981094,0.807109584339033,0.7863262657313976,0.6887068240901739,0.5438870437614822,0.3995036005410453,0.25537280835949294,0.1112590918698828,0.06161818253272324,0.0569016034066638,0.0519293372467987,0.04704742666658272,0.04216008457196604,0.03728001405476364,0.03240230767748175,0.009330984481731617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810722493136502,0.7854195478070609,0.8242664434861694,0.9431595979789656,1.114257178173395,1.072198324642589,0.9082196306024681,0.8100816976742788,0.78518684662278,0.7043222957112435,0.5829267272074539,0.4624748790363341,0.34200872227196,0.22165722440176286,0.10139487186948634,0.05675403866918174,0.05190284235539326,0.04704103970683573,0.04216001232448244,0.03728000321591981,0.03240229312242227,0.009330973970110274,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788260483866448,0.7895743143105256,0.8170698620866704,0.9370920767579904,1.1478899224884862,1.0822631245704413,0.8956838657557694,0.8071059784445214,0.7863232679302543,0.7147335764843532,0.6106624769896857,0.5070077036903087,0.40353150119201986,0.30008939817364255,0.19660729850097713,0.09317196139774933,0.051923143451310994,0.047043095292799236,0.04215972588978552,0.03728001526887097,0.0324022966565642,0.009330984152682102,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810911393780213,0.7854293700714283,0.8242819801957164,0.9431669196491352,1.1142663593912887,1.072199551171511,0.9082300940884701,0.8100885341635533,0.7851965280700861,0.7231483696650427,0.6312225348487437,0.5401942004106373,0.44925923913958576,0.35838062399782855,0.2674992894629904,0.1766230602673485,0.08574754905455519,0.04703914269497267,0.042160116353124125,0.03728009380080456,0.03240217607882402,0.009330974390830304,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788221503386786,0.7895045399096742,0.8170473292023296,0.9370310368228373,1.147846558543217,1.0822649312614008,0.8956769754388592,0.8070430042630999,0.7863041871466703,0.7274351838450098,0.6432698916589616,0.5594925910497875,0.4759001734047371,0.39233513082751814,0.3087683767495586,0.2412209890419965,0.16006911908474913,0.07891862831670224,0.04216075472661368,0.03727701401249463,0.03240192553174191,0.00933138126672698,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.781285284294235,0.7855580937912097,0.8245061816026098,0.9434711748900357,1.1143612031518075,1.0721301859213486,0.9083807727535858,0.8102111041466393,0.7853044061016778,0.7278166281489273,0.6432234179706825,0.5595059017385355,0.4758945303470189,0.392331038866499,0.308765797573935,0.2533330119137899,0.2126664403705008,0.14588112500363296,0.07248553760601066,0.037276153720445356,0.03240822546752621,0.009332511341036798,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7794884422526687,0.78841430470391,0.8172444774878416,0.935698371038405,1.1473083708296197,1.0832921779609146,0.8962373426036598,0.8056617117291598,0.7863527854435164,0.7274147029847416,0.6432668635871596,0.5594909713739776,0.4758980993744702,0.3923322976618887,0.3087672662422272,0.25333386521579837,0.21266689729442545,0.17199907467166095,0.13133466295134516,0.06632851333167032,0.03240658773925255,0.009326305109135772,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7813870758453462,0.7859245983858376,0.8247050211205323,0.9424039888397839,1.1187321934331163,1.0724908574253555,0.906721507179373,0.8102773974734244,0.7854858052492029,0.7277713091372531,0.6432333128720552,0.5595040597032283,0.47589541840767924,0.3923316291160457,0.3087664964397304,0.2533334255652737,0.21266683687831126,0.17199937597506093,0.13133620109235425,0.0906612733761116,0.050010161375607515,0.009333124573756365,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv index da02b58b8c..e0dbc3e2c8 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv @@ -1 +1 @@ -0.1998408467913111,0.1998324697151817,0.1998231648597691,0.19981275844152835,0.19980107414262002,0.1997877751913415,0.19977275449988957,0.19975498933013713,0.19973557469236924,0.19970938195814386,0.19968795702313766,0.19963382099129556,0.19966113276397168,0.19940320006589363,0.20058261179001396,0.20567129170507392,0.23084616807403724,0.21314089083446353,0.19980086476695702,0.1969896733580424,0.15003365248550748,0.10316810759201064,0.10159490762842505,0.10105982875286194,0.100796182700852,0.10063645297075544,0.10053052536676269,0.1004546903751942,0.10039787187047278,0.10035366248801625,0.10031829975059275,0.10028936458726913,0.10026525215069465,0.10024484891966917,0.10022736034532234,0.10021220344544374,0.10019894108973566,0.10018723894965523,0.10017683700655888,0.10016752997210418,0.10015915361687805,0.1998408465728825,0.19983246934049398,0.19982316388179877,0.1998127557031092,0.1998010662701007,0.1997877550874972,0.19977269446273543,0.19975485399080795,0.19973510710629186,0.19970859846974012,0.19968346915873902,0.19963316218168092,0.19960024771749074,0.19952282980138436,0.19976763248035692,0.20653489681095635,0.2332180444793978,0.21614480861599517,0.20029532414697757,0.1968357196142843,0.1500373905214749,0.10316031048907133,0.10159286151316331,0.10105893392417278,0.10079588515627838,0.10063634576585388,0.10053049337282528,0.10045467951072315,0.10039786883895868,0.10035366151635715,0.10031829947018409,0.10028936450187055,0.10026525212097404,0.10024484891066295,0.10022736034131416,0.10021220344417017,0.10019894108910915,0.10018723894944646,0.10017683700645855,0.10016752997206563,0.1001591536168489,0.19984084679218367,0.19983246971021765,0.1998231648470128,0.19981275850467645,0.19980107383585663,0.19978777633544836,0.1997727509114239,0.1997550006748563,0.19973554566244114,0.19970944747924504,0.1996877970863895,0.19963423966210825,0.19966080963371216,0.19940558947522832,0.2005630472238583,0.20571175303956082,0.23075810804116056,0.21314282771053988,0.19995483401622188,0.19696657891064234,0.1500362235477683,0.10316776641125805,0.10159498087050772,0.10105980288127522,0.10079619427535727,0.10063644695030857,0.10053052725406256,0.10045468953462133,0.10039787207019354,0.10035366241708153,0.10031829976193264,0.10028936458577997,0.10026525215000442,0.10024484892043173,0.10022736034500163,0.10021220344562841,0.10019894108967606,0.10018723894968382,0.10017683700655042,0.10016752997210807,0.100159153616876,0.19984084657287793,0.19983246934049748,0.19982316388180296,0.19981275570301615,0.19980106627042135,0.1997877550856898,0.1997726944669342,0.1997548539752738,0.19973510712344147,0.1997085984819747,0.1996834693882229,0.1996331619719352,0.19960024718910704,0.19952280578080261,0.19976762421372848,0.20653489631335417,0.23321804516854247,0.21614480859245772,0.20029532416201365,0.1968357196153337,0.1500373905214689,0.10316031048925732,0.10159286151308598,0.10105893392422188,0.10079588515626439,0.10063634576586064,0.10053049337282352,0.1004546795107239,0.10039786883895849,0.10035366151635723,0.10031829947018409,0.10028936450187056,0.10026525212097404,0.10024484891066297,0.10022736034131416,0.10021220344417017,0.10019894108910916,0.10018723894944645,0.10017683700645853,0.10016752997206561,0.10015915361684889,0.19984084679130326,0.19983246971519156,0.1998231648597779,0.19981275844147334,0.19980107414325393,0.19978777518911,0.19977275451008508,0.19975498929177504,0.19973557478258852,0.19970938161086763,0.19968795734465153,0.19963381761018736,0.19966112283480858,0.19940335372800397,0.20058262091172105,0.20567129231023543,0.23084616766950683,0.21314089096146413,0.1998008647560002,0.19698967335445292,0.15003365248522743,0.10316810759203707,0.10159490762826696,0.1010598287529152,0.10079618270082398,0.10063645297076326,0.10053052536675922,0.10045469037519505,0.10039787187047244,0.10035366248801636,0.10031829975059267,0.10028936458726913,0.10026525215069462,0.1002448489196692,0.1002273603453223,0.10021220344544374,0.10019894108973565,0.10018723894965523,0.10017683700655886,0.10016752997210415,0.10015915361687809 \ No newline at end of file +0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007972,0.19980105891149613,0.19978779655307177,0.19977263966410388,0.1997551511042619,0.1997347483722354,0.19971064286468432,0.19968178240345236,0.19964711469749208,0.1996060655703632,0.19939871757904104,0.2005831548487037,0.20567133130652127,0.23084607661069406,0.21314091585345063,0.19980085204537243,0.1969896741421163,0.15003365517623846,0.10316809661346993,0.10159494180734895,0.10106054811471313,0.10079558678972134,0.10063653773039563,0.10053046769380679,0.10045469749538567,0.10039786663688778,0.10035366309777496,0.10031829927649141,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.19982316299363811,0.19981276105007928,0.19980105891148847,0.19978779655300105,0.19977263966267328,0.19975515108850886,0.19973474807748037,0.1997106397923768,0.19968174102537267,0.19964693580763815,0.19960683872846366,0.19952126502540546,0.19976754248049444,0.20653491839188692,0.23321799547786398,0.21614484882739424,0.20029531812309473,0.19683572275170863,0.15003739105935293,0.10316030508106665,0.10159285747105436,0.10105891642246502,0.10079561219390014,0.10063653935522303,0.10053046764415924,0.10045469749067541,0.10039786663668882,0.10035366309776866,0.10031829927649116,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007906,0.19980105891149152,0.19978779655295914,0.19977263966316722,0.1997551510800169,0.19973474816135878,0.1997106381761594,0.1996817527064298,0.19964678895309912,0.19961658135573604,0.19943685987104331,0.20056366151423993,0.20571174956369653,0.23075802349206043,0.2131428500524704,0.19995482110805068,0.19696658035320813,0.1500362243664598,0.10316776457580659,0.10159499341497953,0.10105976955677229,0.10079559593251687,0.10063653920720686,0.10053046765686433,0.1004546974887086,0.10039786663671438,0.10035366309776612,0.10031829927649122,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.19982316299363811,0.19981276105007928,0.19980105891148844,0.19978779655300105,0.19977263966267328,0.19975515108850883,0.19973474807748037,0.1997106397923768,0.19968174102537262,0.19964693580763812,0.19960683872846366,0.19952126502540546,0.19976754248049433,0.20653491839188703,0.23321799547786407,0.21614484882739424,0.2002953181230947,0.19683572275170863,0.15003739105935293,0.10316030508106663,0.10159285747105437,0.10105891642246502,0.10079561219390014,0.10063653935522303,0.10053046764415922,0.10045469749067541,0.10039786663668883,0.10035366309776866,0.10031829927649116,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007972,0.19980105891149613,0.19978779655307177,0.19977263966410388,0.19975515110426179,0.1997347483722354,0.19971064286468432,0.19968178240345236,0.19964711469749202,0.1996060655703632,0.19939871757904093,0.20058315484870376,0.20567133130652127,0.230846076610694,0.21314091585345063,0.19980085204537246,0.19698967414211627,0.15003365517623835,0.10316809661346993,0.10159494180734895,0.10106054811471313,0.10079558678972134,0.10063653773039563,0.10053046769380679,0.10045469749538567,0.10039786663688774,0.10035366309777496,0.10031829927649141,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv index fe2ab56f8f..22e26c8d50 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv @@ -1 +1 @@ -0.19999999883591238,0.20000000091151393,0.19999999723513195,0.20000000226374653,0.19999999846472555,0.1999999839332059,0.2000000559170934,0.199999670765185,0.20000081750380802,0.19999544295875998,0.2000164248036942,0.19996480953464701,0.20035224712937127,0.2008954569604784,0.2097790969983887,0.23507254152361617,0.26312110045224124,0.24108736658864918,0.2147818715128831,0.19723377101304013,0.1754365492289263,0.15633954798106264,0.137516730447405,0.1187575028350269,0.09996429147489516,0.08129493527161735,0.062280693414717134,0.043994946188185315,0.024721383208175976,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999914794622,0.20000000169536064,0.19999999806149463,0.20000000430498052,0.19999999275539804,0.20000001069345105,0.19999992307146738,0.20000026091672043,0.19999835324127058,0.20000609443961798,0.19997733731861436,0.20009945717436395,0.19993740667178153,0.20154361643753477,0.20824975026827547,0.23128010314951922,0.26496381124092205,0.24556670301611344,0.2144001702822534,0.19618312965305823,0.1756230692455087,0.15631137908268827,0.13751945689054978,0.11876529541536489,0.09997738019195981,0.08135344428629598,0.06231989335497791,0.0441370703599492,0.024966285715104404,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999890641412,0.20000000085543362,0.19999999748977948,0.20000000063507978,0.2000000018821457,0.1999999667106317,0.20000010386509381,0.19999943330050052,0.20000140531133148,0.1999928236314012,0.20002283698544504,0.19993774742991366,0.2004263452166244,0.20068788516632163,0.21017796566961017,0.2355965601710615,0.2622784064187423,0.24079102779951142,0.2153908696206791,0.1972029182024861,0.17541130706754549,0.15634809395049806,0.1375149267759386,0.11875885465903552,0.09996138629730641,0.08129497195859502,0.06228289249713504,0.043987133313822174,0.024735277337841612,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999913361857,0.20000000171774868,0.19999999801902918,0.20000000444623525,0.19999999244644273,0.2000000113895711,0.19999991727498662,0.2000002616986819,0.19999835444532058,0.20000610658671805,0.19997733610156315,0.20009945758406444,0.19993740654081138,0.20154361647605945,0.2082497502585993,0.23128010315314085,0.2649638112386048,0.24556670302213426,0.21440017026195135,0.1961831297647717,0.17562306898522684,0.15631138030164127,0.13751945557079623,0.11876530261624205,0.09997738064565065,0.08135345669146041,0.062319896416130685,0.04413706955411763,0.024966285803160987,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999879599534,0.20000000092839254,0.1999999972432319,0.200000002277988,0.19999999817179034,0.19999998336821723,0.20000005839252266,0.19999967123024054,0.20000081861667662,0.19999543524867638,0.20001642411057446,0.1999648096173393,0.2003522470110944,0.20089545698553724,0.20977909698434966,0.23507254152774315,0.2631211004485848,0.24108736659036817,0.21478187147338235,0.19723377116258084,0.175436548573313,0.15633955015651896,0.13751672302227072,0.11875753094807562,0.09996423625449341,0.08129493637218384,0.062280699698513534,0.04399494534323379,0.024721383404580955,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file +0.19999999999994936,0.2000000000016463,0.20000000001043183,0.20000000005563617,0.20000000029773596,0.2000000016677417,0.20000000977128313,0.20000006480793814,0.20000043004879314,0.2000031147242275,0.20001756929690295,0.19999585895455968,0.2003562241212951,0.2008951198179171,0.20977931344989734,0.23507252663122458,0.26312112800498044,0.24108735896110223,0.21478187645023056,0.19723376887723493,0.1754365580268884,0.15633952476199525,0.13751682924095487,0.11875660266440567,0.0999677326804967,0.08129397212340472,0.06228059099557712,0.04399496180243034,0.024721378580291976,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1999999999997182,0.20000000000120985,0.20000000000654106,0.20000000004533966,0.20000000018879832,0.20000000134041235,0.2000000063387841,0.20000004997610482,0.20000029567767413,0.20000249975180695,0.20001781178608008,0.2001044182243076,0.19993248194010696,0.2015426576753344,0.20824975649593855,0.2312800675457061,0.2649638281607354,0.245566690314198,0.21440017272841516,0.19618312632136498,0.17562307214892336,0.15631136015798885,0.1375194708717102,0.11876493049259834,0.09997724632958042,0.08135262735246834,0.06231985902194499,0.04413708875938817,0.024966284001498838,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.199999999999754,0.20000000000108156,0.2000000000083766,0.20000000004000823,0.20000000023797615,0.20000000117445538,0.2000000075699462,0.20000004284727657,0.20000032117327138,0.20000220542747665,0.20001698771099571,0.20002977787868398,0.20043941615810784,0.2006866271666313,0.21017818173755165,0.23559655760268366,0.2622784406551169,0.24079101767798894,0.21539087439646715,0.19720291703341153,0.17541131255972947,0.15634809393203164,0.13751495287021692,0.11875887105887604,0.0999614049856154,0.08129496130658317,0.06228285924842417,0.043987132602267505,0.024735274367138585,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1999999999997182,0.20000000000120985,0.20000000000654103,0.20000000004533966,0.20000000018879832,0.2000000013404124,0.2000000063387841,0.20000004997610482,0.20000029567767413,0.20000249975180695,0.20001781178608008,0.20010441822430752,0.19993248194010702,0.2015426576753344,0.20824975649593855,0.2312800675457061,0.2649638281607354,0.24556669031419803,0.21440017272841524,0.19618312632136506,0.17562307214892334,0.15631136015798888,0.13751947087171024,0.11876493049259831,0.09997724632958041,0.08135262735246836,0.06231985902194501,0.04413708875938817,0.024966284001498848,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999999994938,0.2000000000016463,0.20000000001043172,0.20000000005563617,0.20000000029773596,0.2000000016677417,0.20000000977128318,0.20000006480793814,0.20000043004879314,0.2000031147242275,0.20001756929690295,0.19999585895455965,0.20035622412129533,0.20089511981791702,0.20977931344989736,0.23507252663122458,0.26312112800498044,0.24108735896110223,0.2147818764502305,0.19723376887723482,0.17543655802688846,0.1563395247619952,0.13751682924095487,0.11875660266440563,0.09996773268049672,0.08129397212340472,0.06228059099557712,0.04399496180243034,0.024721378580291976,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv index 6206de13df..c5fecfde69 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv @@ -1 +1 @@ -0.5001253580627619,0.5004588644359296,0.5014628154270402,0.5031769900613167,0.5081777229633764,0.5185139265843093,0.5384568368099758,0.5716050390271636,0.5954267942233374,0.5916671262940458,0.5641439854670347,0.5328645903077108,0.5153874287249509,0.5068055249978682,0.5027337164406331,0.5011865730125185,0.5004665230766019,0.5002031768877856,0.5000794835440591,0.5000347150116441,0.5000135585171785,0.500005926817328,0.5000023147818364,0.5000010115880982,0.5000003953151151,0.500000172655824,0.5000000675104057,0.5000000294706884,0.5000000115277228,0.5000000050307245,0.5000000019681825,0.500000000858793,0.5000000003360139,0.5000000001466062,0.5000000000573634,0.5000000000250273,0.5000000000097916,0.5000000000042736,0.5000000000016657,0.5000000000007727,0.5000000000004073,0.5000703311325395,0.5005435858986417,0.5012896202534851,0.5034156805325634,0.5077740536434387,0.5186691034490638,0.5394142244127894,0.5697254644881049,0.596732930371168,0.5918203647017496,0.5623139748475544,0.5333170312422617,0.5156239884336911,0.5064829884847232,0.5028479745038053,0.5011279964947604,0.5004893018692417,0.5001937122715027,0.5000836010803064,0.500033128158342,0.5000142766250772,0.5000056570116928,0.5000024379546623,0.5000009654488066,0.5000004163089407,0.5000001647488026,0.5000000710843073,0.5000000281159211,0.5000000121365185,0.5000000047988744,0.5000000020719855,0.5000000008191603,0.5000000003537243,0.5000000001398358,0.5000000000603861,0.5000000000238713,0.5000000000103082,0.5000000000040761,0.5000000000017633,0.5000000000007323,0.5000000000004244,0.5001163880163217,0.5004593055301569,0.5014569924534006,0.5031919588678111,0.5081381095687421,0.5184350524021208,0.5387145881446855,0.571740330842609,0.5950451649788181,0.5915708968546134,0.5641125170179205,0.5329343569196009,0.5153360949925312,0.5068188289415017,0.5027328562567974,0.5011875547006811,0.5004668788296208,0.5002033753321723,0.5000795471627199,0.5000347612615541,0.5000135673334298,0.5000059362097424,0.500002316043215,0.5000010133141882,0.5000003955150398,0.5000001729564069,0.500000067544599,0.5000000295218064,0.5000000115337249,0.5000000050393617,0.5000000019692338,0.5000000008602548,0.5000000003361962,0.5000000001468543,0.5000000000573944,0.5000000000250697,0.500000000009797,0.5000000000042806,0.5000000000016653,0.5000000000007758,0.500000000000413,0.5000703311325396,0.5005435858986418,0.5012896202534853,0.5034156805325634,0.5077740536434387,0.5186691034490638,0.5394142244127894,0.5697254644881051,0.5967329303711679,0.5918203647017497,0.5623139748475547,0.5333170312422618,0.5156239884336908,0.5064829884847231,0.502847974503805,0.5011279964947606,0.5004893018692415,0.5001937122715026,0.5000836010803063,0.5000331281583419,0.5000142766250775,0.5000056570116924,0.5000024379546625,0.5000009654488068,0.5000004163089407,0.5000001647488026,0.5000000710843073,0.5000000281159211,0.5000000121365185,0.5000000047988744,0.5000000020719855,0.5000000008191604,0.5000000003537245,0.500000000139836,0.500000000060386,0.5000000000238716,0.5000000000103082,0.5000000000040767,0.5000000000017635,0.5000000000007321,0.5000000000004248,0.5001253580627617,0.5004588644359298,0.5014628154270404,0.5031769900613166,0.5081777229633765,0.5185139265843092,0.5384568368099761,0.5716050390271632,0.5954267942233376,0.5916671262940453,0.5641439854670343,0.5328645903077109,0.515387428724951,0.5068055249978679,0.5027337164406332,0.5011865730125185,0.500466523076602,0.5002031768877855,0.5000794835440591,0.500034715011644,0.5000135585171789,0.500005926817328,0.5000023147818364,0.5000010115880981,0.5000003953151151,0.5000001726558239,0.5000000675104064,0.5000000294706888,0.5000000115277227,0.5000000050307247,0.5000000019681825,0.5000000008587933,0.5000000003360141,0.5000000001466062,0.5000000000573634,0.5000000000250273,0.5000000000097917,0.5000000000042739,0.5000000000016656,0.5000000000007728,0.5000000000004073 \ No newline at end of file +0.5003296400640093,0.5004600988895513,0.5014583631369367,0.5031758405731334,0.508178039057749,0.5185137939245158,0.5384569006258446,0.571605027993877,0.595426801094106,0.5916671256391682,0.5641439827991965,0.5328645978739902,0.515387371276078,0.5068056298468632,0.5027333343201744,0.5011871100141987,0.5004637342955055,0.5002185862958161,0.5001069895811231,0.5000485760518212,0.5000205546892389,0.5000086363828579,0.5000035487048398,0.5000014787399967,0.5000006061880128,0.5000002524760485,0.5000001034873669,0.5000000431014266,0.5000000176667514,0.5000000073580122,0.5000000030159583,0.5000000012561141,0.5000000005148657,0.5000000002144358,0.5000000000878944,0.5000000000366067,0.5000000000150052,0.500000000006253,0.5000000000025824,0.5000000000011666,0.5000000000007399,0.5002969681374327,0.5005436520923847,0.5012855334911634,0.503416172550591,0.5077742180006688,0.5186689594871572,0.5394142576906745,0.5697254427561504,0.5967329340401094,0.5918203635617771,0.562313971887476,0.5333170512859344,0.5156239600578514,0.5064831282758758,0.5028477886870312,0.501128828255428,0.5004882343850126,0.5002000454616692,0.5001007637931664,0.500046433898508,0.5000192307924547,0.5000082131553532,0.5000033127935222,0.5000014053870574,0.5000005658065314,0.5000002399439696,0.5000000965929114,0.5000000409619572,0.500000016489765,0.5000000069927742,0.5000000028150304,0.5000000011937626,0.5000000004805644,0.5000000002037914,0.5000000000820387,0.5000000000347896,0.5000000000140054,0.5000000000059421,0.5000000000024083,0.5000000000010993,0.5000000000006802,0.5003068118833218,0.5004611453138227,0.501452789614979,0.5031909170649663,0.5081384180305206,0.5184349135180344,0.5387146554905453,0.5717403182572404,0.595045171966744,0.5915708962504462,0.564112514375155,0.5329343647416046,0.5153360373503606,0.5068188996292636,0.5027325579315481,0.5011877315362498,0.5004652525673136,0.5002100128726578,0.500102674437557,0.5000451047412396,0.5000195023518208,0.5000079461517015,0.5000033601292823,0.5000013592910538,0.5000005738954387,0.5000002320703454,0.5000000979738535,0.5000000396177863,0.500000016725512,0.500000006763305,0.5000000028552756,0.5000000011545888,0.5000000004874346,0.5000000001971039,0.5000000000832117,0.5000000000336479,0.5000000000142055,0.5000000000057467,0.5000000000024432,0.5000000000010615,0.5000000000007043,0.500296968137433,0.5005436520923847,0.5012855334911633,0.503416172550591,0.5077742180006689,0.5186689594871574,0.5394142576906744,0.5697254427561504,0.5967329340401089,0.5918203635617768,0.5623139718874759,0.5333170512859344,0.5156239600578509,0.5064831282758757,0.5028477886870311,0.501128828255428,0.500488234385013,0.5002000454616693,0.5001007637931664,0.500046433898508,0.5000192307924545,0.5000082131553532,0.5000033127935222,0.5000014053870574,0.5000005658065314,0.5000002399439696,0.5000000965929114,0.5000000409619572,0.500000016489765,0.5000000069927744,0.5000000028150304,0.5000000011937628,0.5000000004805646,0.5000000002037914,0.5000000000820387,0.5000000000347898,0.5000000000140054,0.5000000000059421,0.5000000000024083,0.5000000000010996,0.5000000000006803,0.5003296400640095,0.5004600988895515,0.5014583631369369,0.5031758405731334,0.5081780390577493,0.5185137939245158,0.5384569006258445,0.5716050279938771,0.595426801094106,0.5916671256391679,0.5641439827991965,0.5328645978739899,0.5153873712760781,0.5068056298468631,0.5027333343201745,0.5011871100141988,0.5004637342955054,0.5002185862958163,0.5001069895811231,0.5000485760518212,0.5000205546892388,0.5000086363828579,0.5000035487048398,0.5000014787399969,0.5000006061880129,0.5000002524760484,0.5000001034873669,0.5000000431014266,0.5000000176667516,0.5000000073580122,0.5000000030159583,0.5000000012561141,0.5000000005148657,0.5000000002144357,0.5000000000878944,0.5000000000366068,0.5000000000150052,0.500000000006253,0.5000000000025824,0.5000000000011666,0.5000000000007397 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv index 7b4e8b44e0..a61d5b65ee 100644 --- a/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv +++ b/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv @@ -1 +1 @@ -0.282052804213591,0.28205279408230927,0.28205281983139996,0.28205277207337087,0.2820529477246932,0.2820526268312856,0.28205376526480586,0.2820514342259774,0.28205966513839065,0.2820424269630621,0.28208976184399775,0.28198076318447085,0.28210192648726595,0.28196694850096815,0.22817626150352932,0.13940710046167593,0.09215404926845705,0.13421314656840816,0.23185195710962989,0.2835448430950428,0.28175443335413874,0.28213739962609047,0.28200844184614926,0.2820609838583591,0.282047057523106,0.28205376048083153,0.2820521035383886,0.2820529122081491,0.28205271397377063,0.28205281214251393,0.28205278802303674,0.28205279983040726,0.28205279693142615,0.28205279833615887,0.28205279799621297,0.2820527981610243,0.2820527981216353,0.2820527981406419,0.28205279813619755,0.2820527981383268,0.28205279813802175,0.2820528013303014,0.2820527886670549,0.28205280950673367,0.28205273888870297,0.2820528778633038,0.2820523909705827,0.2820533509372524,0.2820500951271524,0.28205611000156927,0.2820375208041449,0.28206713224398994,0.2820093984823679,0.282052672836827,0.2823228814667518,0.22600080546500922,0.138982252697124,0.09320990583441359,0.13452956262931004,0.23112484879132256,0.2813690503352295,0.28197437442728396,0.2821598148247104,0.2820333156107526,0.28206848391548023,0.28205019014868793,0.28205478021948743,0.28205247358749036,0.28205303517065006,0.2820527574176506,0.2820528257528251,0.2820527933707434,0.2820528015637229,0.2820527975685555,0.2820527985427222,0.28205279807158223,0.28205279818517803,0.2820527981303774,0.2820527981433312,0.2820527981371688,0.28205279813859124,0.28205279813802175,0.28205280444631264,0.28205279339589356,0.2820528210384545,0.28205276744159485,0.2820529578991838,0.28205258388133636,0.2820538830758194,0.2820513611682299,0.2820597098975813,0.2820425329081132,0.2820902021079741,0.281980791132181,0.28210097082522534,0.2819722510641933,0.22816854012169982,0.1394046213675645,0.0921610273601982,0.13422526510986454,0.23184921890361193,0.2835437028225001,0.28175498573549024,0.2821380601864989,0.28200644963033167,0.28206147420915,0.28204703363654127,0.2820537703063973,0.28205210170166506,0.282052909314992,0.28205273078689364,0.28205280808101296,0.28205278860623784,0.28205279962207247,0.28205279703149805,0.28205279830826785,0.28205279800227473,0.2820527981587555,0.282052798123599,0.2820527981401315,0.2820527981363923,0.2820527981382748,0.28205279813802175,0.2820528013358803,0.2820527886442519,0.28205280951735506,0.2820527387787241,0.28205287787467404,0.28205239045192865,0.28205335030193296,0.2820500931748382,0.28205610940916265,0.28203751817392536,0.2820671320647423,0.2820093985902121,0.2820526728247506,0.2823228814723531,0.22600080546781157,0.13898225270640896,0.09320990589446848,0.13452956304841945,0.23112484560362961,0.2813690643953627,0.28197428440931754,0.28215964825711903,0.28203340365536167,0.2820684459907695,0.28205020029462025,0.282054778134782,0.2820524740205466,0.28205303500592815,0.2820527574638989,0.28205282573379054,0.28205279337727385,0.2820528015621871,0.2820527975688845,0.2820527985426075,0.2820527980716081,0.28205279818516693,0.28205279813037987,0.28205279814333056,0.2820527981371691,0.2820527981385899,0.28205279813802175,0.2820528042889859,0.28205279391767246,0.2820528200412227,0.28205277136639195,0.2820529490928111,0.2820526234129499,0.28205377417393024,0.28205138824802156,0.28205969389928875,0.28204242382310574,0.28208976089065274,0.28198076330427474,0.2821019264564092,0.281966948508431,0.22817626148886236,0.13940710051167088,0.0921540491019095,0.1342131472319295,0.2318519542556681,0.2835448455865294,0.2817544031847721,0.2821374059546999,0.2820084745948108,0.2820609771077809,0.2820470643098256,0.282053759853276,0.2820521040806333,0.2820529121141132,0.28205271402618465,0.2820528121327185,0.2820527880289434,0.2820527998294228,0.28205279693194263,0.2820527983360553,0.2820527979962581,0.2820527981610148,0.2820527981216394,0.28205279814064105,0.2820527981361989,0.28205279813832684,0.28205279813802175 \ No newline at end of file +0.28205280263739996,0.28205279510879244,0.28205281507426544,0.2820527790357037,0.2820529197677154,0.2820526681402791,0.2820536185682505,0.2820519979005437,0.28205781877618186,0.2820432556262398,0.28209074769150655,0.28198046092475415,0.2821020763535882,0.2819669376580698,0.22817626448788236,0.13940710051061797,0.09215404747741665,0.13421315442448406,0.23185192169859237,0.2835449596266364,0.28175376428375504,0.2821363322252552,0.28201440976464043,0.2820583985298538,0.2820479539081593,0.2820535030627905,0.28205223179782657,0.2820528884631722,0.28205274003172476,0.28205280947943817,0.2820527934273511,0.28205279926459076,0.2820527977387693,0.28205279822908047,0.2820527981098476,0.2820527981453255,0.28205279813583717,0.2820527981386022,0.2820527981378694,0.28205279813806394,0.28205279813802175,0.28205280050496406,0.2820527917492839,0.282052808146337,0.28205275051953227,0.28205286929836293,0.282052439192529,0.2820532997986333,0.2820503812044184,0.2820560452694113,0.2820370448598662,0.2820675968934553,0.2820086943126736,0.2820527878418225,0.282322839785227,0.2260008074480811,0.13898225292296718,0.0932099072960964,0.13452956613790434,0.23112483725451455,0.2813691580290234,0.28197411334661476,0.2821587404045493,0.28203311261406017,0.2820670123205583,0.2820501080880258,0.2820543417985561,0.2820524898154001,0.28205296622014503,0.2820527701525041,0.28205280854571063,0.2820527968562512,0.28205279914613945,0.2820527980080369,0.282052798201774,0.2820527981311188,0.28205279814280837,0.2820527981375241,0.2820527981383609,0.2820527981379856,0.28205279813804707,0.28205279813802175,0.28205280212204026,0.2820527964460206,0.2820528081337679,0.28205277446061067,0.2820529367936832,0.282052598328066,0.2820538234654629,0.2820514103086915,0.2820596925216362,0.2820429523398599,0.2820919095139913,0.28197986995120855,0.28210121354301326,0.281972221841733,0.22816854443249177,0.1394046210820346,0.09216102606103949,0.13422526873240004,0.2318491998939498,0.2835437062197263,0.28175480373725503,0.2821379736699134,0.28200648251808436,0.28206092643746955,0.2820494799570828,0.28205325533580594,0.2820524315280265,0.28205284317102697,0.28205275777943506,0.28205280489492657,0.2820527944061679,0.2820527988788418,0.282052797887419,0.28205279818109186,0.282052798118289,0.28205279814161677,0.28205279813665196,0.2820527981382558,0.2820527981379268,0.2820527981380408,0.28205279813802175,0.2820528005049642,0.2820527917492837,0.28205280814633704,0.28205275051953216,0.2820528692983628,0.2820524391925288,0.28205329979863325,0.2820503812044185,0.28205604526941114,0.2820370448598662,0.2820675968934553,0.2820086943126739,0.2820527878418225,0.2823228397852272,0.22600080744808104,0.13898225292296712,0.09320990729609643,0.13452956613790434,0.23112483725451458,0.28136915802902324,0.2819741133466148,0.28215874040454925,0.28203311261406017,0.2820670123205583,0.2820501080880259,0.28205434179855626,0.2820524898153999,0.2820529662201449,0.2820527701525043,0.28205280854571063,0.28205279685625123,0.28205279914613945,0.2820527980080368,0.28205279820177415,0.28205279813111866,0.2820527981428086,0.2820527981375241,0.2820527981383607,0.28205279813798556,0.2820527981380466,0.28205279813802175,0.2820528026374,0.2820527951087925,0.2820528150742654,0.2820527790357037,0.2820529197677154,0.28205266814027924,0.2820536185682505,0.2820519979005437,0.28205781877618186,0.2820432556262399,0.28209074769150666,0.28198046092475426,0.2821020763535886,0.28196693765806996,0.22817626448788242,0.13940710051061797,0.09215404747741666,0.13421315442448403,0.23185192169859248,0.2835449596266367,0.2817537642837551,0.2821363322252553,0.28201440976464043,0.2820583985298537,0.2820479539081593,0.2820535030627904,0.2820522317978264,0.28205288846317245,0.2820527400317246,0.28205280947943817,0.28205279342735107,0.2820527992645908,0.28205279773876923,0.28205279822908064,0.2820527981098475,0.2820527981453257,0.2820527981358372,0.2820527981386021,0.28205279813786965,0.28205279813806405,0.28205279813802175 \ No newline at end of file diff --git a/proteus/tests/SWFlow/test_SWFlows.py b/proteus/tests/SWFlow/test_SWFlow.py similarity index 100% rename from proteus/tests/SWFlow/test_SWFlows.py rename to proteus/tests/SWFlow/test_SWFlow.py From 517dbe2625dbee8acc3e50b003cd767b8f9d249e Mon Sep 17 00:00:00 2001 From: ejtovar Date: Tue, 2 Mar 2021 09:20:36 -0600 Subject: [PATCH 08/11] removed swflow .csv files --- .../SWFlow/comparison_files/comparison_conical_island_h_t2.csv | 1 - .../comparison_files/comparison_dSWEs_steady_state_h_t2.csv | 1 - .../tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv | 1 - .../SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv | 1 - .../tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv | 1 - .../comparison_files/comparison_reef_island_runup_h_t2.csv | 1 - .../SWFlow/comparison_files/comparison_santos_step_h_t2.csv | 1 - .../tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv | 1 - .../SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv | 1 - .../comparison_files/comparison_transcritical_bump_h_t2.csv | 1 - 10 files changed, 10 deletions(-) delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv delete mode 100644 proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv diff --git a/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv deleted file mode 100644 index 11a883ba10..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.32000002473823985,0.3200000816728123,0.3200003129372687,0.3200011963528035,0.3200044369617626,0.32001694839714295,0.3200630474389563,0.32024062194538583,0.32084099633296165,0.3229957331069224,0.32969167523798826,0.3488147950033949,0.3722803583873506,0.3673291630349901,0.3438225157491934,0.3278307448651122,0.3225354940164562,0.32075868975523575,0.32022478703974416,0.3200638797932853,0.3200170375525123,0.3200046062717389,0.3200012108601937,0.32000032621088775,0.32000008567533056,0.3200000230771395,0.3200000060603154,0.32000000163247366,0.3200000004286879,0.3200000001154936,0.32000000003033546,0.3200000000081701,0.32000000000214557,0.3200000000005779,0.3200000000001518,0.3200000000000408,0.3200000000000107,0.3200000000000028,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002313038844,0.32000007658708385,0.32000029906504884,0.3200011366430686,0.3200042409098509,0.32001610158947835,0.32006024332802663,0.3202293011069366,0.3207791200270884,0.32304578446690513,0.32940764614759893,0.3472467152279752,0.37459785966247205,0.36848962419759346,0.34282477700514197,0.327368142355794,0.3225218962090752,0.3207159493418878,0.32021672548262786,0.3200612627389384,0.3200164285930099,0.32000441007087566,0.32000116700406733,0.32000031220353375,0.32000008254300416,0.32000002206620565,0.32000000583694765,0.3200000015596326,0.32000000041327264,0.32000000011070695,0.3200000000292349,0.32000000000781614,0.3200000000020679,0.3200000000005532,0.3200000000001463,0.32000000000003914,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000222034639,0.32000007646351114,0.3200002990796977,0.3200011254026051,0.320004239978277,0.3200159388285915,0.3200602490107751,0.3202270361859457,0.32081713477279783,0.3228663733537597,0.3297418835459458,0.3489389892419183,0.37176557162091184,0.3673700294463916,0.3438033124466722,0.3277945613006331,0.3224840138865775,0.3207330940957088,0.32021741844999535,0.3200606914272528,0.32001637046051123,0.3200043603677813,0.32000115962932474,0.32000030695988924,0.3200000808793405,0.32000002153220514,0.3200000056228799,0.32000000154833463,0.3200000004243015,0.3200000001094366,0.32000000002871476,0.32000000000771855,0.3200000000020585,0.32000000000054735,0.3200000000001459,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002286027474,0.3200000759091506,0.32000029848600087,0.3200011269389181,0.3200042322928029,0.3200159619778833,0.32006010633217924,0.32022732614357285,0.3207723608185913,0.32306044431899394,0.3293239960352088,0.3474043541767731,0.37466953906776634,0.3685156343182,0.3428116732978919,0.32740049116976033,0.3225244838315495,0.32071153189371526,0.3202158905908845,0.32006059631672445,0.320016254541853,0.32000426526289005,0.32000107721681237,0.32000024902551166,0.32000006339720827,0.32000001185300153,0.3200000060585563,0.32000000242038396,0.3200000004208586,0.3200000000813634,0.3200000000274852,0.3200000000075185,0.32000000000205053,0.32000000000054857,0.32000000000014545,0.3200000000000387,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000221864808,0.3200000764432918,0.3200002990415591,0.3200011250968746,0.3200042393069582,0.3200159340545446,0.3200602346520045,0.32022693353575293,0.32081507382923896,0.32286149809465625,0.3297265662671098,0.348908243466464,0.37174160218981345,0.36736705791197544,0.34379607299962844,0.32778872810184795,0.32248557009655976,0.3207345367210794,0.3202160520319669,0.32005944966397487,0.32001455026175935,0.3200026540978709,0.3199993083924324,0.3199993277091,0.31999966194421525,0.3200000398433254,0.32000005298559564,0.3200000024031411,0.31999999881683927,0.32000000000673273,0.32000000001345386,0.3200000000071066,0.32000000000211715,0.3200000000005524,0.32000000000014656,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002285923446,0.32000007590920404,0.32000029848470923,0.3200011269394708,0.3200042322639726,0.320015961862143,0.3200601055159207,0.3202273165670063,0.3207723558811919,0.3230622892170079,0.3293240079521353,0.347412400632641,0.37467306412214724,0.3685186387240452,0.34281501141343457,0.3274007507177813,0.32252646251616723,0.32069105206836956,0.3202093475590551,0.32004981097662155,0.31997353934465766,0.3199805850580952,0.31996395547656176,0.31998697521229735,0.32000157379086047,0.32000183867150883,0.3200000373059977,0.3199999221520152,0.31999999512757693,0.3199999992920858,0.319999999981051,0.32000000000923157,0.3200000000023603,0.32000000000061646,0.32000000000014855,0.320000000000039,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649004,0.32000007644329587,0.32000029904182253,0.32000112509680523,0.3200042393084158,0.32001593404987444,0.3200602346147984,0.3202269306191513,0.32081483081756135,0.32286124437419317,0.32972527957302666,0.3489070396608211,0.3717404358474878,0.3673744108185969,0.3437841702803447,0.32778138879797397,0.32249022583878695,0.32073671940017323,0.32034297034791903,0.3204446168492497,0.32040627471942085,0.32043890289681,0.3202788794620509,0.32007403902657405,0.3200892104536043,0.3199975053586533,0.3199962867623561,0.3199997840603637,0.31999997026050275,0.319999997284245,0.31999999993772554,0.32000000001979084,0.3200000000057789,0.32000000000077017,0.32000000000016193,0.32000000000003925,0.32000000000001033,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.320000298484715,0.3200011269395373,0.32000423226420494,0.32001596186780723,0.32006010558214704,0.3202273167629018,0.32077237960186467,0.32306237254097026,0.32932438657016616,0.3474120973162846,0.37467834717518633,0.36850344981196426,0.3429372674931349,0.32738703287759763,0.32235764536116907,0.32007792004413194,0.3213456178825493,0.2875707945948762,0.25205114005287127,0.24594064763807513,0.2677817951146013,0.3170471337822235,0.32128780441014293,0.3197056393981026,0.3199907044318404,0.31999944725343554,0.3199998656326877,0.31999998762220705,0.3200000001624344,0.320000000158984,0.3200000000138653,0.32000000000144446,0.32000000000018625,0.3200000000000404,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.3200002990418238,0.3200011250968191,0.3200042393088778,0.3200159340609723,0.3200602347709953,0.3202269328220744,0.32081484246451025,0.32286121993114636,0.329725314791121,0.3489086603148876,0.3717379587093653,0.36741088815131817,0.34377152871635147,0.3279181765302057,0.2880826483939386,0.15814413859741122,0.04088401315840327,0.0,0.0,0.0,0.0,0.0,0.0995965128444665,0.22521695837261244,0.3199686353108995,0.31999238756842735,0.3199991321283239,0.3199999876189495,0.32000000383703775,0.32000000047728494,0.32000000003717854,0.3200000000025293,0.32000000000023104,0.3200000000000417,0.3200000000000104,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.3200002984847153,0.32000112693955296,0.3200042322647635,0.32001596187918413,0.32006010574542576,0.3202273188641537,0.3207724140205595,0.32306215006627176,0.3293255042729516,0.34740952671515274,0.37468544737617626,0.36847988160930917,0.343000390425603,0.3263629765099731,0.16606591345953947,0.008909034134778355,0.0006962831641671968,0.00025881685178437625,0.0,0.0,0.0,4.591085678700988e-06,0.0029001005973743714,0.08852640657871137,0.2466845813369244,0.319830966702752,0.31999843134225,0.32000004678654675,0.3200000110615834,0.32000000087153185,0.32000000006302687,0.3200000000033338,0.32000000000027,0.32000000000004264,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.32000029904182414,0.32000112509683487,0.32000423930936284,0.32001593407282614,0.32006023494575164,0.3202269362207053,0.320814912347681,0.32286105006801136,0.32972644953142993,0.34890602591392433,0.3717483337089003,0.36738808436180626,0.34396540303313033,0.3271504188891713,0.22192931638755364,0.07220057685172841,0.009835882105440352,0.008878211688175694,0.0,0.0,0.0,0.0,0.012145839095790908,0.15126282734688165,0.2956440704588525,0.31998540939530107,0.31999944248956547,0.32000002521732945,0.3200000070503877,0.3200000007232296,0.32000000004875784,0.32000000000309464,0.3200000000002483,0.32000000000004236,0.3200000000000104,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.32000029848471545,0.32000112693955995,0.3200042322649965,0.32001596188371934,0.3200601058223298,0.320227320224279,0.32077245735546206,0.32306192058957617,0.3293272432918434,0.34740540206498716,0.3746985482259504,0.36844756305230736,0.3431371455269783,0.326571528033016,0.3234807123781126,0.30559019448574504,0.21369536475603246,0.14076950153880063,0.10518485161561059,0.09607961521474175,0.12272642743245457,0.18132458104322413,0.2667978713024763,0.31943853042443066,0.3201378734861291,0.31993897018966216,0.3199996545831054,0.32000002434797986,0.32000000417870533,0.32000000043007265,0.32000000003004414,0.32000000000209594,0.32000000000021156,0.32000000000004103,0.3200000000000103,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649026,0.3200000764432961,0.32000029904182414,0.3200011250968311,0.32000423930922617,0.32001593406905476,0.3200602348936862,0.320226935487817,0.3208149041914822,0.322861075216601,0.3297263741624388,0.34890559176019237,0.3717482709721335,0.3673769941962334,0.3438897755419277,0.32770706993298704,0.3230943824406787,0.3210547112976887,0.32142954622651,0.32165381413334315,0.32082331081131726,0.32039623595225253,0.320265838577859,0.32049271668053214,0.3202341051984063,0.3199679541176828,0.32000053247458154,0.3199994839478929,0.3200000287615109,0.32000001520977417,0.32000000216020147,0.3200000001887603,0.32000000001591195,0.3200000000012526,0.32000000000017975,0.32000000000003975,0.32000000000001033,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228592349,0.320000075909211,0.32000029848471534,0.32000112693954885,0.32000423226456115,0.3200159618747538,0.32006010568319077,0.32022731834910667,0.3207724020976399,0.32306218574107615,0.32932506189697386,0.34741045678886123,0.3746772689882738,0.36850680218590515,0.3428102585622774,0.3273003514671633,0.32246364792607135,0.3204577341357346,0.3201829202262174,0.32007216367737723,0.31997598427793184,0.3199841955633064,0.3199378980956634,0.3199647626555791,0.31998436483264037,0.3199865891604755,0.3199988453937034,0.32000001791052507,0.32000000978931387,0.3200000046533187,0.32000000054479794,0.320000000077832,0.32000000000631385,0.32000000000084894,0.32000000000015744,0.3200000000000393,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002218649004,0.3200000764432959,0.3200002990418227,0.320001125096815,0.3200042393087016,0.3200159340559007,0.3200602347052771,0.320226932268447,0.3208148600623659,0.3228612187528356,0.3297255210673004,0.3489068403232319,0.37174165784323854,0.36736834626607556,0.34380863647647986,0.32778828491475065,0.32254240623118846,0.32079539659006384,0.3202110556579491,0.3200593463650712,0.32001480040430974,0.32000276692097607,0.3199989300452113,0.3199982040386371,0.3199980993163498,0.31999929066986194,0.31999957010237157,0.3199999687317625,0.3200000008803321,0.3200000003460942,0.32000000017360564,0.32000000001910583,0.32000000000353285,0.3200000000006177,0.3200000000001503,0.3200000000000387,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.32000002285923446,0.3200000759092041,0.3200002984847094,0.32000112693947735,0.320004232264157,0.3200159618657629,0.3200601055614378,0.320227317231218,0.32077236003743986,0.32306223252984556,0.3293241884820548,0.34741200408148865,0.37467380631692426,0.3685171273672531,0.3428110317816284,0.3273912561553675,0.32251523002261995,0.3206845521117203,0.3202120761110777,0.32006021702694176,0.3200162115600658,0.32000425102088836,0.32000103795148976,0.3200001904686028,0.3200000049722329,0.3199999577866098,0.3199999889444525,0.31999999053951644,0.3199999997240108,0.320000000117889,0.320000000033594,0.320000000010794,0.3200000000022385,0.3200000000005703,0.3200000000001463,0.3200000000000387,0.32000000000001017,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000221864809,0.3200000764432918,0.32000029904155913,0.3200011250968785,0.3200042393070742,0.3200159340567599,0.32006023468528205,0.32022693408229397,0.3208150816800892,0.32286149605093517,0.3297266068790822,0.3489082534273183,0.3717417608211073,0.36736724587783465,0.34379735171743675,0.3277901957254107,0.3224879279513855,0.3207365833270655,0.320216579528124,0.32006058067741183,0.3200163395978877,0.3200043556433475,0.3200011561960314,0.3200003046674428,0.32000007848022005,0.32000001998282607,0.3200000043505848,0.3200000012248244,0.3200000001923816,0.3200000000980081,0.3200000000292454,0.3200000000078015,0.32000000000210566,0.32000000000054923,0.32000000000014583,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000228602749,0.32000007590915064,0.320000298486001,0.32000112693892024,0.32000423229286024,0.3200159619790169,0.3200601063449884,0.32022732632325024,0.3207723608845863,0.3230604337411087,0.3293240156944696,0.3474043126325424,0.3746695736828475,0.36851556265250873,0.3428113828445939,0.3274000158934861,0.3225238017999811,0.3207112763650112,0.3202158433967337,0.3200606466592917,0.3200163414984333,0.32000436376487373,0.3200011606205853,0.3200003088469556,0.3200000820342246,0.32000002177763687,0.3200000057763827,0.3200000015199413,0.32000000040604465,0.32000000010590546,0.3200000000289271,0.32000000000774165,0.32000000000205775,0.32000000000054796,0.3200000000001454,0.3200000000000387,0.32000000000001017,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.3200000222034639,0.32000007646351114,0.3200002990796977,0.32000112540260617,0.32000423997830957,0.3200159388291599,0.3200602490193946,0.32022703631672567,0.32081713619977403,0.3228663736450862,0.32974188696225504,0.34893899577332904,0.37176557575519253,0.36737004627969605,0.3438033469202726,0.3277946874126978,0.32248411208497796,0.32073314719984747,0.32021740330941295,0.3200606908476985,0.3200163735311673,0.32000436380904373,0.3200011629742424,0.32000030897631704,0.32000008228399296,0.32000002185704113,0.320000005819809,0.32000000154584807,0.32000000041142,0.3200000001093278,0.3200000000290866,0.32000000000773676,0.3200000000020609,0.3200000000005474,0.3200000000001459,0.3200000000000386,0.3200000000000103,0.3200000000000027,0.32000000000000056,0.32000000000000006,0.31999999999999995,0.3200000231303884,0.32000007658708385,0.3200002990650489,0.3200011366430694,0.32000424090986684,0.32001610158979343,0.3200602433312479,0.3202293011508691,0.3207791199015537,0.32304578282457475,0.32940764752303797,0.3472467130816866,0.37459785963763026,0.3684896307856584,0.34282475432108434,0.3273681490571727,0.32252186373463393,0.3207159673409579,0.3202167223642505,0.3200612614247427,0.3200164285812063,0.3200044101764324,0.32000116709690696,0.3200003122820855,0.3200000825792455,0.32000002209239775,0.32000000584186994,0.3200000015628518,0.32000000041326254,0.320000000110556,0.3200000000292346,0.3200000000078207,0.3200000000020681,0.3200000000005532,0.3200000000001463,0.32000000000003914,0.3200000000000102,0.3200000000000026,0.3200000000000006,0.32000000000000006,0.31999999999999995,0.32000002473823985,0.3200000816728123,0.3200003129372687,0.320001196352804,0.3200044369617784,0.3200169483974109,0.3200630474426954,0.3202406219994826,0.3208409967318285,0.32299573315944424,0.3296916764765536,0.3488147963648057,0.372280357043069,0.367329166862464,0.3438225022852558,0.3278307553619449,0.32253549342494914,0.32075868158166465,0.3202247845223423,0.32006387932503644,0.32001703747840304,0.3200046062728994,0.32000121086541145,0.32000032621449803,0.3200000856782257,0.3200000230782396,0.3200000060611251,0.3200000016326082,0.3200000004287768,0.320000000115494,0.3200000000303323,0.3200000000081702,0.3200000000021457,0.3200000000005779,0.3200000000001518,0.3200000000000408,0.3200000000000107,0.3200000000000028,0.3200000000000006,0.32000000000000006,0.31999999999999995 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv deleted file mode 100644 index f66b1259f6..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -1.0000005770824896,1.000001178315994,1.0000023348428146,1.0000048335408955,1.0000096140888717,1.0000198522680357,1.00003962806822,1.000081461129986,1.0001633993972072,1.0003338559234014,1.0006735202052963,1.0013658030807848,1.0027663358823549,1.0055606771420549,1.0111888173673382,1.022030391406693,1.0424941362753783,1.076473287588041,1.1266571954965297,1.177234760499127,1.1988226394756627,1.1762220908090182,1.126193659685141,1.0767321693874763,1.042725603859516,1.0221299662543917,1.0111899871447523,1.0055448424659934,1.0027519854390023,1.0013562508156206,1.0006702042280935,1.0003303492599784,1.0001629479830048,1.000080376312828,1.0000396054045226,1.0000195487790793,1.0000096258879745,1.0000047536418304,1.000002342405058,1.0000011548736478,1.0000005770824896,1.0000005770824896,1.0000011639238824,1.000002362619253,1.00000479827863,1.0000097211199948,1.0000197156279973,1.000039979797362,1.0000809935953772,1.0001642918848852,1.0003326572261044,1.0006742589519988,1.0013641162448415,1.0027595250304535,1.0055538972732916,1.0111566628878523,1.0219746355070365,1.0423413174370568,1.076812934877796,1.1265194277277946,1.1765432898009147,1.1990889271209284,1.1755186012108385,1.1260528511125028,1.0770930933006355,1.0425824524430425,1.0220748340103687,1.0111537829680741,1.0055326635807926,1.002750001646438,1.0013535629528798,1.0006710541118673,1.000329539619658,1.000163306408151,1.0000801538191506,1.0000397090867512,1.0000194927345838,1.0000096528980906,1.0000047400352998,1.0000023480061206,1.000001149818809,1.0000005770824896,1.0000005770824896,1.000001177235646,1.0000023339682178,1.000004831036052,1.0000096094946735,1.000019843255317,1.0000396076373668,1.000081425897587,1.0001633129158987,1.0003337194651458,1.00067310219751,1.0013655065329476,1.0027635492857854,1.005561991963718,1.0111704567393418,1.0220475296754952,1.0424357191416016,1.0765304518077023,1.1267189135412075,1.1772009995033403,1.1986696462540152,1.176176473364042,1.1262832899706798,1.0768111466264363,1.0426736133734504,1.022124990137874,1.0111663040868177,1.0055468632597553,1.002750112894503,1.0013572597869398,1.0006702215850014,1.0003305352692544,1.0001630054704744,1.000080404368749,1.0000396257605786,1.000019552844932,1.0000096316399305,1.0000047542081525,1.000002343681164,1.000001155082825,1.0000005770824896,1.0000005770824896,1.000001163923883,1.0000023626192522,1.0000047982786304,1.000009721119996,1.0000197156279966,1.0000399797973618,1.0000809935953772,1.0001642918848845,1.0003326572261038,1.0006742589519997,1.0013641162448406,1.0027595250304535,1.0055538972732911,1.0111566628878523,1.021974635507036,1.042341317437057,1.0768129348777955,1.126519427727795,1.1765432898009167,1.199088927120929,1.1755186012108392,1.1260528511125028,1.0770930933006355,1.0425824524430425,1.0220748340103687,1.0111537829680737,1.0055326635807933,1.002750001646438,1.0013535629528802,1.0006710541118684,1.0003295396196574,1.0001633064081492,1.0000801538191506,1.0000397090867512,1.000019492734583,1.0000096528980909,1.0000047400353007,1.0000023480061206,1.0000011498188095,1.0000005770824896,1.0000005770824896,1.0000011783159932,1.000002334842815,1.0000048335408962,1.0000096140888712,1.0000198522680344,1.0000396280682193,1.0000814611299857,1.000163399397207,1.0003338559234012,1.0006735202052974,1.0013658030807835,1.002766335882356,1.0055606771420549,1.011188817367339,1.0220303914066933,1.042494136275379,1.076473287588041,1.1266571954965303,1.1772347604991273,1.1988226394756623,1.1762220908090182,1.12619365968514,1.0767321693874765,1.0427256038595158,1.022129966254391,1.0111899871447525,1.0055448424659932,1.0027519854390015,1.0013562508156204,1.0006702042280948,1.0003303492599782,1.0001629479830045,1.0000803763128274,1.000039605404523,1.000019548779079,1.0000096258879745,1.0000047536418313,1.0000023424050575,1.0000011548736478,1.0000005770824896 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv deleted file mode 100644 index e928f443c3..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -1.875000006752869,1.875000085828717,1.8750015231603725,1.8750156068775117,1.875112488661173,1.8762820658409454,1.8646360252888745,1.9016016287751671,1.4900739502555964,0.10417274716901029,0.00039711434979890036,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000050770357,1.875000082272169,1.8750013643121335,1.875018896260375,1.875054326762743,1.875755662600235,1.8748928873892574,1.9216169487567196,1.670658951902623,0.3808597245846964,0.001157839113734775,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000065019852,1.8750000917360745,1.8750020980916349,1.875027675961293,1.8751241889290826,1.875721860275629,1.8684653493553998,1.8939283836242518,1.4674628842329127,0.1683933248180973,0.00038629793690459396,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000006766649,1.8750001139744974,1.8750022892567397,1.8750318928939849,1.8751386944332922,1.876062036099369,1.8751339203454434,1.9177415547655474,1.6559425013206983,0.39149738539229667,0.0012842291055574153,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000078644162,1.8750001146660096,1.8750026441499568,1.8750337565715798,1.875164296463624,1.875640687874918,1.8687940449787999,1.8942757402952983,1.4648507645292028,0.16726202952712074,0.00039319237389590696,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000074645814,1.8750001271154484,1.875002475060895,1.8750346875252761,1.875144328309,1.876008544205754,1.8751294818599353,1.9175690707962623,1.6561268625380043,0.39185315870135234,0.001292973905214457,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000082701785,1.8750001187960712,1.8750027461784702,1.8750345425903991,1.8751676728417108,1.8756387918328057,1.8688377003437386,1.894307604743743,1.4647981441590145,0.16734561206732448,0.0003961102743623312,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007578929,1.8750001293219412,1.875002498977974,1.8750350013202852,1.8751448419016041,1.876005717487765,1.8751307243499677,1.9175642114892033,1.6561739846941634,0.3918183062593839,0.0012936959668087048,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083329554,1.8750001193357075,1.8750027589308194,1.875034649212312,1.875168206273563,1.875638267993714,1.868840376692444,1.894305083851982,1.4648153743758967,0.16736689101741803,0.00039614096084402263,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000075931363,1.8750001295976462,1.8750025020076517,1.8750350425200164,1.8751448863871683,1.8760056724160918,1.8751314132463488,1.9175636847758664,1.6561732954345296,0.3918127131448962,0.0012936861651585488,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083397875,1.8750001193953185,1.8750027603806603,1.8750346604666657,1.8751682594772185,1.8756381393445245,1.8688405196144,1.8943048237729547,1.4648169463852985,0.16736852924272635,0.0003961380715375027,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000075931363,1.8750001295976462,1.8750025020076517,1.8750350425200164,1.8751448863871683,1.8760056724160914,1.8751314132463488,1.9175636847758666,1.656173295434529,0.3918127131448962,0.0012936861651585484,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000083329552,1.8750001193357075,1.8750027589308194,1.875034649212312,1.875168206273563,1.8756382679937138,1.868840376692444,1.8943050838519817,1.4648153743758967,0.16736689101741797,0.0003961409608440225,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007578929,1.8750001293219416,1.875002498977974,1.8750350013202852,1.8751448419016041,1.8760057174877653,1.8751307243499677,1.917564211489204,1.6561739846941637,0.391818306259384,0.0012936959668087048,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000082701785,1.875000118796071,1.87500274617847,1.8750345425903991,1.8751676728417102,1.8756387918328057,1.8688377003437384,1.894307604743743,1.4647981441590145,0.1673456120673244,0.0003961102743623314,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000074645814,1.8750001271154484,1.8750024750608947,1.8750346875252761,1.875144328309,1.876008544205754,1.8751294818599362,1.9175690707962625,1.6561268625380043,0.39185315870135234,0.0012929739052144572,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.875000007864416,1.8750001146660096,1.8750026441499568,1.8750337565715798,1.875164296463624,1.8756406878749181,1.8687940449787999,1.8942757402952983,1.4648507645292026,0.16726202952712074,0.00039319237389590696,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000067666488,1.8750001139744974,1.8750022892567395,1.8750318928939849,1.8751386944332922,1.8760620360993683,1.8751339203454436,1.9177415547655468,1.6559425013206983,0.39149738539229667,0.0012842291055574157,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000065019852,1.8750000917360745,1.8750020980916347,1.875027675961293,1.8751241889290826,1.8757218602756298,1.8684653493554002,1.8939283836242518,1.467462884232913,0.16839332481809732,0.0003862979369045938,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000050770357,1.8750000822721695,1.8750013643121335,1.8750188962603747,1.8750543267627426,1.8757556626002345,1.8748928873892572,1.9216169487567192,1.6706589519026225,0.38085972458469647,0.001157839113734775,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.8750000067528687,1.8750000858287166,1.8750015231603725,1.8750156068775117,1.8751124886611725,1.876282065840945,1.864636025288874,1.9016016287751665,1.4900739502555964,0.10417274716901026,0.00039711434979890073,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv deleted file mode 100644 index dabf80475f..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -1.0,0.75,0.75,1.0,0.7500000000073724,0.7499999999997002,0.7499999999569099,0.7499999987889172,0.7499999808694036,0.7499997651492778,0.7499982402369758,0.7499941167783433,0.7499833136145743,0.7499859049834832,0.7499917439647185,0.7499878620411933,0.7499924803548221,0.7500028694542862,0.7500047192086836,0.7500010000759205,0.7500001531362113,0.7500000192588656,0.750000001792403,0.7500000001203555,0.7499999999999541,0.749999999999371,0.7499999485552269,0.7499965902292165,0.7500157411536653,0.7499999357182036,0.7500005831767943,0.7499819350054931,0.7500000000179637,0.7500614405836838,0.750023424351721,0.7500096712823723,0.7499999946934025,0.7499923011757014,0.7500039407198505,0.7500000762620849,0.749981500294057,0.7500000004487684,0.7499999999900874,0.7500000000007807,0.7500207163255503,0.7499999997363438,0.749998966228408,0.7500000071560549,0.7514267956866647,0.7499999449511071,0.7500259966018847,0.7500005779298847,0.7461418381506764,0.7500000000025999,0.7500007105234197,0.78430119315471,0.7507839752277823,0.7499999969772144,0.7500039267893124,0.7501366257112141,0.7500000385070739,0.7499999999964828,0.7500000000868455,0.7499997126171511,0.7507301440080332,0.7501174749616408,0.7500000026792115,0.7499697931973663,0.7500064697678326,0.7499999999135847,0.7499999998335984,0.749999032990776,0.7496343424946985,0.7499999998506606,0.750079242679066,0.7499999999955279,0.7500000024599612,0.7498000978979923,0.7499999957813732,0.7500000567182429,0.7499999943361697,0.75000000669346,0.7500005409963966,0.7500000000006786,0.7499999998652032,0.752083282254053,0.7500218312969331,0.7499939102683744,0.7500049469395689,0.7499999999909093,0.7499999841757341,0.7500126225851828,0.7483660542008235,0.7499930430594415,0.7499999993006308,0.7500507162031664,0.7489419453465432,0.749999904570763,0.7500000000603018,0.7500000633609366,0.7499999999950617,0.7502387187122324,1.0,0.7446974815875695,0.7499999521210499,0.7499988580063501,0.7420199596065232,0.749999471758056,0.7508934237221221,0.7502989551124126,0.7500000000000313,0.8088816226936704,0.7411053601201313,0.7500000000326672,0.7499999999999524,0.7445959681713037,1.0,0.8365050286385303,0.8248006762685067,0.7499999999972493,1.0,0.8333091345539045,0.7499999999994699,0.75,0.75,0.75,0.7499999999999946,0.7499999999999949,0.75,0.75,0.749999999999998,0.7499999999999996,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75,0.75 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv deleted file mode 100644 index 5275b9a025..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.0,0.0,0.0,0.0,0.0,0.0,0.16453809461088809,0.8233715742354761,1.4436415153452693,2.0513950565189005,2.6347651338100126,3.196089739063321,3.734873025395928,4.251457486259568,4.745809034896075,5.217938018561809,5.667843195005988,6.095527407106528,6.500987717444724,6.88422722706517,7.245242964261893,7.584037854862489,7.900609093250553,8.194959428854379,8.467086198483354,8.716992015700143,8.944674330298696,9.150135651224629,9.333373516858595,9.494390355714405,9.633183774982207,9.749756140388703,9.844105116578557,9.916233006755796,9.966137557326036,9.99382090409509,9.999281176820617,9.982519871401184,9.943535682474822,9.882330180971351,9.798901355375238,9.693251439225143,9.565378129361168,9.41528377321967,9.242965985896022,9.048427183944472,8.831664912413174,8.592681656963906,8.331474899612468,8.048047157440516,7.742395969809017,7.414523582627677,7.064428343503563,6.692110543238669,6.297573246643971,5.880806321493848,5.441836481684068,4.980603277577162,4.497243168089517,3.9914674719093393,3.4638987629068003,2.9131297627791812,2.3418880417492556,1.7427579437609513,1.132516530855763,0.49039016278860953,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17063707221256294,0.8258352100429669,1.4431437082705028,2.0523852263815847,2.634689137179127,3.19615495231452,3.734877456209768,4.251470332021984,4.745807633848662,5.21794232050152,5.6678433109239315,6.095529597138384,6.5009881358177335,6.884228344286862,7.245243468426775,7.5840383434200005,7.900609634929121,8.194959525768283,8.467086758107879,8.71699185908205,8.944674898050746,9.150135326976724,9.333374087636567,9.494389920383902,9.633184345915517,9.74975563362257,9.844105683713874,9.916232462833825,9.966138099626237,9.993820409893289,9.999281553432269,9.982519495822732,9.943536209534685,9.882329652739003,9.79890192015026,9.693250948773924,9.565378700185349,9.415283362969218,9.242966556374643,9.048426897641583,8.831665477957701,8.592681555079423,8.331475447691092,8.048047321747717,7.742396452351373,7.414524090654921,7.064428546514841,6.692111283976814,6.297572188879784,5.880806222756606,5.441830250582261,4.980597293163855,4.497217550574328,3.99142731932119,3.463723110290843,2.913056644068709,2.341037070851054,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039485,0.8233451516067432,1.4442360606865559,2.0512985457248964,2.6348916708723698,3.19607199723678,3.7348770504241937,4.251458543519943,4.745813145972914,5.217937203545765,5.66784521476398,6.0955269039478575,6.500988897874284,6.884226920531155,7.245243705437304,7.584037660885711,7.900609566499259,8.19495930552365,8.467086497959865,8.716991938861629,8.944674513704097,9.15013560556591,9.333373622072054,9.49439033083069,9.633183828460801,9.749756128727197,9.844105138063988,9.91623300247591,9.966137562530665,9.993820902522833,9.99928117860963,9.98251986951131,9.943535690126428,9.882330175129066,9.798901383174663,9.693251424384961,9.565378193880544,9.415283743119941,9.242966108088753,9.048427130298773,8.831665121233032,8.592681567669228,8.331475238938213,8.048047012151763,7.742396516905825,7.414523339286854,7.06442927126116,6.692110111230403,6.297575006964063,5.880805884077139,5.441838925726399,4.980603367403127,4.497245700381287,3.9914587969287325,3.463940586704718,2.9130781625253688,2.342179298953843,1.7426515920252363,1.1330756673199627,0.49028274681506945,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17072060698282715,0.8271336393531055,1.4427999924056503,2.052031639896863,2.6347315529461226,3.1961015996112536,3.7348930775365123,4.251458596108597,4.745809882659023,5.217939510887613,5.667843737173559,6.095528385608119,6.500988281116463,6.884227637652063,7.245243545729185,7.584037898426171,7.900609682688803,8.194959241512537,8.4670867889485,8.716991679609482,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283474,9.633184354164609,9.749755602562216,9.844105688654864,9.916232450611755,9.966138102376345,9.993820406592457,9.999281555362444,9.982519491265984,9.943536212951061,9.882329636776703,9.798901926210993,9.693250910814761,9.565378710177347,9.415283289903913,9.24296657218958,9.048426771559367,8.83166550272937,8.592681349154866,8.331475487771229,8.048046989551109,7.7423965252466065,7.414523528516587,7.06442871545367,6.692110178511221,6.297572716835042,5.880803479714871,5.441832642818861,4.9805890382343065,4.497226861387612,3.991399144021369,3.463750855405036,2.9129092064015145,2.341076274896351,1.7437099234449605,1.1307343880548872,0.4938239433211966,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1627051150463568,0.8230825415667712,1.4441834301274552,2.0513938725059138,2.6349177833059914,3.196076941672937,3.7348828697600847,4.2514597294714465,4.745814483006352,5.2179374708861745,5.667845581068539,6.0955270640383254,6.500989080328945,6.88422702207337,7.245243816230415,7.5840377260549445,7.900609637001741,8.194959347249053,8.467086542931744,8.716991965126226,8.944674541750619,9.150135621444397,9.333373638718871,9.494390339700743,9.63318383750534,9.749756132968034,9.844105142293948,9.916233003872883,9.966137564144173,9.993820902501671,9.9992811795471,9.982519869653732,9.943535692285293,9.882330176922208,9.798901388699612,9.693251429291333,9.56537820527286,9.41528375291484,9.242966128640171,9.048427147333545,8.831665155759907,8.59268159515479,8.33147529560518,8.048047054384197,7.742396613402673,7.414523401782891,7.064429458282312,6.692110207937445,6.297575441062394,5.880806088334927,5.441840024229656,4.980603827090698,4.497249250713551,3.9914598154887644,3.4639566844645655,2.91309935766652,2.342225926219517,1.742717844795196,1.1331205813562777,0.49028342072999853,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.17072060698282726,0.8271336393531055,1.442799992405651,2.052031639896862,2.634731552946123,3.196101599611255,3.7348930775365123,4.251458596108597,4.7458098826590245,5.217939510887614,5.667843737173552,6.095528385608121,6.500988281116466,6.884227637652063,7.245243545729185,7.584037898426173,7.900609682688805,8.194959241512539,8.467086788948505,8.716991679609478,8.944674918195936,9.150135217660182,9.33337410069976,9.494389858283483,9.633184354164605,9.749755602562217,9.84410568865486,9.91623245061175,9.966138102376343,9.993820406592455,9.99928155536245,9.98251949126599,9.943536212951066,9.88232963677671,9.798901926210998,9.693250910814765,9.56537871017735,9.415283289903915,9.24296657218958,9.048426771559372,8.831665502729372,8.592681349154871,8.331475487771229,8.048046989551114,7.7423965252466065,7.414523528516589,7.064428715453674,6.692110178511219,6.297572716835043,5.880803479714871,5.441832642818859,4.980589038234303,4.4972268613876105,3.9913991440213668,3.463750855405035,2.912909206401515,2.3410762748963516,1.7437099234449605,1.1307343880548877,0.49382394332119617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.16280063696039482,0.8233451516067434,1.4442360606865559,2.051298545724897,2.6348916708723706,3.196071997236782,3.734877050424193,4.2514585435199415,4.745813145972912,5.217937203545769,5.667845214763981,6.095526903947857,6.5009888978742865,6.8842269205311535,7.245243705437304,7.584037660885707,7.900609566499258,8.194959305523653,8.467086497959865,8.71699193886164,8.944674513704093,9.150135605565914,9.333373622072056,9.494390330830687,9.633183828460803,9.749756128727197,9.84410513806399,9.916233002475906,9.966137562530662,9.993820902522831,9.999281178609628,9.98251986951131,9.943535690126428,9.882330175129063,9.798901383174666,9.693251424384957,9.565378193880541,9.415283743119941,9.242966108088757,9.048427130298776,8.831665121233033,8.59268156766923,8.331475238938216,8.048047012151764,7.742396516905831,7.414523339286856,7.06442927126116,6.692110111230401,6.297575006964068,5.880805884077139,5.441838925726403,4.980603367403125,4.497245700381287,3.9914587969287307,3.4639405867047195,2.9130781625253688,2.3421792989538437,1.742651592025237,1.1330756673199627,0.4902827468150699,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1706370722125627,0.8258352100429668,1.4431437082705028,2.052385226381582,2.634689137179128,3.1961549523145196,3.7348774562097677,4.251470332021983,4.7458076338486626,5.217942320501524,5.667843310923927,6.095529597138383,6.500988135817731,6.884228344286864,7.245243468426774,7.584038343419998,7.900609634929124,8.19495952576829,8.467086758107875,8.716991859082047,8.944674898050742,9.15013532697673,9.333374087636567,9.494389920383908,9.633184345915522,9.74975563362257,9.844105683713874,9.916232462833818,9.966138099626239,9.993820409893292,9.999281553432267,9.982519495822732,9.943536209534685,9.882329652739008,9.798901920150255,9.693250948773926,9.56537870018534,9.415283362969216,9.242966556374634,9.048426897641585,8.8316654779577,8.592681555079416,8.331475447691087,8.04804732174772,7.7423964523513735,7.414524090654919,7.06442854651484,6.692111283976813,6.297572188879785,5.880806222756606,5.441830250582257,4.98059729316386,4.497217550574325,3.9914273193211884,3.4637231102908452,2.9130566440687087,2.3410370708510566,1.744063630393942,1.130775876025023,0.49386587410852834,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.164538094610888,0.8233715742354755,1.4436415153452695,2.0513950565188983,2.634765133810012,3.1960897390633205,3.7348730253959284,4.251457486259564,4.745809034896077,5.2179380185618065,5.667843195005985,6.095527407106528,6.500987717444722,6.884227227065169,7.245242964261893,7.584037854862496,7.900609093250557,8.194959428854379,8.467086198483361,8.716992015700143,8.94467433029869,9.150135651224632,9.33337351685859,9.494390355714412,9.633183774982205,9.749756140388708,9.844105116578548,9.916233006755792,9.966137557326036,9.993820904095077,9.99928117682062,9.982519871401186,9.943535682474822,9.882330180971348,9.798901355375232,9.693251439225136,9.565378129361175,9.415283773219674,9.242965985896024,9.04842718394447,8.83166491241318,8.592681656963912,8.33147489961247,8.04804715744051,7.742395969809017,7.4145235826276705,7.064428343503563,6.692110543238665,6.29757324664397,5.880806321493852,5.441836481684067,4.980603277577162,4.497243168089524,3.991467471909346,3.4638987629068003,2.9131297627791803,2.3418880417492542,1.7427579437609508,1.1325165308557623,0.4903901627886097,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv deleted file mode 100644 index de34c8b50f..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.7813870758453461,0.7859245983858376,0.8247050211205322,0.9424039888397837,1.1187321934331163,1.0724908574253553,0.9067215071793732,0.8102773974734242,0.7854858052492031,0.7277713091372533,0.6432333128720554,0.5595040597032283,0.4758954184076791,0.3923316291160457,0.3087664964397302,0.2533334255652739,0.21266683687831126,0.17199937597506093,0.13133620109235425,0.09066127337611159,0.05001016137560753,0.009333124573756364,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7794884422526686,0.7884143047039096,0.8172444774878415,0.9356983710384047,1.1473083708296197,1.0832921779609146,0.8962373426036601,0.8056617117291598,0.7863527854435163,0.7274147029847418,0.6432668635871595,0.5594909713739777,0.47589809937447003,0.3923322976618888,0.3087672662422272,0.2533338652157984,0.21266689729442545,0.17199907467166098,0.1313346629513451,0.06632851333167038,0.03240658773925256,0.009326305109135772,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7812852842942352,0.7855580937912097,0.8245061816026098,0.9434711748900355,1.1143612031518075,1.072130185921349,0.9083807727535861,0.8102111041466393,0.7853044061016778,0.7278166281489273,0.6432234179706826,0.5595059017385354,0.47589453034701895,0.3923310388664993,0.30876579757393513,0.2533330119137899,0.2126664403705008,0.14588112500363323,0.07248553760601081,0.037276153720445356,0.03240822546752621,0.009332511341036798,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788221503386785,0.7895045399096742,0.817047329202329,0.9370310368228373,1.1478465585432167,1.0822649312614008,0.8956769754388592,0.8070430042630998,0.7863041871466705,0.7274351838450098,0.6432698916589614,0.5594925910497873,0.47590017340473695,0.39233513082751814,0.3087683767495585,0.24122098904199646,0.1600691190847492,0.0789186283167023,0.04216075472661364,0.03727701401249463,0.03240192553174191,0.00933138126672698,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810911393780215,0.7854293700714281,0.8242819801957165,0.9431669196491352,1.114266359391289,1.0721995511715114,0.90823009408847,0.8100885341635531,0.7851965280700863,0.7231483696650428,0.6312225348487437,0.5401942004106371,0.44925923913958604,0.35838062399782844,0.26749928946299045,0.1766230602673485,0.08574754905455514,0.04703914269497268,0.042160116353124125,0.03728009380080456,0.03240217607882402,0.009330974390830304,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788260483866445,0.789574314310526,0.8170698620866703,0.9370920767579904,1.147889922488486,1.0822631245704415,0.8956838657557693,0.8071059784445214,0.7863232679302541,0.714733576484353,0.6106624769896858,0.5070077036903092,0.4035315011920199,0.3000893981736428,0.19660729850097716,0.09317196139774933,0.05192314345131101,0.047043095292799236,0.042159725889785525,0.03728001526887097,0.03240229665656421,0.009330984152682102,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810722493136502,0.785419547807061,0.8242664434861693,0.9431595979789656,1.114257178173395,1.0721983246425895,0.9082196306024682,0.810081697674279,0.78518684662278,0.7043222957112438,0.5829267272074534,0.46247487903633433,0.34200872227196,0.2216572244017629,0.10139487186948634,0.0567540386691817,0.051902842355393275,0.047041039706835736,0.04216001232448244,0.03728000321591981,0.03240229312242227,0.009330973970110274,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788283399266127,0.7895799544347943,0.8170714248388737,0.9370943769580904,1.1478919828622818,1.0822645334387047,0.8956850968981096,0.8071095843390333,0.7863262657313977,0.688706824090174,0.5438870437614823,0.3995036005410455,0.25537280835949316,0.11125909186988325,0.06161818253272323,0.05690160340666382,0.0519293372467987,0.04704742666658272,0.04216008457196604,0.03728001405476364,0.03240230767748175,0.009330984481731617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.781070392721205,0.7854186364917723,0.8242654576774623,0.9431594664640794,1.1142566249490362,1.0721979503590644,0.9082194583409905,0.8100810829967902,0.7851821546899312,0.6659111706099775,0.4842965166450265,0.3039500102024844,0.12312366801073213,0.04914006998489618,0.009398595976762373,0.049384893548239335,0.051921426230407894,0.04705947094051775,0.0421591234105971,0.0372800056670554,0.03240230078296971,0.009330973969069515,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788286675018283,0.7895804268525524,0.8170715425415402,0.9370945002544699,1.1478922373536673,1.0822645528239674,0.8956854913873853,0.8071081817468198,0.7863325410813746,0.6259877984232642,0.3830420968391501,0.1406252846546449,0.027373873949047882,0.0,0.0,0.0,0.02891111831445859,0.047097148767159445,0.04215497340505774,0.037280011764353985,0.03240231354288314,0.009330984481308879,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810702293105918,0.7854185584476432,0.8242653871866045,0.943159432925509,1.1142566301756198,1.072197824733119,0.9082207444860054,0.8100762351217026,0.7851907953532378,0.5438672808572882,0.17154299271240475,0.0762572686819532,0.0,0.0,0.0,0.0,0.0,0.04697567640128119,0.042165233082942136,0.03728012303813208,0.032402306053253754,0.009330973971944554,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788286675018284,0.7895804268525523,0.8170715425415406,0.9370945002544702,1.1478922373536677,1.0822645528239674,0.8956854913873853,0.8071081817468199,0.7863325410813746,0.6259877984232642,0.3830420968391501,0.1406252846546449,0.02737387394904779,0.0,0.0,0.0,0.028911118314458494,0.047097148767159445,0.04215497340505774,0.037280011764353985,0.03240231354288314,0.009330984481308879,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810703927212053,0.7854186364917726,0.8242654576774623,0.9431594664640794,1.114256624949036,1.0721979503590644,0.9082194583409902,0.8100810829967896,0.7851821546899314,0.6659111706099776,0.4842965166450265,0.30395001020248413,0.12312366801073177,0.04914006998489597,0.009398595976762156,0.049384893548239134,0.05192142623040791,0.04705947094051772,0.0421591234105971,0.0372800056670554,0.03240230078296971,0.009330973969069515,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788283399266129,0.7895799544347943,0.817071424838874,0.9370943769580905,1.1478919828622818,1.0822645334387047,0.8956850968981094,0.807109584339033,0.7863262657313976,0.6887068240901739,0.5438870437614822,0.3995036005410453,0.25537280835949294,0.1112590918698828,0.06161818253272324,0.0569016034066638,0.0519293372467987,0.04704742666658272,0.04216008457196604,0.03728001405476364,0.03240230767748175,0.009330984481731617,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810722493136502,0.7854195478070609,0.8242664434861694,0.9431595979789656,1.114257178173395,1.072198324642589,0.9082196306024681,0.8100816976742788,0.78518684662278,0.7043222957112435,0.5829267272074539,0.4624748790363341,0.34200872227196,0.22165722440176286,0.10139487186948634,0.05675403866918174,0.05190284235539326,0.04704103970683573,0.04216001232448244,0.03728000321591981,0.03240229312242227,0.009330973970110274,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788260483866448,0.7895743143105256,0.8170698620866704,0.9370920767579904,1.1478899224884862,1.0822631245704413,0.8956838657557694,0.8071059784445214,0.7863232679302543,0.7147335764843532,0.6106624769896857,0.5070077036903087,0.40353150119201986,0.30008939817364255,0.19660729850097713,0.09317196139774933,0.051923143451310994,0.047043095292799236,0.04215972588978552,0.03728001526887097,0.0324022966565642,0.009330984152682102,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7810911393780213,0.7854293700714283,0.8242819801957164,0.9431669196491352,1.1142663593912887,1.072199551171511,0.9082300940884701,0.8100885341635533,0.7851965280700861,0.7231483696650427,0.6312225348487437,0.5401942004106373,0.44925923913958576,0.35838062399782855,0.2674992894629904,0.1766230602673485,0.08574754905455519,0.04703914269497267,0.042160116353124125,0.03728009380080456,0.03240217607882402,0.009330974390830304,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7788221503386786,0.7895045399096742,0.8170473292023296,0.9370310368228373,1.147846558543217,1.0822649312614008,0.8956769754388592,0.8070430042630999,0.7863041871466703,0.7274351838450098,0.6432698916589616,0.5594925910497875,0.4759001734047371,0.39233513082751814,0.3087683767495586,0.2412209890419965,0.16006911908474913,0.07891862831670224,0.04216075472661368,0.03727701401249463,0.03240192553174191,0.00933138126672698,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.781285284294235,0.7855580937912097,0.8245061816026098,0.9434711748900357,1.1143612031518075,1.0721301859213486,0.9083807727535858,0.8102111041466393,0.7853044061016778,0.7278166281489273,0.6432234179706825,0.5595059017385355,0.4758945303470189,0.392331038866499,0.308765797573935,0.2533330119137899,0.2126664403705008,0.14588112500363296,0.07248553760601066,0.037276153720445356,0.03240822546752621,0.009332511341036798,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7794884422526687,0.78841430470391,0.8172444774878416,0.935698371038405,1.1473083708296197,1.0832921779609146,0.8962373426036598,0.8056617117291598,0.7863527854435164,0.7274147029847416,0.6432668635871596,0.5594909713739776,0.4758980993744702,0.3923322976618887,0.3087672662422272,0.25333386521579837,0.21266689729442545,0.17199907467166095,0.13133466295134516,0.06632851333167032,0.03240658773925255,0.009326305109135772,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.7813870758453462,0.7859245983858376,0.8247050211205323,0.9424039888397839,1.1187321934331163,1.0724908574253555,0.906721507179373,0.8102773974734244,0.7854858052492029,0.7277713091372531,0.6432333128720552,0.5595040597032283,0.47589541840767924,0.3923316291160457,0.3087664964397304,0.2533334255652737,0.21266683687831126,0.17199937597506093,0.13133620109235425,0.0906612733761116,0.050010161375607515,0.009333124573756365,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv deleted file mode 100644 index e0dbc3e2c8..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007972,0.19980105891149613,0.19978779655307177,0.19977263966410388,0.1997551511042619,0.1997347483722354,0.19971064286468432,0.19968178240345236,0.19964711469749208,0.1996060655703632,0.19939871757904104,0.2005831548487037,0.20567133130652127,0.23084607661069406,0.21314091585345063,0.19980085204537243,0.1969896741421163,0.15003365517623846,0.10316809661346993,0.10159494180734895,0.10106054811471313,0.10079558678972134,0.10063653773039563,0.10053046769380679,0.10045469749538567,0.10039786663688778,0.10035366309777496,0.10031829927649141,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.19982316299363811,0.19981276105007928,0.19980105891148847,0.19978779655300105,0.19977263966267328,0.19975515108850886,0.19973474807748037,0.1997106397923768,0.19968174102537267,0.19964693580763815,0.19960683872846366,0.19952126502540546,0.19976754248049444,0.20653491839188692,0.23321799547786398,0.21614484882739424,0.20029531812309473,0.19683572275170863,0.15003739105935293,0.10316030508106665,0.10159285747105436,0.10105891642246502,0.10079561219390014,0.10063653935522303,0.10053046764415924,0.10045469749067541,0.10039786663668882,0.10035366309776866,0.10031829927649116,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007906,0.19980105891149152,0.19978779655295914,0.19977263966316722,0.1997551510800169,0.19973474816135878,0.1997106381761594,0.1996817527064298,0.19964678895309912,0.19961658135573604,0.19943685987104331,0.20056366151423993,0.20571174956369653,0.23075802349206043,0.2131428500524704,0.19995482110805068,0.19696658035320813,0.1500362243664598,0.10316776457580659,0.10159499341497953,0.10105976955677229,0.10079559593251687,0.10063653920720686,0.10053046765686433,0.1004546974887086,0.10039786663671438,0.10035366309776612,0.10031829927649122,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.19982316299363811,0.19981276105007928,0.19980105891148844,0.19978779655300105,0.19977263966267328,0.19975515108850883,0.19973474807748037,0.1997106397923768,0.19968174102537262,0.19964693580763812,0.19960683872846366,0.19952126502540546,0.19976754248049433,0.20653491839188703,0.23321799547786407,0.21614484882739424,0.2002953181230947,0.19683572275170863,0.15003739105935293,0.10316030508106663,0.10159285747105437,0.10105891642246502,0.10079561219390014,0.10063653935522303,0.10053046764415922,0.10045469749067541,0.10039786663668883,0.10035366309776866,0.10031829927649116,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206,0.19984084638317937,0.19983247002785098,0.1998231629936382,0.19981276105007972,0.19980105891149613,0.19978779655307177,0.19977263966410388,0.19975515110426179,0.1997347483722354,0.19971064286468432,0.19968178240345236,0.19964711469749202,0.1996060655703632,0.19939871757904093,0.20058315484870376,0.20567133130652127,0.230846076610694,0.21314091585345063,0.19980085204537246,0.19698967414211627,0.15003365517623835,0.10316809661346993,0.10159494180734895,0.10106054811471313,0.10079558678972134,0.10063653773039563,0.10053046769380679,0.10045469749538567,0.10039786663688774,0.10035366309777496,0.10031829927649141,0.1002893646525011,0.10026525209850533,0.10024484892931167,0.10022736033779717,0.10021220344707168,0.10019894108851309,0.10018723894992099,0.10017683700636186,0.10016752997214905,0.1001591536168206 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv deleted file mode 100644 index 22e26c8d50..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.19999999999994936,0.2000000000016463,0.20000000001043183,0.20000000005563617,0.20000000029773596,0.2000000016677417,0.20000000977128313,0.20000006480793814,0.20000043004879314,0.2000031147242275,0.20001756929690295,0.19999585895455968,0.2003562241212951,0.2008951198179171,0.20977931344989734,0.23507252663122458,0.26312112800498044,0.24108735896110223,0.21478187645023056,0.19723376887723493,0.1754365580268884,0.15633952476199525,0.13751682924095487,0.11875660266440567,0.0999677326804967,0.08129397212340472,0.06228059099557712,0.04399496180243034,0.024721378580291976,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1999999999997182,0.20000000000120985,0.20000000000654106,0.20000000004533966,0.20000000018879832,0.20000000134041235,0.2000000063387841,0.20000004997610482,0.20000029567767413,0.20000249975180695,0.20001781178608008,0.2001044182243076,0.19993248194010696,0.2015426576753344,0.20824975649593855,0.2312800675457061,0.2649638281607354,0.245566690314198,0.21440017272841516,0.19618312632136498,0.17562307214892336,0.15631136015798885,0.1375194708717102,0.11876493049259834,0.09997724632958042,0.08135262735246834,0.06231985902194499,0.04413708875938817,0.024966284001498838,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.199999999999754,0.20000000000108156,0.2000000000083766,0.20000000004000823,0.20000000023797615,0.20000000117445538,0.2000000075699462,0.20000004284727657,0.20000032117327138,0.20000220542747665,0.20001698771099571,0.20002977787868398,0.20043941615810784,0.2006866271666313,0.21017818173755165,0.23559655760268366,0.2622784406551169,0.24079101767798894,0.21539087439646715,0.19720291703341153,0.17541131255972947,0.15634809393203164,0.13751495287021692,0.11875887105887604,0.0999614049856154,0.08129496130658317,0.06228285924842417,0.043987132602267505,0.024735274367138585,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.1999999999997182,0.20000000000120985,0.20000000000654103,0.20000000004533966,0.20000000018879832,0.2000000013404124,0.2000000063387841,0.20000004997610482,0.20000029567767413,0.20000249975180695,0.20001781178608008,0.20010441822430752,0.19993248194010702,0.2015426576753344,0.20824975649593855,0.2312800675457061,0.2649638281607354,0.24556669031419803,0.21440017272841524,0.19618312632136506,0.17562307214892334,0.15631136015798888,0.13751947087171024,0.11876493049259831,0.09997724632958041,0.08135262735246836,0.06231985902194501,0.04413708875938817,0.024966284001498848,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.19999999999994938,0.2000000000016463,0.20000000001043172,0.20000000005563617,0.20000000029773596,0.2000000016677417,0.20000000977128318,0.20000006480793814,0.20000043004879314,0.2000031147242275,0.20001756929690295,0.19999585895455965,0.20035622412129533,0.20089511981791702,0.20977931344989736,0.23507252663122458,0.26312112800498044,0.24108735896110223,0.2147818764502305,0.19723376887723482,0.17543655802688846,0.1563395247619952,0.13751682924095487,0.11875660266440563,0.09996773268049672,0.08129397212340472,0.06228059099557712,0.04399496180243034,0.024721378580291976,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv deleted file mode 100644 index c5fecfde69..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.5003296400640093,0.5004600988895513,0.5014583631369367,0.5031758405731334,0.508178039057749,0.5185137939245158,0.5384569006258446,0.571605027993877,0.595426801094106,0.5916671256391682,0.5641439827991965,0.5328645978739902,0.515387371276078,0.5068056298468632,0.5027333343201744,0.5011871100141987,0.5004637342955055,0.5002185862958161,0.5001069895811231,0.5000485760518212,0.5000205546892389,0.5000086363828579,0.5000035487048398,0.5000014787399967,0.5000006061880128,0.5000002524760485,0.5000001034873669,0.5000000431014266,0.5000000176667514,0.5000000073580122,0.5000000030159583,0.5000000012561141,0.5000000005148657,0.5000000002144358,0.5000000000878944,0.5000000000366067,0.5000000000150052,0.500000000006253,0.5000000000025824,0.5000000000011666,0.5000000000007399,0.5002969681374327,0.5005436520923847,0.5012855334911634,0.503416172550591,0.5077742180006688,0.5186689594871572,0.5394142576906745,0.5697254427561504,0.5967329340401094,0.5918203635617771,0.562313971887476,0.5333170512859344,0.5156239600578514,0.5064831282758758,0.5028477886870312,0.501128828255428,0.5004882343850126,0.5002000454616692,0.5001007637931664,0.500046433898508,0.5000192307924547,0.5000082131553532,0.5000033127935222,0.5000014053870574,0.5000005658065314,0.5000002399439696,0.5000000965929114,0.5000000409619572,0.500000016489765,0.5000000069927742,0.5000000028150304,0.5000000011937626,0.5000000004805644,0.5000000002037914,0.5000000000820387,0.5000000000347896,0.5000000000140054,0.5000000000059421,0.5000000000024083,0.5000000000010993,0.5000000000006802,0.5003068118833218,0.5004611453138227,0.501452789614979,0.5031909170649663,0.5081384180305206,0.5184349135180344,0.5387146554905453,0.5717403182572404,0.595045171966744,0.5915708962504462,0.564112514375155,0.5329343647416046,0.5153360373503606,0.5068188996292636,0.5027325579315481,0.5011877315362498,0.5004652525673136,0.5002100128726578,0.500102674437557,0.5000451047412396,0.5000195023518208,0.5000079461517015,0.5000033601292823,0.5000013592910538,0.5000005738954387,0.5000002320703454,0.5000000979738535,0.5000000396177863,0.500000016725512,0.500000006763305,0.5000000028552756,0.5000000011545888,0.5000000004874346,0.5000000001971039,0.5000000000832117,0.5000000000336479,0.5000000000142055,0.5000000000057467,0.5000000000024432,0.5000000000010615,0.5000000000007043,0.500296968137433,0.5005436520923847,0.5012855334911633,0.503416172550591,0.5077742180006689,0.5186689594871574,0.5394142576906744,0.5697254427561504,0.5967329340401089,0.5918203635617768,0.5623139718874759,0.5333170512859344,0.5156239600578509,0.5064831282758757,0.5028477886870311,0.501128828255428,0.500488234385013,0.5002000454616693,0.5001007637931664,0.500046433898508,0.5000192307924545,0.5000082131553532,0.5000033127935222,0.5000014053870574,0.5000005658065314,0.5000002399439696,0.5000000965929114,0.5000000409619572,0.500000016489765,0.5000000069927744,0.5000000028150304,0.5000000011937628,0.5000000004805646,0.5000000002037914,0.5000000000820387,0.5000000000347898,0.5000000000140054,0.5000000000059421,0.5000000000024083,0.5000000000010996,0.5000000000006803,0.5003296400640095,0.5004600988895515,0.5014583631369369,0.5031758405731334,0.5081780390577493,0.5185137939245158,0.5384569006258445,0.5716050279938771,0.595426801094106,0.5916671256391679,0.5641439827991965,0.5328645978739899,0.5153873712760781,0.5068056298468631,0.5027333343201745,0.5011871100141988,0.5004637342955054,0.5002185862958163,0.5001069895811231,0.5000485760518212,0.5000205546892388,0.5000086363828579,0.5000035487048398,0.5000014787399969,0.5000006061880129,0.5000002524760484,0.5000001034873669,0.5000000431014266,0.5000000176667516,0.5000000073580122,0.5000000030159583,0.5000000012561141,0.5000000005148657,0.5000000002144357,0.5000000000878944,0.5000000000366068,0.5000000000150052,0.500000000006253,0.5000000000025824,0.5000000000011666,0.5000000000007397 \ No newline at end of file diff --git a/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv deleted file mode 100644 index a61d5b65ee..0000000000 --- a/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv +++ /dev/null @@ -1 +0,0 @@ -0.28205280263739996,0.28205279510879244,0.28205281507426544,0.2820527790357037,0.2820529197677154,0.2820526681402791,0.2820536185682505,0.2820519979005437,0.28205781877618186,0.2820432556262398,0.28209074769150655,0.28198046092475415,0.2821020763535882,0.2819669376580698,0.22817626448788236,0.13940710051061797,0.09215404747741665,0.13421315442448406,0.23185192169859237,0.2835449596266364,0.28175376428375504,0.2821363322252552,0.28201440976464043,0.2820583985298538,0.2820479539081593,0.2820535030627905,0.28205223179782657,0.2820528884631722,0.28205274003172476,0.28205280947943817,0.2820527934273511,0.28205279926459076,0.2820527977387693,0.28205279822908047,0.2820527981098476,0.2820527981453255,0.28205279813583717,0.2820527981386022,0.2820527981378694,0.28205279813806394,0.28205279813802175,0.28205280050496406,0.2820527917492839,0.282052808146337,0.28205275051953227,0.28205286929836293,0.282052439192529,0.2820532997986333,0.2820503812044184,0.2820560452694113,0.2820370448598662,0.2820675968934553,0.2820086943126736,0.2820527878418225,0.282322839785227,0.2260008074480811,0.13898225292296718,0.0932099072960964,0.13452956613790434,0.23112483725451455,0.2813691580290234,0.28197411334661476,0.2821587404045493,0.28203311261406017,0.2820670123205583,0.2820501080880258,0.2820543417985561,0.2820524898154001,0.28205296622014503,0.2820527701525041,0.28205280854571063,0.2820527968562512,0.28205279914613945,0.2820527980080369,0.282052798201774,0.2820527981311188,0.28205279814280837,0.2820527981375241,0.2820527981383609,0.2820527981379856,0.28205279813804707,0.28205279813802175,0.28205280212204026,0.2820527964460206,0.2820528081337679,0.28205277446061067,0.2820529367936832,0.282052598328066,0.2820538234654629,0.2820514103086915,0.2820596925216362,0.2820429523398599,0.2820919095139913,0.28197986995120855,0.28210121354301326,0.281972221841733,0.22816854443249177,0.1394046210820346,0.09216102606103949,0.13422526873240004,0.2318491998939498,0.2835437062197263,0.28175480373725503,0.2821379736699134,0.28200648251808436,0.28206092643746955,0.2820494799570828,0.28205325533580594,0.2820524315280265,0.28205284317102697,0.28205275777943506,0.28205280489492657,0.2820527944061679,0.2820527988788418,0.282052797887419,0.28205279818109186,0.282052798118289,0.28205279814161677,0.28205279813665196,0.2820527981382558,0.2820527981379268,0.2820527981380408,0.28205279813802175,0.2820528005049642,0.2820527917492837,0.28205280814633704,0.28205275051953216,0.2820528692983628,0.2820524391925288,0.28205329979863325,0.2820503812044185,0.28205604526941114,0.2820370448598662,0.2820675968934553,0.2820086943126739,0.2820527878418225,0.2823228397852272,0.22600080744808104,0.13898225292296712,0.09320990729609643,0.13452956613790434,0.23112483725451458,0.28136915802902324,0.2819741133466148,0.28215874040454925,0.28203311261406017,0.2820670123205583,0.2820501080880259,0.28205434179855626,0.2820524898153999,0.2820529662201449,0.2820527701525043,0.28205280854571063,0.28205279685625123,0.28205279914613945,0.2820527980080368,0.28205279820177415,0.28205279813111866,0.2820527981428086,0.2820527981375241,0.2820527981383607,0.28205279813798556,0.2820527981380466,0.28205279813802175,0.2820528026374,0.2820527951087925,0.2820528150742654,0.2820527790357037,0.2820529197677154,0.28205266814027924,0.2820536185682505,0.2820519979005437,0.28205781877618186,0.2820432556262399,0.28209074769150666,0.28198046092475426,0.2821020763535886,0.28196693765806996,0.22817626448788242,0.13940710051061797,0.09215404747741666,0.13421315442448403,0.23185192169859248,0.2835449596266367,0.2817537642837551,0.2821363322252553,0.28201440976464043,0.2820583985298537,0.2820479539081593,0.2820535030627904,0.2820522317978264,0.28205288846317245,0.2820527400317246,0.28205280947943817,0.28205279342735107,0.2820527992645908,0.28205279773876923,0.28205279822908064,0.2820527981098475,0.2820527981453257,0.2820527981358372,0.2820527981386021,0.28205279813786965,0.28205279813806405,0.28205279813802175 \ No newline at end of file From 1e138b5aac291885ca728f3af0aea76a0b7de531 Mon Sep 17 00:00:00 2001 From: ejtovar Date: Tue, 2 Mar 2021 09:42:37 -0600 Subject: [PATCH 09/11] added .csv files after tracking --- .../SWFlow/comparison_files/comparison_conical_island_h_t2.csv | 3 +++ .../comparison_files/comparison_dSWEs_steady_state_h_t2.csv | 3 +++ .../SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv | 3 +++ .../SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv | 3 +++ .../tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv | 3 +++ .../comparison_files/comparison_reef_island_runup_h_t2.csv | 3 +++ .../SWFlow/comparison_files/comparison_santos_step_h_t2.csv | 3 +++ .../tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv | 3 +++ .../SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv | 3 +++ .../comparison_files/comparison_transcritical_bump_h_t2.csv | 3 +++ 10 files changed, 30 insertions(+) create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv create mode 100644 proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv diff --git a/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv new file mode 100644 index 0000000000..33b92a599c --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_conical_island_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e1c87ae61153c163e0511c22e4d8e5e85519e750ef40ca13751abaaafed0d8d +size 16525 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv new file mode 100644 index 0000000000..2c42378958 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_dSWEs_steady_state_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d005a7d26fc6b555b7424aaa405b4f5e2776de462549fee885062348c6ad9d2f +size 3841 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv new file mode 100644 index 0000000000..7e4cb29055 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_dam3Bumps_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e657ac3b4e6f557fdc5069a4f35264b9d629e9eea9fc7b09d041c3debf6178a6 +size 6933 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv new file mode 100644 index 0000000000..dfc720c3b1 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_obstacle_flow_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89d8965b3c5fd74a400af68858e3f1611048eb315d18359246b20a571a83ed64 +size 2404 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv new file mode 100644 index 0000000000..4aa8db7134 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_parab1D_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07bff69769d4559318068353fee3f26661892e7fe6b96f9547d67ae9b609e530 +size 10530 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv new file mode 100644 index 0000000000..7d4062c33b --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_reef_island_runup_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e6f528b292d484495b5259dac9dbb6c3a19e3260097e3a87922181ece8d0670 +size 10369 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv new file mode 100644 index 0000000000..e365bd95ac --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_santos_step_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a7da9d167a5bd583c092ad127e9cb21eae175a9e4d75ec8a18726cbff0412e2 +size 4068 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv new file mode 100644 index 0000000000..0e47dd9866 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_seawall_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3905a8f074f9cca08f48d1854ff9a58d7a918371f8724bb86460af4d469905fb +size 3111 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv new file mode 100644 index 0000000000..59120c98fc --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_solitary_wave_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95016ef4017b45cf226aa06fc0c42c651b2a21438f98fa73ed731501ac911dc0 +size 3870 diff --git a/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv b/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv new file mode 100644 index 0000000000..66f43abb70 --- /dev/null +++ b/proteus/tests/SWFlow/comparison_files/comparison_transcritical_bump_h_t2.csv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba0200b1af15b76e8f773661a9396721b62982bbac88e257fb89040412d311f7 +size 3975 From 02420de9eafab0bfbdb22f63052d98405a571a81 Mon Sep 17 00:00:00 2001 From: ejtovar Date: Tue, 2 Mar 2021 10:56:23 -0600 Subject: [PATCH 10/11] updating test file to match main branch --- proteus/tests/SWFlow/test_SWFlow.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/proteus/tests/SWFlow/test_SWFlow.py b/proteus/tests/SWFlow/test_SWFlow.py index 998109c361..a3fbcba897 100644 --- a/proteus/tests/SWFlow/test_SWFlow.py +++ b/proteus/tests/SWFlow/test_SWFlow.py @@ -20,7 +20,7 @@ def setup_method(self,method): self._scriptdir = os.path.dirname(__file__) self.path = proteus.__path__[0]+"/tests/SWFlow/" - def compare_vs_saved_files(self,name): + def compare_vs_saved_files(self,name, write=False): #expected_path = 'comparison_files/' + name + '.h5' #expected = tables.open_file(os.path.join(self._scriptdir,expected_path)) #actual = tables.open_file(name+'.h5','r') @@ -30,10 +30,11 @@ def compare_vs_saved_files(self,name): actual = tables.open_file(name+'.h5','r') expected_path = 'comparison_files/' + 'comparison_' + name + '_h_t2.csv' - #write comparison file - # write_path = './comparison_files/' + 'comparison_' + name + '_h_t2.csv' - # np.array(actual.root.h_t2).tofile(os.path.join(self._scriptdir, write_path),sep=",") - # + + if write: + write_path = './comparison_files/' + 'comparison_' + name + '_h_t2.csv' + np.array(actual.root.h_t2).tofile(os.path.join(self._scriptdir, write_path),sep=",") + np.testing.assert_almost_equal(np.fromfile(os.path.join(self._scriptdir, expected_path),sep=","),np.array(actual.root.h_t2).flatten(),decimal=7) actual.close() From 690ddf913ea96849a010ec139f6bd26ded741f2f Mon Sep 17 00:00:00 2001 From: ejtovar Date: Tue, 2 Mar 2021 16:42:04 -0600 Subject: [PATCH 11/11] change README.md file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2b3ccb556..183d2a3876 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Proteus: Computational Methods and Simulation Toolkit [![Build Status](https://travis-ci.com/erdc/proteus.svg?branch=master)](https://travis-ci.com/erdc/proteus) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/erdc/proteus_tutorial/master?filepath=index.ipynb) [![DOI](https://zenodo.org/badge/2212385.svg)](https://zenodo.org/badge/latestdoi/2212385) +# Proteus: Computational Methods and Simulation Toolkit [![Build Status](https://travis-ci.com/erdc/proteus.svg?branch=main)](https://travis-ci.com/erdc/proteus) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/erdc/proteus_tutorial/master?filepath=index.ipynb) [![DOI](https://zenodo.org/badge/2212385.svg)](https://zenodo.org/badge/latestdoi/2212385) Proteus (http://proteustoolkit.org) is a Python package for