Skip to content

Commit

Permalink
Merge branch 'development' into refluxing
Browse files Browse the repository at this point in the history
  • Loading branch information
asalmgren authored Nov 3, 2023
2 parents 905091b + 17ba397 commit 8988142
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 20 deletions.
13 changes: 13 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
#23.11

-- AMReX submodule set to 23.11 release hash (ae7b64b)

-- Bug fix with vertical grid stretching and MOST (#1275)

-- Bug fix with negative K_turb below surface and MYNN2.5 PBL model (#1271)

-- Correction to equation of state with moisture (#1263)

-- Generalized multi-level sponge zones. This allows for nudging of fine solution
towards coarse solution with complex box arrays. (#1233)

# 23.10

-- First release since JOSS paper. Too many key ERF PRs to summarize.
Expand Down
27 changes: 17 additions & 10 deletions Source/BoundaryConditions/MOSTStress.H
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct adiabatic_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -202,7 +202,7 @@ struct adiabatic_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -260,7 +260,7 @@ struct surface_flux
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -323,7 +323,7 @@ struct surface_flux_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -387,7 +387,7 @@ struct surface_flux_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -447,7 +447,7 @@ struct surface_temp
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -512,7 +512,7 @@ struct surface_temp_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -578,7 +578,7 @@ struct surface_temp_mod_charnock
private:
most_data mdata;
similarity_funs sfuns;
amrex::Real tol = 1.0e-5;
const amrex::Real tol = 1.0e-5;
};


Expand Down Expand Up @@ -639,6 +639,7 @@ struct moeng_flux
rho = cons_arr(ic,jc,zlo,Rho_comp);
theta = cons_arr(ic,jc,zlo,RhoTheta_comp) / rho;
eta = eta_arr(ie,je,zlo,EddyDiff::Theta_v); // == rho * alpha [kg/m^3 * m^2/s]
eta = amrex::max(eta,eps);

amrex::Real theta_mean = tm_arr(ic,jc,zlo);
amrex::Real wsp_mean = umm_arr(ic,jc,zlo);
Expand All @@ -649,7 +650,7 @@ struct moeng_flux
amrex::Real wsp = sqrt(velx*velx+vely*vely);
amrex::Real num1 = (theta-theta_mean)*wsp_mean;
amrex::Real num2 = (theta_mean-theta_surf)*wsp;
amrex::Real moflux = (std::abs(tstar) > EPS) ?
amrex::Real moflux = (std::abs(tstar) > eps) ?
tstar*ustar*(num1+num2)/((theta_mean-theta_surf)*wsp_mean) : 0.0;
amrex::Real deltaz = dz * (zlo - k);

Expand Down Expand Up @@ -700,6 +701,7 @@ struct moeng_flux
+ cons_arr(ic ,jc,zlo,Rho_comp) );
eta = 0.5 *( eta_arr(ie-1,je,zlo,EddyDiff::Mom_v)
+ eta_arr(ie ,je,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real umean = um_arr(i,j,zlo);
amrex::Real wsp_mean = 0.5 * ( umm_arr(ic-1,jc,zlo) + umm_arr(ic,jc,zlo) );
Expand Down Expand Up @@ -763,6 +765,7 @@ struct moeng_flux
+ cons_arr(ic,jc ,zlo,Rho_comp) );
eta = 0.5*( eta_arr(ie,je-1,zlo,EddyDiff::Mom_v)
+ eta_arr(ie,je ,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real vmean = vm_arr(i,j,zlo);
amrex::Real wsp_mean = 0.5 * ( umm_arr(ic,jc-1,zlo) + umm_arr(ic,jc,zlo) );
Expand All @@ -784,7 +787,7 @@ struct moeng_flux

private:
int zlo;
static constexpr amrex::Real EPS = 1e-16;
const amrex::Real eps = 1e-16;
};


Expand Down Expand Up @@ -833,6 +836,7 @@ struct donelan_flux
rho = cons_arr(ic,jc,zlo,Rho_comp);
theta = cons_arr(ic,jc,zlo,RhoTheta_comp) / rho;
eta = eta_arr(ie,je,zlo,EddyDiff::Theta_v); // == rho * alpha [kg/m^3 * m^2/s]
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.0012;
amrex::Real wsp_mean = umm_arr(ic,jc,zlo);
Expand Down Expand Up @@ -888,6 +892,7 @@ struct donelan_flux
+ cons_arr(ic ,jc,zlo,Rho_comp) );
eta = 0.5 *( eta_arr(ie-1,je,zlo,EddyDiff::Mom_v)
+ eta_arr(ie ,je,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.001;
const amrex::Real c = 7e-5;
Expand Down Expand Up @@ -955,6 +960,7 @@ struct donelan_flux
+ cons_arr(ic,jc ,zlo,Rho_comp) );
eta = 0.5*( eta_arr(ie,je-1,zlo,EddyDiff::Mom_v)
+ eta_arr(ie,je ,zlo,EddyDiff::Mom_v) );
eta = amrex::max(eta,eps);

amrex::Real Cd = 0.001;
const amrex::Real c = 7e-5;
Expand All @@ -980,5 +986,6 @@ struct donelan_flux

private:
int zlo;
const amrex::Real eps = 1e-16;
};
#endif
20 changes: 11 additions & 9 deletions Source/Diffusion/ComputeTurbulentViscosity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void ComputeTurbulentViscosityLES (const amrex::MultiFab& Tau11, const amrex::Mu
for ( amrex::MFIter mfi(eddyViscosity,amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
{
Box bxcc = mfi.tilebox();
Box planex = bxcc; planex.setSmall(0, 1); planex.setBig(0, ngc);
Box planex = bxcc; planex.setSmall(0, 1); planex.setBig(0, ngc); planex.grow(1,1);
Box planey = bxcc; planey.setSmall(1, 1); planey.setBig(1, ngc);
int i_lo = bxcc.smallEnd(0); int i_hi = bxcc.bigEnd(0);
int j_lo = bxcc.smallEnd(1); int j_hi = bxcc.bigEnd(1);
Expand All @@ -202,19 +202,21 @@ void ComputeTurbulentViscosityLES (const amrex::MultiFab& Tau11, const amrex::Mu

const Array4<Real>& mu_turb = eddyViscosity.array(mfi);

// Extrapolate outside the domain in lateral directions
// Extrapolate outside the domain in lateral directions (planex owns corner cells)
if (i_lo == domain.smallEnd(0)) {
amrex::ParallelFor(planex, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
mu_turb(i_lo-i, j, k, EddyDiff::Mom_h) = mu_turb(i_lo, j, k, EddyDiff::Mom_h);
mu_turb(i_lo-i, j, k, EddyDiff::Mom_v) = mu_turb(i_lo, j, k, EddyDiff::Mom_v);
int lj = amrex::min(amrex::max(j, domain.smallEnd(1)), domain.bigEnd(1));
mu_turb(i_lo-i, j, k, EddyDiff::Mom_h) = mu_turb(i_lo, lj, k, EddyDiff::Mom_h);
mu_turb(i_lo-i, j, k, EddyDiff::Mom_v) = mu_turb(i_lo, lj, k, EddyDiff::Mom_v);
});
}
if (i_hi == domain.bigEnd(0)) {
amrex::ParallelFor(planex, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
mu_turb(i_hi+i, j, k, EddyDiff::Mom_h) = mu_turb(i_hi, j, k, EddyDiff::Mom_h);
mu_turb(i_hi+i, j, k, EddyDiff::Mom_v) = mu_turb(i_hi, j, k, EddyDiff::Mom_v);
int lj = amrex::min(amrex::max(j, domain.smallEnd(1)), domain.bigEnd(1));
mu_turb(i_hi+i, j, k, EddyDiff::Mom_h) = mu_turb(i_hi, lj, k, EddyDiff::Mom_h);
mu_turb(i_hi+i, j, k, EddyDiff::Mom_v) = mu_turb(i_hi, lj, k, EddyDiff::Mom_v);
});
}
if (j_lo == domain.smallEnd(1)) {
Expand Down Expand Up @@ -336,9 +338,9 @@ void ComputeTurbulentViscosityLES (const amrex::MultiFab& Tau11, const amrex::Mu
mu_turb(i, j, k_hi+k, indx_v) = mu_turb(i, j, k_hi, indx_v);
});
break;
}
}
}
}
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Submodules/AMReX
Submodule AMReX updated 86 files
+1 −0 .codespell-ignore-words
+127 −0 .github/workflows/bittree.yml
+1 −1 .github/workflows/cleanup-cache.yml
+1 −0 .github/workflows/intel.yml
+60 −59 .github/workflows/windows.yml
+49 −0 CHANGES
+19 −1 Docs/sphinx_documentation/source/Basics.rst
+7 −3 Docs/sphinx_documentation/source/GPU.rst
+13 −0 Docs/sphinx_documentation/source/Python_Chapter.rst
+1 −0 Docs/sphinx_documentation/source/index.rst
+3 −0 GNUmakefile.in
+1 −1 Src/Amr/AMReX_Amr.cpp
+1 −1 Src/Amr/AMReX_StateDescriptor.cpp
+2 −2 Src/AmrCore/AMReX_AmrCore.cpp
+12 −1 Src/AmrCore/AMReX_AmrMesh.H
+142 −4 Src/AmrCore/AMReX_AmrMesh.cpp
+2 −1 Src/AmrCore/Make.package
+4 −0 Src/Base/AMReX.cpp
+6 −5 Src/Base/AMReX_BCUtil.H
+2 −2 Src/Base/AMReX_BCUtil.cpp
+4 −4 Src/Base/AMReX_BC_TYPES.H
+1 −1 Src/Base/AMReX_CoordSys.H
+1 −1 Src/Base/AMReX_FACopyDescriptor.H
+3 −3 Src/Base/AMReX_FArrayBox.H
+1 −1 Src/Base/AMReX_FILCC_1D.F90
+1 −1 Src/Base/AMReX_FILCC_2D.F90
+1 −1 Src/Base/AMReX_FILCC_3D.F90
+6 −6 Src/Base/AMReX_FilCC_C.cpp
+1 −1 Src/Base/AMReX_IArrayBox.H
+1 −1 Src/Base/AMReX_NonLocalBC.H
+2 −2 Src/Base/AMReX_RealVect.H
+1 −1 Src/Base/AMReX_VisMF.cpp
+4 −0 Src/Base/AMReX_VisMFBuffer.H
+2 −0 Src/Base/AMReX_bc_types.fi
+1 −0 Src/Base/AMReX_bc_types_mod.F90
+6 −6 Src/Base/AMReX_filcc_mod.F90
+33 −6 Src/EB/AMReX_EB2_2D_C.cpp
+2 −2 Src/EB/AMReX_EB_StateRedistribute.cpp
+74 −0 Src/Extern/Bittree/AMReX_Bittree.H
+388 −0 Src/Extern/Bittree/AMReX_Bittree.cpp
+11 −0 Src/Extern/Bittree/CMakeLists.txt
+5 −0 Src/Extern/Bittree/Make.package
+3 −2 Src/Extern/HDF5/AMReX_ParticleHDF5.H
+1 −1 Src/Extern/HYPRE/AMReX_HypreNodeLap.cpp
+1 −1 Src/Extern/HYPRE/AMReX_HypreSolver.H
+416 −0 Src/F_Interfaces/AmrCore/AMReX_FlashFluxRegister.H
+18 −262 Src/F_Interfaces/AmrCore/AMReX_FlashFluxRegister.cpp
+35 −0 Src/F_Interfaces/AmrCore/AMReX_flash_fluxregister_fi.cpp
+75 −10 Src/F_Interfaces/AmrCore/AMReX_flash_fluxregister_mod.F90
+4 −0 Src/LinearSolvers/CMakeLists.txt
+1 −14 Src/LinearSolvers/MLMG/AMReX_MLEBNodeFDLaplacian.cpp
+30 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLap_1D_K.H
+67 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLap_2D_K.H
+93 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLap_3D_K.H
+13 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLap_K.H
+88 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.H
+348 −0 Src/LinearSolvers/MLMG/AMReX_MLNodeABecLaplacian.cpp
+17 −79 Src/LinearSolvers/MLMG/AMReX_MLNodeLap_2D_K.H
+0 −4 Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian.H
+3 −6 Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_eb.cpp
+1 −1 Src/LinearSolvers/MLMG/AMReX_MLNodeLaplacian_sten.cpp
+7 −1 Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.H
+1 −1 Src/LinearSolvers/MLMG/AMReX_MLNodeLinOp.cpp
+3 −0 Src/LinearSolvers/MLMG/Make.package
+1 −0 Tests/Amr/Advection_AmrCore/Exec/GNUmakefile
+81 −0 Tests/Amr/Advection_AmrCore/Exec/inputs_bittree
+1 −1 Tests/FortranInterface/Advection_F/Source/fillpatch_mod.F90
+1 −1 Tests/GPU/CNS/Source/CNS_bcfill.cpp
+1 −1 Tests/HDF5Benchmark/sz.config
+5 −1 Tests/LinearSolvers/ABecLaplacian_C/MyTest.H
+64 −6 Tests/LinearSolvers/ABecLaplacian_C/MyTest.cpp
+13 −0 Tests/LinearSolvers/ABecLaplacian_C/MyTestPlotfile.cpp
+37 −0 Tests/LinearSolvers/ABecLaplacian_C/initProb.cpp
+70 −0 Tests/LinearSolvers/ABecLaplacian_C/initProb_K.H
+16 −0 Tests/LinearSolvers/ABecLaplacian_C/inputs-node
+30 −8 Tools/CMake/AMReXBuildInfo.cmake
+1 −1 Tools/CMake/AMReXClangTidy.cmake
+21 −10 Tools/CMake/AMReXInstallHelpers.cmake
+6 −2 Tools/CMake/AMReXTypecheck.cmake
+0 −244 Tools/CMake/FindFilesystem.cmake
+1 −1 Tools/C_scripts/mkdep
+6 −0 Tools/GNUMake/Make.defs
+16 −0 Tools/GNUMake/packages/Make.bittree
+0 −8 Tools/Plotfile/CMakeLists.txt
+1 −2 Tools/Plotfile/fgradient.cpp
+5 −0 Tools/libamrex/configure.py

0 comments on commit 8988142

Please sign in to comment.