diff --git a/docs/zotero.bib b/docs/zotero.bib index 66bc7f1298..e804cb4e7b 100644 --- a/docs/zotero.bib +++ b/docs/zotero.bib @@ -2947,18 +2947,3 @@ @article{Young1994 year={1994} } -@article{Colella_Woodward_1984, - title = {The {Piecewise} {Parabolic} {Method} ({PPM}) for gas-dynamical simulations}, - volume = {54}, - issn = {0021-9991}, - url = {http://www.sciencedirect.com/science/article/pii/0021999184901438}, - doi = {10.1016/0021-9991(84)90143-8}, - language = {en}, - number = {1}, - journal = {Journal of Computational Physics}, - author = {Colella, Phillip and Woodward, Paul R}, - month = apr, - year = {1984}, - pages = {174--201}, -} - diff --git a/src/ALE/Recon1d_EMPLM_CWK.F90 b/src/ALE/Recon1d_EMPLM_CWK.F90 index f0041f5ca4..01d97058a9 100644 --- a/src/ALE/Recon1d_EMPLM_CWK.F90 +++ b/src/ALE/Recon1d_EMPLM_CWK.F90 @@ -1,11 +1,10 @@ -!> Piecewise Linear Method 1D reconstruction +!> Piecewise Linear Method 1D reconstruction in index space and boundary extrapolation !! -!! This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. The cell-wise reconstructions are limited so -!! that the edge values (which are also the extrema in a cell) are bounded by the neighbors. The -!! limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move -!! to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. -!! The first and last cells are always limited to PCM. +!! This implementation of PLM follows Colella and Woodward, 1984 \cite colella1984, except for assuming +!! uniform resolution so that the method is independent of grid spacing. The cell-wise reconstructions +!! are limited so that the edge values (which are also the extrema in a cell) are bounded by the neighbors. +!! The slope of the first and last cells are set so that the first interior edge values match the interior +!! cell (i.e. extrapolates from the interior). module Recon1d_EMPLM_CWK ! This file is part of MOM6. See LICENSE.md for the license. @@ -19,18 +18,20 @@ module Recon1d_EMPLM_CWK !> PLM reconstruction following Colella and Woodward, 1984 !! +!! Implemented by extending recon1d_mplm_cwk. +!! !! The source for the methods ultimately used by this class are: -!! init() -> MPLM_CWK -> PLM_CW%init() -!! reconstruct() *locally defined -!! average() -> MPLM_CWK -> PLM_CW%average() -!! f() -> MPLM_CWK -> PLM_CW%f() -!! dfdx() -> MPLM_CWK -> PLM_CW%dfdx() -!! check_reconstruction() -> MPLM_CWK%check_reconstruction() -!! unit_tests() *locally defined -!! destroy() -> MPLM_CWK -> PLM_CW%destroy() -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> MPLM_CWK%reconstruct() +!! - init() -> recon1d_mplm_cwk -> recon1d_plm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_mplm_cwk -> recon1d_plm_cw.average() +!! - f() -> recon1d_mplm_cwk -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_mplm_cwk -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() -> recon1d_mplm_cwk.check_reconstruction() +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_mplm_cwk -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> recon1d_mplm_cwk.reconstruct() type, extends (MPLM_CWK) :: EMPLM_CWK contains diff --git a/src/ALE/Recon1d_EMPLM_WA.F90 b/src/ALE/Recon1d_EMPLM_WA.F90 index 69c272f9bb..4e8125ab2f 100644 --- a/src/ALE/Recon1d_EMPLM_WA.F90 +++ b/src/ALE/Recon1d_EMPLM_WA.F90 @@ -1,7 +1,7 @@ !> Extrapolated-Monotonized Piecewise Linear Method 1D reconstruction !! -!! This extends MPLM_WA, following White and Adcroft, 2008, by extrapolating for the slopes of the -!! first and last cells. This extrapolation is used by White et al., 2009 during grid-generation. +!! This extends MPLM_WA, following White and Adcroft, 2008 \cite white2008, by extrapolating for the slopes of the +!! first and last cells. This extrapolation is used by White et al., 2009, during grid-generation. module Recon1d_EMPLM_WA ! This file is part of MOM6. See LICENSE.md for the license. @@ -15,17 +15,17 @@ module Recon1d_EMPLM_WA !> Extraplated Monotonic PLM reconstruction of White and Adcroft, 2008 !! !! The source for the methods ultimately used by this class are: -!! init() -> MPLM_WA%init() -> PLM_CW%init() -!! reconstruct() *locally defined -!! average() -> MPLM_WA%average() -> PLM_CW%average() -!! f() -> MPLM_WA%f() -> PLM_CW%f() -!! dfdx() -> MPLM_WA%dfdx() -> PLM_CW%dfdx() -!! check_reconstruction() -> MPLM_WA%check_reconstruction() -!! unit_tests() *locally defined -!! destroy() -> MPLM_WA%destroy() -> PLM_CW%destroy() -!! remap_to_sub_grid() -> MPLM_WA%remap_to_sub_grid() -> PLM_CW%remap_to_sub_grd() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> MPLM_WA%init_parent() -> PLM_CW%init() -!! reconstruct_parent() -> MPLM_WA%reconstruct() +!! - init() -> recon1d_mplm_wa -> recon1d_plm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_mplm_wa -> recon1d_plm_cw.average() +!! - f() -> recon1d_mplm_wa -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_mplm_wa -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() -> recon1d_mplm_wa.check_reconstruction() +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_mplm_wa -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_mplm_wa -> recon1d_plm_cw -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> recon1d_mplm_wa -> recon1d_plm_cw.init() +!! - reconstruct_parent() -> recon1d_mplm_wa.reconstruct() type, extends (MPLM_WA) :: EMPLM_WA contains diff --git a/src/ALE/Recon1d_EMPLM_WA_poly.F90 b/src/ALE/Recon1d_EMPLM_WA_poly.F90 index d51d1eafbf..79b6a7193a 100644 --- a/src/ALE/Recon1d_EMPLM_WA_poly.F90 +++ b/src/ALE/Recon1d_EMPLM_WA_poly.F90 @@ -1,7 +1,7 @@ !> Extrapolated-Monotonized Piecewise Linear Method 1D reconstruction !! -!! This extends MPLM_poly, following White and Adcroft, 2008, by extraplating for the slopes of the -!! first and last cells. This extrapolation is used by White et al., 2009 during grid-generation. +!! This extends MPLM_poly, following White and Adcroft, 2008 \cite white2008, by extraplating for the slopes of the +!! first and last cells. This extrapolation is used by White et al., 2009, during grid-generation. !! !! This stores and evaluates the reconstruction using a polynomial representation which is not preferred !! but was the form used in OM4. @@ -18,17 +18,17 @@ module Recon1d_EMPLM_WA_poly !> Extrapolation Limited Monotonic PLM reconstruction following White and Adcroft, 2008 !! !! The source for the methods ultimately used by this class are: -!! init() -> MPLM_WA_poly%init() -!! reconstruct() -> MPLM_WA_poly%reconstruct() -!! average() -> MPLM_WA_poly%average() -!! f() -> MPLM_WA_poly%f() -> MPLM_WA_poly%f() -> PLM_CW%f() -!! dfdx() -> MPLM_WA_poly%dfdx() -> MPLM_WA_poly%dfdx() -> PLM_CW%dfdx() -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() -> MPLM_WA_poly%destroy() -> MPLM_WA%destroy() -> PLM_CW%destroy() -!! remap_to_sub_grid() *locally defined -!! init_parent() -> MPLM_WA_poly%init() -!! reconstruct_parent() -> MPLM_WA_poly%reconstruct() +!! - init() -> recon1d_mplm_wa_poly.init() +!! - reconstruct() -> recon1d_mplm_wa_poly.reconstruct() +!! - average() -> recon1d_mplm_wa_poly.average() +!! - f() -> recon1d_mplm_wa_poly -> recon1d_mplm_wa -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_mplm_wa_poly -> recon1d_mplm_wa -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_mplm_wa_poly -> recon1d_mplm_wa -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() *locally defined +!! - init_parent() -> recon1d_mplm_wa_poly -> recon1d_mplm_wa.init() +!! - reconstruct_parent() -> recon1d_mplm_wa_poly -> recon1d_mplm_wa.reconstruct() type, extends (MPLM_WA_poly) :: EMPLM_WA_poly contains diff --git a/src/ALE/Recon1d_EPPM_CWK.F90 b/src/ALE/Recon1d_EPPM_CWK.F90 index 7d98650dea..2b9ed9853d 100644 --- a/src/ALE/Recon1d_EPPM_CWK.F90 +++ b/src/ALE/Recon1d_EPPM_CWK.F90 @@ -3,7 +3,7 @@ !! !! This implementation of PPM follows Colella and Woodward, 1984, using uniform thickness !! and with cells resorting to PCM for local extrema. First and last cells use a PLM -!! representation with linear extrapolation. +!! representation with slope set by matching the edge of the first interior cell. module Recon1d_EPPM_CWK ! This file is part of MOM6. See LICENSE.md for the license. diff --git a/src/ALE/Recon1d_MPLM_CWK.F90 b/src/ALE/Recon1d_MPLM_CWK.F90 index 33e9e999c8..dc401a8440 100644 --- a/src/ALE/Recon1d_MPLM_CWK.F90 +++ b/src/ALE/Recon1d_MPLM_CWK.F90 @@ -1,10 +1,8 @@ -!> Piecewise Linear Method 1D reconstruction +!> Piecewise Linear Method 1D reconstruction in index space !! -!! This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. The cell-wise reconstructions are limited so -!! that the edge values (which are also the extrema in a cell) are bounded by the neighbors. The -!! limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move -!! to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. +!! This implementation of PLM follows Colella and Woodward, 1984 \cite colella1984, except for assuming +!! uniform resolution so that the method is independent of grid spacing. The cell-wise reconstructions +!! are limited so that the edge values (which are also the extrema in a cell) are bounded by the neighbors. !! The first and last cells are always limited to PCM. module Recon1d_MPLM_CWK @@ -19,18 +17,20 @@ module Recon1d_MPLM_CWK !> PLM reconstruction following Colella and Woodward, 1984 !! +!! Implemented by extending recon1d_plm_cwk. +!! !! The source for the methods ultimately used by this class are: -!! init() -> MPLM_CWK -> PLM_CW%init() -!! reconstruct() *locally defined -!! average() -> MPLM_CWK -> PLM_CW%average() -!! f() -> MPLM_CWK -> PLM_CW%f() -!! dfdx() -> MPLM_CWK -> PLM_CW%dfdx() -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() -> MPLM_CWK -> PLM_CW%destroy() -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() -> recon1d_plm_cwk -> recon1d_plm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_plm_cwk -> recon1d_plm_cw.average() +!! - f() -> recon1d_plm_cwk -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_plm_cwk -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_plm_cwk -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (PLM_CWK) :: MPLM_CWK contains diff --git a/src/ALE/Recon1d_MPLM_WA.F90 b/src/ALE/Recon1d_MPLM_WA.F90 index 5f0938a518..bc085ce465 100644 --- a/src/ALE/Recon1d_MPLM_WA.F90 +++ b/src/ALE/Recon1d_MPLM_WA.F90 @@ -1,8 +1,12 @@ !> Monotonized Piecewise Linear Method 1D reconstruction !! -!! This implementation of PLM follows White and Adcroft, 2008. The PLM slopes are first limited following -!! Colella and Woodward, 1984, but are then further limited to ensure the edge values moving across cell -!! boundaries are monotone. The first and last cells are always limited to PCM. +!! This implementation of PLM follows White and Adcroft, 2008 \cite white2008. +!! The PLM slopes are first limited following Colella and Woodward, 1984, but are then +!! further limited to ensure the edge values moving across cell boundaries are monotone. +!! The first and last cells are always limited to PCM. +!! +!! This differs from recon1d_mplm_wa_poly in the internally not polynomial representations +!! are referred to. module Recon1d_MPLM_WA ! This file is part of MOM6. See LICENSE.md for the license. @@ -16,17 +20,17 @@ module Recon1d_MPLM_WA !> Limited Monotonic PLM reconstruction following White and Adcroft, 2008 !! !! The source for the methods ultimately used by this class are: -!! init() -> PLM_CW%init() -!! reconstruct() *locally defined -!! average() -> PLM_CW%average() -!! f() -> PLM_CW%f() -!! dfdx() -> PLM_CW%dfdx() -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() -> PLM_CW%destroy() -!! remap_to_sub_grid() -> PLM_CW%remap_to_sub_grd() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> PLM_CW%init() -!! reconstruct_parent() -> reconstruct() +!! - init() -> recon1d_plm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_plm_cw.average() +!! - f() -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_plm_cw -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> recon1d_plm_cw.init() +!! - reconstruct_parent() -> reconstruct() type, extends (PLM_CW) :: MPLM_WA contains diff --git a/src/ALE/Recon1d_MPLM_WA_poly.F90 b/src/ALE/Recon1d_MPLM_WA_poly.F90 index 258bf5e535..946519ed07 100644 --- a/src/ALE/Recon1d_MPLM_WA_poly.F90 +++ b/src/ALE/Recon1d_MPLM_WA_poly.F90 @@ -1,11 +1,12 @@ !> Monotonized Piecewise Linear Method 1D reconstruction using polynomial representation !! -!! This implementation of PLM follows White and Adcroft, 2008. The PLM slopes are first limited following -!! Colella and Woodward, 1984, but are then further limited to ensure the edge values moving across cell -!! boundaries are monotone. The first and last cells are always limited to PCM. +!! This implementation of PLM follows White and Adcroft, 2008 \cite white2008. +!! The PLM slopes are first limited following Colella and Woodward, 1984, but are then +!! further limited to ensure the edge values moving across cell boundaries are monotone. +!! The first and last cells are always limited to PCM. !! -!! This stores and evaluates the reconstruction using a polynomial representation which is not preferred -!! but was the form used in OM4. +!! This stores and evaluates the reconstruction using a polynomial representation which is +!! not preferred but was the form used in OM4. module Recon1d_MPLM_WA_poly ! This file is part of MOM6. See LICENSE.md for the license. @@ -19,17 +20,17 @@ module Recon1d_MPLM_WA_poly !> Limited Monotonic PLM reconstruction following White and Adcroft, 2008 !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() -> MPLM_WA%f() -> PLM_CW%f() -!! dfdx() -> MPLM_WA%dfdx() -> PLM_CW%dfdx() -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() -> MPLM_WA%destroy() -> PLM_CW%destroy() -!! remap_to_sub_grid() *locally defined -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() -> recon1d_mplm_wa -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_mplm_wa -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_mplm_wa -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() *locally defined +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (MPLM_WA) :: MPLM_WA_poly ! Legacy representation diff --git a/src/ALE/Recon1d_PLM_CW.F90 b/src/ALE/Recon1d_PLM_CW.F90 index 16fd38e0b2..bd7db150ce 100644 --- a/src/ALE/Recon1d_PLM_CW.F90 +++ b/src/ALE/Recon1d_PLM_CW.F90 @@ -1,11 +1,10 @@ !> Piecewise Linear Method 1D reconstruction !! -!! This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. The cell-wise reconstructions are limited so -!! that the edge values (which are also the extrema in a cell) are bounded by the neighbors. The -!! limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move -!! to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. -!! The first and last cells are always limited to PCM. +!! This implementation of PLM follows Colella and Woodward, 1984 \cite colella1984, with cells +!! resorting to PCM for extrema including the first and last cells in column. +!! The cell-wise reconstructions are limited so that the edge values (which are also the extrema +!! in a cell) are bounded by the neighboring cell means. +!! This does not yield monotonic profiles for the general remapping problem. module Recon1d_PLM_CW ! This file is part of MOM6. See LICENSE.md for the license. @@ -19,17 +18,17 @@ module Recon1d_PLM_CW !> PLM reconstruction following Colella and Woodward, 1984 !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() *locally defined -!! dfdx() *locally defined -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() *locally defined -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() *locally defined +!! - dfdx() *locally defined +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() *locally defined +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (Recon1d) :: PLM_CW real, allocatable :: ul(:) !< Left edge value [A] diff --git a/src/ALE/Recon1d_PLM_CWK.F90 b/src/ALE/Recon1d_PLM_CWK.F90 index ea76403f6d..b30af80aa1 100644 --- a/src/ALE/Recon1d_PLM_CWK.F90 +++ b/src/ALE/Recon1d_PLM_CWK.F90 @@ -1,11 +1,13 @@ !> Piecewise Linear Method 1D reconstruction !! -!! This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. The cell-wise reconstructions are limited so -!! that the edge values (which are also the extrema in a cell) are bounded by the neighbors. The -!! limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move -!! to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. -!! The first and last cells are always limited to PCM. +!! This implementation of PLM follows Colella and Woodward, 1984, except for assuming +!! uniform cell thicknesses. Cells resort to PCM for extrema including first and last cells in column. +!! The cell-wise reconstructions are limited so that the edge values (which are also the +!! extrema in a cell) are bounded by the neighbor cell means. However, this does not yield +!! monotonic profiles for the whole column. +!! +!! Note that internally the edge values, rather than the PLM slope, are stored to ensure +!! resulting calculations are properly bounded. module Recon1d_PLM_CWK ! This file is part of MOM6. See LICENSE.md for the license. @@ -19,18 +21,20 @@ module Recon1d_PLM_CWK !> PLM reconstruction following Colella and Woodward, 1984 !! +!! Implemented by extending recon1d_plm_cw. +!! !! The source for the methods ultimately used by this class are: -!! init() -> PLM_CW%init() -!! reconstruct() *locally defined -!! average() -> PLM_CW%average() -!! f() -> PLM_CW%f() -!! dfdx() -> PLM_CW%dfdx() -!! check_reconstruction() -> PLM_CW%check_reconstruction() -!! unit_tests() -> PLM_CW%unit_tests() -!! destroy() -> PLM_CW%destroy() -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() -> recon1d_plm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_plm_cw.average() +!! - f() -> recon1d_plm_cw.f() +!! - dfdx() -> recon1d_plm_cw.dfdx() +!! - check_reconstruction() -> recon1d_plm_cw.check_reconstruction() +!! - unit_tests() -> recon1d_plm_cw.unit_tests() +!! - destroy() -> recon1d_plm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (PLM_CW) :: PLM_CWK contains @@ -77,8 +81,7 @@ subroutine reconstruct(this, h, u) ! This is the second order slope given by equation 1.7 of ! Piecewise Parabolic Method, Colella and Woodward (1984), - ! http://dx.doi.org/10.1016/0021-991(84)90143-8. - ! For uniform resolution it simplifies to ( u_r - u_l )/2 . + ! but for uniform resolution. sigma_c = 0.5 * ( u_r - u_l ) ! Limit slope so that reconstructions are bounded by neighbors diff --git a/src/ALE/Recon1d_PLM_hybgen.F90 b/src/ALE/Recon1d_PLM_hybgen.F90 index 72ee78a9af..61f29d5d05 100644 --- a/src/ALE/Recon1d_PLM_hybgen.F90 +++ b/src/ALE/Recon1d_PLM_hybgen.F90 @@ -1,4 +1,4 @@ -!> Piecewise Linear Method 1D reconstruction +!> Piecewise Linear Method 1D reconstruction ported from "hybgen" module in Hycom. !! !! This implementation of PLM follows Colella and Woodward, 1984, with cells resorting to PCM for !! extrema including first and last cells in column. The cell-wise reconstructions are limited so @@ -6,6 +6,9 @@ !! limiter yields monotonicity for the CFL<1 transport problem where parts of a cell can only move !! to a neighboring cell, but does not yield monotonic profiles for the general remapping problem. !! The first and last cells are always limited to PCM. +!! +!! The mom_hybgen_remap.hybgen_plm_coefs() function calculates PLM coefficients numerically +!! equiavalent to the recon1d_plm_hybgen module (this implementation). module Recon1d_PLM_hybgen ! This file is part of MOM6. See LICENSE.md for the license. @@ -16,20 +19,22 @@ module Recon1d_PLM_hybgen public PLM_hybgen, testing -!> PLM reconstruction following Colella and Woodward, 1984 +!> PLM reconstruction following "hybgen". +!! +!! This implementation is a refactor of hybgen_plm_coefs() from mom_hybgen_remap. !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() *locally defined -!! dfdx() *locally defined -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() *locally defined -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() *locally defined +!! - dfdx() *locally defined +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() *locally defined +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (Recon1d) :: PLM_hybgen real, allocatable :: ul(:) !< Left edge value [A] diff --git a/src/ALE/Recon1d_PPM_CW.F90 b/src/ALE/Recon1d_PPM_CW.F90 index a0d70b4de3..4cca6c87e2 100644 --- a/src/ALE/Recon1d_PPM_CW.F90 +++ b/src/ALE/Recon1d_PPM_CW.F90 @@ -1,7 +1,12 @@ !> Piecewise Parabolic Method 1D reconstruction following Colella and Woodward, 1984 !! -!! This implementation of PPM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. +!! This is a near faithful implementation of PPM follows Colella and Woodward, 1984, with +!! cells resorting to PCM for extrema including first and last cells in column. The +!! only exception is that the PLM slopes used for edge interpolation are not set to zero +!! for the first and last cells, but are side-differenced. This improves accuracy of edge +!! values near boundaries and reduces the adverse influence of the boundaries on the +!! interior reconstructions. The final PPM reconstruction in the first and last cells are +!! set to PCM. The reconstructions are grid-spacing dependent, and so quasi-forth order in h. module Recon1d_PPM_CW ! This file is part of MOM6. See LICENSE.md for the license. @@ -13,20 +18,20 @@ module Recon1d_PPM_CW public PPM_CW, testing -!> PPM reconstruction following White and Adcroft, 2008 +!> PPM reconstruction following Colella and Woordward, 1984. !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() *locally defined -!! dfdx() *locally defined -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() *locally defined -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() *locally defined +!! - dfdx() *locally defined +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() *locally defined +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (Recon1d) :: PPM_CW real, allocatable :: ul(:) !< Left edge value [A] @@ -112,6 +117,9 @@ subroutine reconstruct(this, h, u) slp(k) = this%PLM%ur(k) - this%PLM%ul(k) enddo ! Extrapolate from interior for boundary PLM slopes + ! Note: this is not conventional but helps retain accuracy near top/bottom + ! boudaries and reduces the adverse influence of the boudnaries int he interior + ! reconstructions. The final PPM reconstruction is still bounded to PCM. slp(1) = 2.0 * ( this%PLM%ul(2) - u(1) ) slp(n) = 2.0 * ( u(n) - this%PLM%ur(n-1) ) @@ -140,11 +148,9 @@ subroutine reconstruct(this, h, u) this%ul(k) = edge enddo this%ul(1) = u(1) ! PCM - this%ur(1) = u(1) ! PCM (remove for PLM) - !this%ul(1) = u(1) + ( u(1) - this%ur(1) ) ! Linear extrapolation or PCM + this%ur(1) = u(1) ! PCM this%ur(n) = u(n) ! PCM - this%ul(n) = u(n) ! PCM (remove for PLM) - !this%ur(n) = u(n) + ( u(n) - this%ul(n) ) ! Linear extrapolation or PCM + this%ul(n) = u(n) ! PCM do K = 2, n ! K=2 is interface between cells 1 and 2 u0 = u(k-1) diff --git a/src/ALE/Recon1d_PPM_CWK.F90 b/src/ALE/Recon1d_PPM_CWK.F90 index 4eeb1f960e..d795c72011 100644 --- a/src/ALE/Recon1d_PPM_CWK.F90 +++ b/src/ALE/Recon1d_PPM_CWK.F90 @@ -1,7 +1,13 @@ -!> Piecewise Parabolic Method 1D reconstruction following Colella and Woodward, 1984 +!> Piecewise Parabolic Method 1D reconstruction in model index space !! -!! This implementation of PPM follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. +!! This implementation of PPM follows Colella and Woodward, 1984, using uniform thickness +!! and with cells resorting to PCM for local extrema including the first and last cells. +!! +!! "Fourth order" estimates of edge values use PLM also calculated in index space +!! (i.e. with no grid dependence). First and last PLM slopes are extrapolated. +!! Limiting follows Colella and Woodward thereafter. The high accuracy of this scheme is +!! realized only when the grid-spacing is exactly uniform. This scheme deviates from CW84 +!! when the grid spacing is variable. module Recon1d_PPM_CWK ! This file is part of MOM6. See LICENSE.md for the license. @@ -13,20 +19,20 @@ module Recon1d_PPM_CWK public PPM_CWK, testing -!> PPM reconstruction following White and Adcroft, 2008 +!> PPM reconstruction in index space (no grid dependence). !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() *locally defined -!! dfdx() *locally defined -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() *locally defined -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() *locally defined +!! - dfdx() *locally defined +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() *locally defined +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (Recon1d) :: PPM_CWK real, allocatable :: ul(:) !< Left edge value [A] @@ -108,6 +114,9 @@ subroutine reconstruct(this, h, u) slp(k) = this%PLM%ur(k) - this%PLM%ul(k) enddo ! Extrapolate from interior for boundary PLM slopes + ! Note: this is not conventional but helps retain accuracy near top/bottom + ! boudaries and reduces the adverse influence of the boudnaries int he interior + ! reconstructions. The final PPM reconstruction is still bounded to PCM. slp(1) = 2.0 * ( this%PLM%ul(2) - u(1) ) slp(n) = 2.0 * ( u(n) - this%PLM%ur(n-1) ) @@ -353,7 +362,7 @@ logical function unit_tests(this, verbose, stdout, stderr) ! f[i] = 1/8 [ x^3 ] for means ! edges: 0, 1, 12, 27, 48, 75 ! means: 1, 7, 19, 37, 61 - ! cengters: 0.75, 6.75, 18.75, 36.75, 60.75 + ! centers: 0.75, 6.75, 18.75, 36.75, 60.75 call this%reconstruct( (/2.,2.,2.,2.,2./), (/1.,7.,19.,37.,61./) ) do k = 1, 5 ul(k) = this%f(k, 0.) diff --git a/src/ALE/Recon1d_PPM_H4_2018.F90 b/src/ALE/Recon1d_PPM_H4_2018.F90 index e7ab92725b..d668b70ace 100644 --- a/src/ALE/Recon1d_PPM_H4_2018.F90 +++ b/src/ALE/Recon1d_PPM_H4_2018.F90 @@ -1,9 +1,11 @@ -!> Piecewise Parabolic Method 1D reconstruction with h4 interpolation for edges +!> Piecewise Parabolic Method 1D reconstruction with h4 interpolation for edges (2018 version) !! -!! This implementation of PPM ostensbily follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. ++++++++++++++++++++++ -!! The first and last cells are always limited to PCM. +!! This implementation of PPM follows White and Adcroft 2008 \cite white2008, with cells +!! resorting to PCM for extrema including first and last cells in column. +!! This scheme differs from Colella and Woodward, 1984 \cite colella1984, in the method +!! of first estimating the fourth-order accurate edge values. !! This uses numerical expressions that predate a 2019 refactoring. +!! The first and last cells are always limited to PCM. module Recon1d_PPM_H4_2018 ! This file is part of MOM6. See LICENSE.md for the license. @@ -18,18 +20,20 @@ module Recon1d_PPM_H4_2018 !> PPM reconstruction following White and Adcroft, 2008 !! +!! Implemented by extending recon1d_ppm_h4_2019. +!! !! The source for the methods ultimately used by this class are: -!! init() -> PPM_H4_2019%init() -!! reconstruct() *locally defined -!! average() -> PPM_H4_2019%average() -!! f() -> PPM_H4_2019%f() -!! dfdx() -> PPM_H4_2019%dfdx() -!! check_reconstruction() -> PPM_H4_2019%check_reconstruction() -!! unit_tests() *locally defined -!! destroy() -> PPM_H4_2019%destroy() -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> PPM_H4_2019%init() -!! reconstruct_parent() -> PPM_H4_2019%reconstruct() +!! - init() -> recon1d_ppm_h4_2019.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_ppm_h4_2019.average() +!! - f() -> recon1d_ppm_h4_2019.f() +!! - dfdx() -> recon1d_ppm_h4_2019.dfdx() +!! - check_reconstruction() -> recon1d_ppm_h4_2019.check_reconstruction() +!! - unit_tests() *locally defined +!! - destroy() -> recon1d_ppm_h4_2019.destroy() +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> recon1d_ppm_h4_2019.init() +!! - reconstruct_parent() -> recon1d_ppm_h4_2019.reconstruct() type, extends (PPM_H4_2019) :: PPM_H4_2018 contains diff --git a/src/ALE/Recon1d_PPM_H4_2019.F90 b/src/ALE/Recon1d_PPM_H4_2019.F90 index d005556f11..d01ff3fb2b 100644 --- a/src/ALE/Recon1d_PPM_H4_2019.F90 +++ b/src/ALE/Recon1d_PPM_H4_2019.F90 @@ -1,9 +1,11 @@ !> Piecewise Parabolic Method 1D reconstruction with h4 interpolation for edges !! -!! This implementation of PPM ostensbily follows Colella and Woodward, 1984, with cells resorting to PCM for -!! extrema including first and last cells in column. ++++++++++++++++++++++ -!! The first and last cells are always limited to PCM. +!! This implementation of PPM follows White and Adcroft 2008 \cite white2008, with cells +!! resorting to PCM for extrema including first and last cells in column. +!! This scheme differs from Colella and Woodward, 1984 \cite colella1984, in the method +!! of first estimating the fourth-order accurate edge values. !! This uses numerical expressions refactored at the beginning of 2019. +!! The first and last cells are always limited to PCM. module Recon1d_PPM_H4_2019 ! This file is part of MOM6. See LICENSE.md for the license. @@ -17,17 +19,17 @@ module Recon1d_PPM_H4_2019 !> PPM reconstruction following White and Adcroft, 2008 !! !! The source for the methods ultimately used by this class are: -!! init() *locally defined -!! reconstruct() *locally defined -!! average() *locally defined -!! f() *locally defined -!! dfdx() *locally defined -!! check_reconstruction() *locally defined -!! unit_tests() *locally defined -!! destroy() *locally defined -!! remap_to_sub_grid() -> Recon1d%remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() *locally defined +!! - reconstruct() *locally defined +!! - average() *locally defined +!! - f() *locally defined +!! - dfdx() *locally defined +!! - check_reconstruction() *locally defined +!! - unit_tests() *locally defined +!! - destroy() *locally defined +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (Recon1d) :: PPM_H4_2019 real, allocatable :: ul(:) !< Left edge value [A] diff --git a/src/ALE/Recon1d_PPM_hybgen.F90 b/src/ALE/Recon1d_PPM_hybgen.F90 index eaa8ec0d1c..bc87f7c3da 100644 --- a/src/ALE/Recon1d_PPM_hybgen.F90 +++ b/src/ALE/Recon1d_PPM_hybgen.F90 @@ -1,12 +1,13 @@ !> Piecewise Parabolic Method 1D reconstruction following Colella and Woodward, 1984 !! -!! This implementation of PPM follows Colella and Woodward, 1984 \cite Colella_Woodward_1984, with -!! cells resorting to PCM for extrema including first and last cells in column. The algorihtm was -!! first ported from Hycom as !! hybgen_ppm_coefs() in the mom_hybgen_remap module. This module is -!! a refactor to faciliate more complete testing and evaluation. +!! This implementation of PPM follows Colella and Woodward, 1984 \cite colella1984, with +!! cells resorting to PCM for extrema including first and last cells in column. The algorithm was +!! first ported from Hycom as hybgen_ppm_coefs() in the mom_hybgen_remap module. This module is +!! a refactor to facilitate more complete testing and evaluation. !! -!! The "PPM_CW" and "PPM_HYGEN" methods of mom_remapping are equivalent, and similarly -!! recon1d_ppm_hybgen (this implementatino) is equivalent also. +!! The mom_hybgen_remap.hybgen_ppm_coefs() function (reached with "PPM_HYGEN"), +!! regrid_edge_values.edge_values_explicit_h4cw() function followed by ppm_functions.ppm_reconstruction() +!! (reached with "PPM_CW"), are equivalent. Similarly recon1d_ppm_hybgen (this implementation) is equivalent also. module Recon1d_PPM_hybgen ! This file is part of MOM6. See LICENSE.md for the license. @@ -23,17 +24,17 @@ module Recon1d_PPM_hybgen !! Implemented by extending recon1d_ppm_cwk. !! !! The source for the methods ultimately used by this class are: -!! init() -> recon1d_ppm_cw..init() -!! reconstruct() *locally defined -!! average() -> recon1d_ppm_cw..average() -!! f() -> recon1d_ppm_cw..f() -!! dfdx() -> recon1d_ppm_cw..dfdx() -!! check_reconstruction() *locally defined -!! unit_tests() -> recon1d_ppm_cw..unit_tests() -!! destroy() -> recon1d_ppm_cw..destroy() -!! remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() -!! init_parent() -> init() -!! reconstruct_parent() -> reconstruct() +!! - init() -> recon1d_ppm_cw.init() +!! - reconstruct() *locally defined +!! - average() -> recon1d_ppm_cw.average() +!! - f() -> recon1d_ppm_cw.f() +!! - dfdx() -> recon1d_ppm_cw.dfdx() +!! - check_reconstruction() *locally defined +!! - unit_tests() -> recon1d_ppm_cw.unit_tests() +!! - destroy() -> recon1d_ppm_cw.destroy() +!! - remap_to_sub_grid() -> recon1d_type.remap_to_sub_grid() +!! - init_parent() -> init() +!! - reconstruct_parent() -> reconstruct() type, extends (PPM_CW) :: PPM_hybgen contains