From 15da6086600e9774925a6e314b645ed38b96bf68 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Mon, 2 Dec 2024 19:05:32 -0800 Subject: [PATCH 1/4] change to single component bc_ptr --- .../BoundaryConditions_netcdf.cpp | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp b/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp index daaa6fe..566e384 100644 --- a/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp +++ b/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp @@ -40,7 +40,6 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const const auto& mf_index_type = mf_to_fill.boxArray().ixType(); domain.convert(mf_index_type); - const auto& dom_lo = amrex::lbound(domain); const auto& dom_hi = amrex::ubound(domain); @@ -161,8 +160,11 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const const Array4& msku = vec_msku[lev]->const_array(mfi); const Array4& mskv = vec_mskv[lev]->const_array(mfi); - Vector bcrs(ncomp); - amrex::setBC(mf_box, domain, bccomp, 0, ncomp, domain_bcs_type, bcrs); + // + // We are inside a loop over components so we do one at a time here + // + Vector bcrs(1); + amrex::setBC(mf_box, domain, bccomp+icomp, 0, 1, domain_bcs_type, bcrs); // xlo: ori = 0 // ylo: ori = 1 @@ -171,12 +173,8 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const // yhi: ori = 4 // zhi: ori = 5 - amrex::Gpu::DeviceVector bcrs_d(ncomp); -#ifdef AMREX_USE_GPU - Gpu::htod_memcpy_async(bcrs_d.data(), bcrs.data(), sizeof(BCRec)*ncomp); -#else - std::memcpy(bcrs_d.data(), bcrs.data(), sizeof(BCRec)*ncomp); -#endif + amrex::Gpu::DeviceVector bcrs_d(1); + Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); const amrex::BCRec* bc_ptr = bcrs_d.data(); if (!xlo.isEmpty()) { @@ -184,9 +182,9 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const { Real bry_val = (oma * bdatxlo_n (ubound(xlo).x,j,k,0) + alpha * bdatxlo_np1(ubound(xlo).x,j,k,0)); - if (bc_ptr[icomp].lo(0) == REMORABCType::clamped) { + if (bc_ptr[0].lo(0) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(0) == REMORABCType::flather) { + } else if (bc_ptr[0].lo(0) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaxlo_n(ubound(xlo).x-1,j,k,0) + alpha * bdatzetaxlo_np1(ubound(xlo).x-1,j,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(dom_lo.x-1,j,0) + zeta_arr(dom_lo.x-1,j,0,icomp_calc) + h_arr(dom_lo.x,j,0) + zeta_arr(dom_lo.x,j,0,icomp_calc))); @@ -194,7 +192,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val - Cx * (0.5_rt * (zeta_arr(dom_lo.x-1,j,0,icomp_calc) + zeta_arr(dom_lo.x,j,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(0) == REMORABCType::chapman) { + } else if (bc_ptr[0].lo(0) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pm(dom_lo.x,j-mf_index_type[1],0) + pm(dom_lo.x,j,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(dom_lo.x,j-mf_index_type[1],0) + zeta_arr(dom_lo.x,j-mf_index_type[1],0,icomp_calc) + h_arr(dom_lo.x,j,0) @@ -203,7 +201,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Cx); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(dom_lo.x-1,j,k,icomp_calc) + Cx * dest_arr(dom_lo.x,j,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(0) == REMORABCType::orlanski_rad_nudge) { + } else if (bc_ptr[0].lo(0) == REMORABCType::orlanski_rad_nudge) { Real grad_lo_im1 = (calc_arr(dom_lo.x+mf_index_type[0]-1,j ,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x-1+mf_index_type[0],j-1,k,icomp+icomp_to_fill)); Real grad_lo = (calc_arr(dom_lo.x+mf_index_type[0] ,j ,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x +mf_index_type[0],j-1,k,icomp+icomp_to_fill)); Real grad_lo_imjp1 = (calc_arr(dom_lo.x+mf_index_type[0]-1,j+1,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x-1+mf_index_type[0],j ,k,icomp+icomp_to_fill)); @@ -241,9 +239,9 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const { Real bry_val = (oma * bdatxhi_n (lbound(xhi).x,j,k,0) + alpha * bdatxhi_np1(lbound(xhi).x,j,k,0)); - if (bc_ptr[icomp].hi(0) == REMORABCType::clamped) { + if (bc_ptr[0].hi(0) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(0) == REMORABCType::flather) { + } else if (bc_ptr[0].hi(0) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaxhi_n(lbound(xhi).x,j,k,0) + alpha * bdatzetaxhi_np1(lbound(xhi).x,j,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(dom_hi.x-1,j,0) + zeta_arr(dom_hi.x-1,j,0,icomp_calc) + h_arr(dom_hi.x,j,0) + zeta_arr(dom_hi.x,j,0,icomp_calc))); @@ -251,7 +249,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val + Cx * (0.5_rt * (zeta_arr(dom_hi.x-1,j,0,icomp_calc) + zeta_arr(dom_hi.x,j,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(0) == REMORABCType::chapman) { + } else if (bc_ptr[0].hi(0) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pm(dom_hi.x,j-mf_index_type[1],0) + pm(dom_hi.x,j,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(dom_hi.x,j-mf_index_type[1],0) + zeta_arr(dom_hi.x,j-mf_index_type[1],0,icomp_calc) + h_arr(dom_hi.x,j,0) @@ -260,7 +258,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Cx); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(dom_hi.x+1,j,k,icomp_calc) + Cx * dest_arr(dom_hi.x,j,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(0) == REMORABCType::orlanski_rad_nudge) { + } else if (bc_ptr[0].hi(0) == REMORABCType::orlanski_rad_nudge) { Real grad_hi = (calc_arr(dom_hi.x-mf_index_type[0] ,j ,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0] ,j-1,k,icomp+icomp_to_fill)); Real grad_hi_ip1 = (calc_arr(dom_hi.x-mf_index_type[0]+1,j ,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0]+1,j-1,k,icomp+icomp_to_fill)); Real grad_hi_jp1 = (calc_arr(dom_hi.x-mf_index_type[0] ,j+1,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0] ,j ,k,icomp+icomp_to_fill)); @@ -299,9 +297,9 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const { Real bry_val = (oma * bdatylo_n (i,ubound(ylo).y,k,0) + alpha * bdatylo_np1(i,ubound(ylo).y,k,0)); - if (bc_ptr[icomp].lo(1) == REMORABCType::clamped) { + if (bc_ptr[0].lo(1) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(1) == REMORABCType::flather) { + } else if (bc_ptr[0].lo(1) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaylo_n (i,ubound(ylo).y-1,k,0) + alpha * bdatzetaylo_np1(i,ubound(ylo).y-1,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(i,dom_lo.y-1,0) + zeta_arr(i,dom_lo.y-1,0,icomp_calc) @@ -310,7 +308,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val - Ce * (0.5_rt * (zeta_arr(i,dom_lo.y-1,0,icomp_calc) + zeta_arr(i,dom_lo.y,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(1) == REMORABCType::chapman) { + } else if (bc_ptr[0].lo(1) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pn(i-mf_index_type[0],dom_lo.y,0) + pn(i,dom_lo.y,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(i-mf_index_type[0],dom_lo.y,0) + zeta_arr(i-mf_index_type[0],dom_lo.y,0,icomp_calc) + h_arr(i,dom_lo.y,0) @@ -319,7 +317,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Ce); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(i,dom_lo.y-1,k,icomp_calc) + Ce * dest_arr(i,dom_lo.y,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].lo(1) == REMORABCType::orlanski_rad_nudge) { + } else if (bc_ptr[0].lo(1) == REMORABCType::orlanski_rad_nudge) { Real grad_lo = (calc_arr(i ,dom_lo.y+mf_index_type[1], k,icomp+icomp_to_fill) - calc_arr(i-1,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill)); Real grad_lo_jm1 = (calc_arr(i ,dom_lo.y+mf_index_type[1]-1,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_lo.y+mf_index_type[1]-1,k,icomp+icomp_to_fill)); Real grad_lo_ip1 = (calc_arr(i+1,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i ,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill)); @@ -358,9 +356,9 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const { Real bry_val = (oma * bdatyhi_n (i,lbound(yhi).y,k,0) + alpha * bdatyhi_np1(i,lbound(yhi).y,k,0)) * mask_arr(i,j,0); - if (bc_ptr[icomp].hi(1) == REMORABCType::clamped) { + if (bc_ptr[0].hi(1) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(1) == REMORABCType::flather) { + } else if (bc_ptr[0].hi(1) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetayhi_n (i,lbound(yhi).y,k,0) + alpha * bdatzetayhi_np1(i,lbound(yhi).y,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(i,dom_hi.y-1,0) + zeta_arr(i,dom_hi.y-1,0,icomp_calc) @@ -369,7 +367,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val + Ce * (0.5_rt * (zeta_arr(i,dom_hi.y-1,0,icomp_calc) + zeta_arr(i,dom_hi.y,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(1) == REMORABCType::chapman) { + } else if (bc_ptr[0].hi(1) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pn(i-mf_index_type[0],dom_hi.y,0) + pn(i,dom_hi.y,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(i-mf_index_type[0],dom_hi.y,0) + zeta_arr(i-mf_index_type[0],dom_hi.y,0,icomp_calc) + @@ -378,7 +376,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Ce); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(i,dom_hi.y+1,k,icomp_calc) + Ce * dest_arr(i,dom_hi.y,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[icomp].hi(1) == REMORABCType::orlanski_rad_nudge) { + } else if (bc_ptr[0].hi(1) == REMORABCType::orlanski_rad_nudge) { Real grad_hi = calc_arr(i ,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill); Real grad_hi_jp1 = calc_arr(i ,dom_hi.y-mf_index_type[1]+1,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_hi.y-mf_index_type[1]+1,k,icomp+icomp_to_fill); Real grad_hi_ip1 = calc_arr(i+1,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i ,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill); From 26e54e8b2e00633df64618e3cbcadc713896ae47 Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Wed, 4 Dec 2024 11:26:44 -0800 Subject: [PATCH 2/4] fix link --- Docs/sphinx_doc/Verification.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/sphinx_doc/Verification.rst b/Docs/sphinx_doc/Verification.rst index e311fb0..2e59cd1 100644 --- a/Docs/sphinx_doc/Verification.rst +++ b/Docs/sphinx_doc/Verification.rst @@ -47,7 +47,7 @@ Ideal Mini Grid This small idealized grid is used to test netCDF-provided initial and boundary conditions. The ocean is initialized with zero velocity and a constant temperature and salinity. Time-varying boundary conditions are then applied for velocity, temperature, or salinity (provided by netCDF file). The default is to used a clamped boundary condition for all quantities, but options for Chapman-Flather and radiation conditions are available. This test also verifies correct behavior with land-sea masking when using the ``_masked`` grid file. -The netCDF files needed to run these tests can be found in the `remora-data `_ repository under the ``IdealMiniGrid`` directory. .. _particlesseamount: From 91e3f2eaa89230c9832eb8cea96c3f78e06f5e95 Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Wed, 4 Dec 2024 17:07:22 -0800 Subject: [PATCH 3/4] only work on one component at a time, so we don't need a vector of BCRs --- .../BoundaryConditions_netcdf.cpp | 43 ++++++++++--------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp b/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp index 566e384..1284f08 100644 --- a/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp +++ b/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp @@ -173,18 +173,18 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const // yhi: ori = 4 // zhi: ori = 5 - amrex::Gpu::DeviceVector bcrs_d(1); - Gpu::copyAsync(Gpu::hostToDevice, bcrs.begin(), bcrs.end(), bcrs_d.begin()); - const amrex::BCRec* bc_ptr = bcrs_d.data(); + auto bcr = bcrs[0]; + // Even though we don't loop over xlo itself, this is the right condition to check, since xlo_edge will always be the same for each grid, + // but if the grid doesn't include the low x-boundary, the xlo box will be invalid and the execution will be skipped. if (!xlo.isEmpty()) { ParallelFor(grow(xlo_edge,IntVect(0,-1,0)), [=] AMREX_GPU_DEVICE (int i, int j, int k) { Real bry_val = (oma * bdatxlo_n (ubound(xlo).x,j,k,0) + alpha * bdatxlo_np1(ubound(xlo).x,j,k,0)); - if (bc_ptr[0].lo(0) == REMORABCType::clamped) { + if (bcr.lo(0) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(0) == REMORABCType::flather) { + } else if (bcr.lo(0) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaxlo_n(ubound(xlo).x-1,j,k,0) + alpha * bdatzetaxlo_np1(ubound(xlo).x-1,j,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(dom_lo.x-1,j,0) + zeta_arr(dom_lo.x-1,j,0,icomp_calc) + h_arr(dom_lo.x,j,0) + zeta_arr(dom_lo.x,j,0,icomp_calc))); @@ -192,7 +192,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val - Cx * (0.5_rt * (zeta_arr(dom_lo.x-1,j,0,icomp_calc) + zeta_arr(dom_lo.x,j,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(0) == REMORABCType::chapman) { + } else if (bcr.lo(0) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pm(dom_lo.x,j-mf_index_type[1],0) + pm(dom_lo.x,j,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(dom_lo.x,j-mf_index_type[1],0) + zeta_arr(dom_lo.x,j-mf_index_type[1],0,icomp_calc) + h_arr(dom_lo.x,j,0) @@ -201,7 +201,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Cx); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(dom_lo.x-1,j,k,icomp_calc) + Cx * dest_arr(dom_lo.x,j,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(0) == REMORABCType::orlanski_rad_nudge) { + } else if (bcr.lo(0) == REMORABCType::orlanski_rad_nudge) { Real grad_lo_im1 = (calc_arr(dom_lo.x+mf_index_type[0]-1,j ,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x-1+mf_index_type[0],j-1,k,icomp+icomp_to_fill)); Real grad_lo = (calc_arr(dom_lo.x+mf_index_type[0] ,j ,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x +mf_index_type[0],j-1,k,icomp+icomp_to_fill)); Real grad_lo_imjp1 = (calc_arr(dom_lo.x+mf_index_type[0]-1,j+1,k,icomp+icomp_to_fill) - calc_arr(dom_lo.x-1+mf_index_type[0],j ,k,icomp+icomp_to_fill)); @@ -234,14 +234,15 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const }); } + // See comment on xlo if (!xhi.isEmpty()) { ParallelFor(grow(xhi_edge,IntVect(0,-1,0)), [=] AMREX_GPU_DEVICE (int i, int j, int k) { Real bry_val = (oma * bdatxhi_n (lbound(xhi).x,j,k,0) + alpha * bdatxhi_np1(lbound(xhi).x,j,k,0)); - if (bc_ptr[0].hi(0) == REMORABCType::clamped) { + if (bcr.hi(0) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(0) == REMORABCType::flather) { + } else if (bcr.hi(0) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaxhi_n(lbound(xhi).x,j,k,0) + alpha * bdatzetaxhi_np1(lbound(xhi).x,j,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(dom_hi.x-1,j,0) + zeta_arr(dom_hi.x-1,j,0,icomp_calc) + h_arr(dom_hi.x,j,0) + zeta_arr(dom_hi.x,j,0,icomp_calc))); @@ -249,7 +250,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val + Cx * (0.5_rt * (zeta_arr(dom_hi.x-1,j,0,icomp_calc) + zeta_arr(dom_hi.x,j,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(0) == REMORABCType::chapman) { + } else if (bcr.hi(0) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pm(dom_hi.x,j-mf_index_type[1],0) + pm(dom_hi.x,j,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(dom_hi.x,j-mf_index_type[1],0) + zeta_arr(dom_hi.x,j-mf_index_type[1],0,icomp_calc) + h_arr(dom_hi.x,j,0) @@ -258,7 +259,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Cx); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(dom_hi.x+1,j,k,icomp_calc) + Cx * dest_arr(dom_hi.x,j,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(0) == REMORABCType::orlanski_rad_nudge) { + } else if (bcr.hi(0) == REMORABCType::orlanski_rad_nudge) { Real grad_hi = (calc_arr(dom_hi.x-mf_index_type[0] ,j ,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0] ,j-1,k,icomp+icomp_to_fill)); Real grad_hi_ip1 = (calc_arr(dom_hi.x-mf_index_type[0]+1,j ,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0]+1,j-1,k,icomp+icomp_to_fill)); Real grad_hi_jp1 = (calc_arr(dom_hi.x-mf_index_type[0] ,j+1,k,icomp+icomp_to_fill) - calc_arr(dom_hi.x-mf_index_type[0] ,j ,k,icomp+icomp_to_fill)); @@ -292,14 +293,15 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const }); } + // See comment on xlo if (!ylo.isEmpty()) { ParallelFor(grow(ylo_edge,IntVect(-1,0,0)), [=] AMREX_GPU_DEVICE (int i, int j, int k) { - Real bry_val = (oma * bdatylo_n (i,ubound(ylo).y,k,0) + Real bry_val = (oma * bdatylo_n (i,ubound(ylo).y,k,0) + alpha * bdatylo_np1(i,ubound(ylo).y,k,0)); - if (bc_ptr[0].lo(1) == REMORABCType::clamped) { + if (bcr.lo(1) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(1) == REMORABCType::flather) { + } else if (bcr.lo(1) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetaylo_n (i,ubound(ylo).y-1,k,0) + alpha * bdatzetaylo_np1(i,ubound(ylo).y-1,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(i,dom_lo.y-1,0) + zeta_arr(i,dom_lo.y-1,0,icomp_calc) @@ -308,7 +310,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val - Ce * (0.5_rt * (zeta_arr(i,dom_lo.y-1,0,icomp_calc) + zeta_arr(i,dom_lo.y,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(1) == REMORABCType::chapman) { + } else if (bcr.lo(1) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pn(i-mf_index_type[0],dom_lo.y,0) + pn(i,dom_lo.y,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(i-mf_index_type[0],dom_lo.y,0) + zeta_arr(i-mf_index_type[0],dom_lo.y,0,icomp_calc) + h_arr(i,dom_lo.y,0) @@ -317,7 +319,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Ce); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(i,dom_lo.y-1,k,icomp_calc) + Ce * dest_arr(i,dom_lo.y,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[0].lo(1) == REMORABCType::orlanski_rad_nudge) { + } else if (bcr.lo(1) == REMORABCType::orlanski_rad_nudge) { Real grad_lo = (calc_arr(i ,dom_lo.y+mf_index_type[1], k,icomp+icomp_to_fill) - calc_arr(i-1,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill)); Real grad_lo_jm1 = (calc_arr(i ,dom_lo.y+mf_index_type[1]-1,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_lo.y+mf_index_type[1]-1,k,icomp+icomp_to_fill)); Real grad_lo_ip1 = (calc_arr(i+1,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i ,dom_lo.y+mf_index_type[1] ,k,icomp+icomp_to_fill)); @@ -351,14 +353,15 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const }); } + // See comment on xlo if (!yhi.isEmpty()) { ParallelFor(grow(yhi_edge,IntVect(-1,0,0)), [=] AMREX_GPU_DEVICE (int i, int j, int k) { Real bry_val = (oma * bdatyhi_n (i,lbound(yhi).y,k,0) + alpha * bdatyhi_np1(i,lbound(yhi).y,k,0)) * mask_arr(i,j,0); - if (bc_ptr[0].hi(1) == REMORABCType::clamped) { + if (bcr.hi(1) == REMORABCType::clamped) { dest_arr(i,j,k,icomp+icomp_to_fill) = bry_val * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(1) == REMORABCType::flather) { + } else if (bcr.hi(1) == REMORABCType::flather) { Real bry_val_zeta = (oma * bdatzetayhi_n (i,lbound(yhi).y,k,0) + alpha * bdatzetayhi_np1(i,lbound(yhi).y,k,0)); Real cff = 1.0_rt / (0.5_rt * (h_arr(i,dom_hi.y-1,0) + zeta_arr(i,dom_hi.y-1,0,icomp_calc) @@ -367,7 +370,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const dest_arr(i,j,k,icomp+icomp_to_fill) = (bry_val + Ce * (0.5_rt * (zeta_arr(i,dom_hi.y-1,0,icomp_calc) + zeta_arr(i,dom_hi.y,0,icomp_calc)) - bry_val_zeta)) * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(1) == REMORABCType::chapman) { + } else if (bcr.hi(1) == REMORABCType::chapman) { Real cff = dt_calc * 0.5_rt * (pn(i-mf_index_type[0],dom_hi.y,0) + pn(i,dom_hi.y,0)); Real cff1 = std::sqrt(g * 0.5_rt * (h_arr(i-mf_index_type[0],dom_hi.y,0) + zeta_arr(i-mf_index_type[0],dom_hi.y,0,icomp_calc) + @@ -376,7 +379,7 @@ REMORA::fill_from_bdyfiles (MultiFab& mf_to_fill, const MultiFab& mf_mask, const Real cff2 = 1.0_rt / (1.0_rt + Ce); dest_arr(i,j,k,icomp+icomp_to_fill) = cff2 * (dest_arr(i,dom_hi.y+1,k,icomp_calc) + Ce * dest_arr(i,dom_hi.y,k,icomp+icomp_to_fill)) * mask_arr(i,j,0); - } else if (bc_ptr[0].hi(1) == REMORABCType::orlanski_rad_nudge) { + } else if (bcr.hi(1) == REMORABCType::orlanski_rad_nudge) { Real grad_hi = calc_arr(i ,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill); Real grad_hi_jp1 = calc_arr(i ,dom_hi.y-mf_index_type[1]+1,k,icomp+icomp_to_fill) - calc_arr(i-1,dom_hi.y-mf_index_type[1]+1,k,icomp+icomp_to_fill); Real grad_hi_ip1 = calc_arr(i+1,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill) - calc_arr(i ,dom_hi.y-mf_index_type[1] ,k,icomp+icomp_to_fill); From b31f71218cb2ec68e9cdce43f050dad75e95d2e8 Mon Sep 17 00:00:00 2001 From: Hannah Klion Date: Fri, 6 Dec 2024 13:32:42 -0800 Subject: [PATCH 4/4] prepend REMORA_ onto all files --- CMake/BuildREMORAExe.cmake | 41 ++++++++----------- CMake/SetAmrexOptions.cmake | 2 +- Exec/Advection/prob.cpp | 7 ++-- Exec/Channel_Test/prob.cpp | 7 ++-- Exec/DoubleGyre/prob.cpp | 7 ++-- Exec/DoublyPeriodic/prob.cpp | 7 ++-- Exec/IdealMiniGrid/prob.cpp | 7 ++-- Exec/OCCAMS/prob.cpp | 7 ++-- Exec/ParticlesOverSeaMount/prob.cpp | 7 ++-- Exec/Seamount/prob.cpp | 7 ++-- Exec/Upwelling/prob.cpp | 7 ++-- Exec/Upwelling_ML/prob.cpp | 7 ++-- Source/BoundaryConditions/Make.package | 12 +++--- ...cpp => REMORA_BoundaryConditions_cons.cpp} | 0 ...p => REMORA_BoundaryConditions_netcdf.cpp} | 0 ...cpp => REMORA_BoundaryConditions_xvel.cpp} | 0 ...cpp => REMORA_BoundaryConditions_yvel.cpp} | 0 ...cpp => REMORA_BoundaryConditions_zvel.cpp} | 2 +- .../BoundaryConditions/REMORA_FillPatch.cpp | 4 +- .../BoundaryConditions/REMORA_PhysBCFunct.H | 6 +-- .../BoundaryConditions/REMORA_PhysBCFunct.cpp | 2 +- ...edData.H => REMORA_TimeInterpolatedData.H} | 0 Source/EOS.H | 15 ------- Source/IO/Make.package | 24 +++++------ Source/IO/NCPlotFile.H | 4 -- .../{Checkpoint.cpp => REMORA_Checkpoint.cpp} | 0 Source/IO/{NCFile.H => REMORA_NCFile.H} | 6 +-- Source/IO/{NCFile.cpp => REMORA_NCFile.cpp} | 4 +- .../{NCInterface.H => REMORA_NCInterface.H} | 6 +-- ...NCInterface.cpp => REMORA_NCInterface.cpp} | 2 +- Source/IO/REMORA_NCPlotFile.H | 4 ++ .../{NCPlotFile.cpp => REMORA_NCPlotFile.cpp} | 6 +-- .../IO/{Plotfile.cpp => REMORA_Plotfile.cpp} | 1 - ...tcdf.cpp => REMORA_ReadFromBdryNetcdf.cpp} | 6 +-- ...tcdf.cpp => REMORA_ReadFromInitNetcdf.cpp} | 4 +- .../{console_io.cpp => REMORA_console_io.cpp} | 2 +- ...iteJobInfo.cpp => REMORA_writeJobInfo.cpp} | 0 Source/Initialization/Make.package | 2 +- Source/Initialization/REMORA_init.cpp | 3 +- Source/Initialization/REMORA_init1d.cpp | 3 +- .../REMORA_init_from_netcdf.cpp | 5 +-- .../Initialization/REMORA_make_new_level.cpp | 3 +- .../{prob_common.H => REMORA_prob_common.H} | 6 +-- Source/Make.package | 10 ++--- Source/Particles/Make.package | 2 +- Source/Particles/REMORA_PC_Evolve.cpp | 2 +- .../{ParticleData.H => REMORA_ParticleData.H} | 4 +- Source/REMORA.H | 12 +++--- Source/REMORA.cpp | 3 +- Source/{DataStruct.H => REMORA_DataStruct.H} | 6 +-- Source/{Derive.H => REMORA_Derive.H} | 4 +- Source/{Derive.cpp => REMORA_Derive.cpp} | 5 +-- .../{IndexDefines.H => REMORA_IndexDefines.H} | 0 Source/REMORA_Tagging.cpp | 2 +- .../REMORA_ComputeTimestep.cpp | 1 - Source/TimeIntegration/REMORA_set_weights.cpp | 4 +- Source/Utils/Make.package | 2 +- ...sform.H => REMORA_DepthStretchTransform.H} | 8 ++-- 58 files changed, 136 insertions(+), 174 deletions(-) rename Source/BoundaryConditions/{BoundaryConditions_cons.cpp => REMORA_BoundaryConditions_cons.cpp} (100%) rename Source/BoundaryConditions/{BoundaryConditions_netcdf.cpp => REMORA_BoundaryConditions_netcdf.cpp} (100%) rename Source/BoundaryConditions/{BoundaryConditions_xvel.cpp => REMORA_BoundaryConditions_xvel.cpp} (100%) rename Source/BoundaryConditions/{BoundaryConditions_yvel.cpp => REMORA_BoundaryConditions_yvel.cpp} (100%) rename Source/BoundaryConditions/{BoundaryConditions_zvel.cpp => REMORA_BoundaryConditions_zvel.cpp} (99%) rename Source/BoundaryConditions/{TimeInterpolatedData.H => REMORA_TimeInterpolatedData.H} (100%) delete mode 100644 Source/EOS.H delete mode 100644 Source/IO/NCPlotFile.H rename Source/IO/{Checkpoint.cpp => REMORA_Checkpoint.cpp} (100%) rename Source/IO/{NCFile.H => REMORA_NCFile.H} (99%) rename Source/IO/{NCFile.cpp => REMORA_NCFile.cpp} (89%) rename Source/IO/{NCInterface.H => REMORA_NCInterface.H} (99%) rename Source/IO/{NCInterface.cpp => REMORA_NCInterface.cpp} (99%) create mode 100644 Source/IO/REMORA_NCPlotFile.H rename Source/IO/{NCPlotFile.cpp => REMORA_NCPlotFile.cpp} (99%) rename Source/IO/{Plotfile.cpp => REMORA_Plotfile.cpp} (99%) rename Source/IO/{ReadFromBdryNetcdf.cpp => REMORA_ReadFromBdryNetcdf.cpp} (99%) rename Source/IO/{ReadFromInitNetcdf.cpp => REMORA_ReadFromInitNetcdf.cpp} (99%) rename Source/IO/{console_io.cpp => REMORA_console_io.cpp} (99%) rename Source/IO/{writeJobInfo.cpp => REMORA_writeJobInfo.cpp} (100%) rename Source/Initialization/{prob_common.H => REMORA_prob_common.H} (95%) rename Source/Particles/{ParticleData.H => REMORA_ParticleData.H} (99%) rename Source/{DataStruct.H => REMORA_DataStruct.H} (99%) rename Source/{Derive.H => REMORA_Derive.H} (93%) rename Source/{Derive.cpp => REMORA_Derive.cpp} (95%) rename Source/{IndexDefines.H => REMORA_IndexDefines.H} (100%) rename Source/Utils/{DepthStretchTransform.H => REMORA_DepthStretchTransform.H} (98%) diff --git a/CMake/BuildREMORAExe.cmake b/CMake/BuildREMORAExe.cmake index 8cda84a..fc5cd32 100644 --- a/CMake/BuildREMORAExe.cmake +++ b/CMake/BuildREMORAExe.cmake @@ -15,11 +15,6 @@ function(build_remora_lib remora_lib_name) include(${CMAKE_SOURCE_DIR}/CMake/SetREMORACompileFlags.cmake) set_remora_compile_flags(${remora_lib_name}) - set(REMORA_EOS_DIR "${CMAKE_SOURCE_DIR}/Source") - target_sources(${remora_lib_name} PRIVATE - ${REMORA_EOS_DIR}/EOS.H) - target_include_directories(${remora_lib_name} SYSTEM PUBLIC ${REMORA_EOS_DIR}) - if(REMORA_ENABLE_PARTICLES) target_sources(${remora_lib_name} PRIVATE ${SRC_DIR}/Particles/REMORA_PC_Evolve.cpp @@ -32,15 +27,15 @@ function(build_remora_lib remora_lib_name) if(REMORA_ENABLE_PNETCDF) target_sources(${remora_lib_name} PRIVATE - ${SRC_DIR}/IO/NCInterface.H - ${SRC_DIR}/IO/NCPlotFile.H - ${SRC_DIR}/IO/NCFile.H - ${SRC_DIR}/IO/NCInterface.cpp - ${SRC_DIR}/IO/NCPlotFile.cpp - ${SRC_DIR}/IO/NCFile.cpp - ${SRC_DIR}/IO/ReadFromInitNetcdf.cpp - ${SRC_DIR}/IO/ReadFromBdryNetcdf.cpp - ${SRC_DIR}/BoundaryConditions/BoundaryConditions_netcdf.cpp + ${SRC_DIR}/IO/REMORA_NCInterface.H + ${SRC_DIR}/IO/REMORA_NCPlotFile.H + ${SRC_DIR}/IO/REMORA_NCFile.H + ${SRC_DIR}/IO/REMORA_NCInterface.cpp + ${SRC_DIR}/IO/REMORA_NCPlotFile.cpp + ${SRC_DIR}/IO/REMORA_NCFile.cpp + ${SRC_DIR}/IO/REMORA_ReadFromInitNetcdf.cpp + ${SRC_DIR}/IO/REMORA_ReadFromBdryNetcdf.cpp + ${SRC_DIR}/BoundaryConditions/REMORA_BoundaryConditions_netcdf.cpp ${SRC_DIR}/Initialization/REMORA_init_from_netcdf.cpp) target_compile_definitions(${remora_lib_name} PUBLIC REMORA_USE_NETCDF) endif() @@ -51,14 +46,14 @@ function(build_remora_lib remora_lib_name) target_sources(${remora_lib_name} PRIVATE - ${SRC_DIR}/Derive.cpp + ${SRC_DIR}/REMORA_Derive.cpp ${SRC_DIR}/REMORA.cpp ${SRC_DIR}/REMORA_SumIQ.cpp ${SRC_DIR}/REMORA_Tagging.cpp - ${SRC_DIR}/BoundaryConditions/BoundaryConditions_cons.cpp - ${SRC_DIR}/BoundaryConditions/BoundaryConditions_xvel.cpp - ${SRC_DIR}/BoundaryConditions/BoundaryConditions_yvel.cpp - ${SRC_DIR}/BoundaryConditions/BoundaryConditions_zvel.cpp + ${SRC_DIR}/BoundaryConditions/REMORA_BoundaryConditions_cons.cpp + ${SRC_DIR}/BoundaryConditions/REMORA_BoundaryConditions_xvel.cpp + ${SRC_DIR}/BoundaryConditions/REMORA_BoundaryConditions_yvel.cpp + ${SRC_DIR}/BoundaryConditions/REMORA_BoundaryConditions_zvel.cpp ${SRC_DIR}/BoundaryConditions/REMORA_FillPatch.cpp ${SRC_DIR}/BoundaryConditions/REMORA_FillPatcher.cpp ${SRC_DIR}/BoundaryConditions/REMORA_PhysBCFunct.cpp @@ -66,10 +61,10 @@ function(build_remora_lib remora_lib_name) ${SRC_DIR}/Initialization/REMORA_init1d.cpp ${SRC_DIR}/Initialization/REMORA_init_bcs.cpp ${SRC_DIR}/Initialization/REMORA_make_new_level.cpp - ${SRC_DIR}/IO/Checkpoint.cpp - ${SRC_DIR}/IO/Plotfile.cpp - ${SRC_DIR}/IO/writeJobInfo.cpp - ${SRC_DIR}/IO/console_io.cpp + ${SRC_DIR}/IO/REMORA_Checkpoint.cpp + ${SRC_DIR}/IO/REMORA_Plotfile.cpp + ${SRC_DIR}/IO/REMORA_writeJobInfo.cpp + ${SRC_DIR}/IO/REMORA_console_io.cpp ${SRC_DIR}/TimeIntegration/REMORA_Advance.cpp ${SRC_DIR}/TimeIntegration/REMORA_advance_2d.cpp ${SRC_DIR}/TimeIntegration/REMORA_advance_2d_onestep.cpp diff --git a/CMake/SetAmrexOptions.cmake b/CMake/SetAmrexOptions.cmake index 0f133e7..7fd61e8 100644 --- a/CMake/SetAmrexOptions.cmake +++ b/CMake/SetAmrexOptions.cmake @@ -6,7 +6,7 @@ set(AMReX_MPI ${REMORA_ENABLE_MPI}) set(AMReX_OMP ${REMORA_ENABLE_OPENMP}) set(AMReX_PRECISION "${REMORA_PRECISION}" CACHE STRING "Floating point precision" FORCE) set(AMReX_EB OFF) -set(AMReX_FORTRAN_INTREMORAACES OFF) +set(AMReX_FORTRAN_INTERFACES OFF) set(AMReX_LINEAR_SOLVERS OFF) set(AMReX_AMRDATA OFF) set(AMReX_PARTICLES OFF) diff --git a/Exec/Advection/prob.cpp b/Exec/Advection/prob.cpp index b90b4db..711eed2 100644 --- a/Exec/Advection/prob.cpp +++ b/Exec/Advection/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/Channel_Test/prob.cpp b/Exec/Channel_Test/prob.cpp index dbae599..4540ba6 100644 --- a/Exec/Channel_Test/prob.cpp +++ b/Exec/Channel_Test/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/DoubleGyre/prob.cpp b/Exec/DoubleGyre/prob.cpp index 02aa8af..e8b56ee 100644 --- a/Exec/DoubleGyre/prob.cpp +++ b/Exec/DoubleGyre/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/DoublyPeriodic/prob.cpp b/Exec/DoublyPeriodic/prob.cpp index 34c472f..1c8bd2b 100644 --- a/Exec/DoublyPeriodic/prob.cpp +++ b/Exec/DoublyPeriodic/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/IdealMiniGrid/prob.cpp b/Exec/IdealMiniGrid/prob.cpp index 091e912..7a9adb5 100644 --- a/Exec/IdealMiniGrid/prob.cpp +++ b/Exec/IdealMiniGrid/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/OCCAMS/prob.cpp b/Exec/OCCAMS/prob.cpp index a00c1db..fdd7eed 100644 --- a/Exec/OCCAMS/prob.cpp +++ b/Exec/OCCAMS/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/ParticlesOverSeaMount/prob.cpp b/Exec/ParticlesOverSeaMount/prob.cpp index 65096fc..297b934 100644 --- a/Exec/ParticlesOverSeaMount/prob.cpp +++ b/Exec/ParticlesOverSeaMount/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/Seamount/prob.cpp b/Exec/Seamount/prob.cpp index f914243..8b7bb39 100644 --- a/Exec/Seamount/prob.cpp +++ b/Exec/Seamount/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/Upwelling/prob.cpp b/Exec/Upwelling/prob.cpp index fb63bf7..320bfce 100644 --- a/Exec/Upwelling/prob.cpp +++ b/Exec/Upwelling/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Exec/Upwelling_ML/prob.cpp b/Exec/Upwelling_ML/prob.cpp index 7058ace..c81fe12 100644 --- a/Exec/Upwelling_ML/prob.cpp +++ b/Exec/Upwelling_ML/prob.cpp @@ -1,11 +1,10 @@ #include "prob.H" -#include "prob_common.H" +#include "REMORA_prob_common.H" -#include "EOS.H" #include "AMReX_ParmParse.H" #include "AMReX_MultiFab.H" -#include "IndexDefines.H" -#include "DepthStretchTransform.H" +#include "REMORA_IndexDefines.H" +#include "REMORA_DepthStretchTransform.H" using namespace amrex; diff --git a/Source/BoundaryConditions/Make.package b/Source/BoundaryConditions/Make.package index 701c6ef..51bcc6c 100644 --- a/Source/BoundaryConditions/Make.package +++ b/Source/BoundaryConditions/Make.package @@ -1,10 +1,10 @@ -CEXE_sources += BoundaryConditions_xvel.cpp -CEXE_sources += BoundaryConditions_yvel.cpp -CEXE_sources += BoundaryConditions_zvel.cpp -CEXE_sources += BoundaryConditions_cons.cpp +CEXE_sources += REMORA_BoundaryConditions_xvel.cpp +CEXE_sources += REMORA_BoundaryConditions_yvel.cpp +CEXE_sources += REMORA_BoundaryConditions_zvel.cpp +CEXE_sources += REMORA_BoundaryConditions_cons.cpp ifeq ($(USE_PNETCDF), TRUE) -CEXE_sources += BoundaryConditions_netcdf.cpp +CEXE_sources += REMORA_BoundaryConditions_netcdf.cpp endif CEXE_sources += REMORA_FillPatch.cpp @@ -14,4 +14,4 @@ CEXE_sources += REMORA_PhysBCFunct.cpp CEXE_headers += REMORA_PhysBCFunct.H CEXE_headers += REMORA_FillPatcher.H -CEXE_headers += TimeInterpolatedData.H +CEXE_headers += REMORA_TimeInterpolatedData.H diff --git a/Source/BoundaryConditions/BoundaryConditions_cons.cpp b/Source/BoundaryConditions/REMORA_BoundaryConditions_cons.cpp similarity index 100% rename from Source/BoundaryConditions/BoundaryConditions_cons.cpp rename to Source/BoundaryConditions/REMORA_BoundaryConditions_cons.cpp diff --git a/Source/BoundaryConditions/BoundaryConditions_netcdf.cpp b/Source/BoundaryConditions/REMORA_BoundaryConditions_netcdf.cpp similarity index 100% rename from Source/BoundaryConditions/BoundaryConditions_netcdf.cpp rename to Source/BoundaryConditions/REMORA_BoundaryConditions_netcdf.cpp diff --git a/Source/BoundaryConditions/BoundaryConditions_xvel.cpp b/Source/BoundaryConditions/REMORA_BoundaryConditions_xvel.cpp similarity index 100% rename from Source/BoundaryConditions/BoundaryConditions_xvel.cpp rename to Source/BoundaryConditions/REMORA_BoundaryConditions_xvel.cpp diff --git a/Source/BoundaryConditions/BoundaryConditions_yvel.cpp b/Source/BoundaryConditions/REMORA_BoundaryConditions_yvel.cpp similarity index 100% rename from Source/BoundaryConditions/BoundaryConditions_yvel.cpp rename to Source/BoundaryConditions/REMORA_BoundaryConditions_yvel.cpp diff --git a/Source/BoundaryConditions/BoundaryConditions_zvel.cpp b/Source/BoundaryConditions/REMORA_BoundaryConditions_zvel.cpp similarity index 99% rename from Source/BoundaryConditions/BoundaryConditions_zvel.cpp rename to Source/BoundaryConditions/REMORA_BoundaryConditions_zvel.cpp index 5ecc7b8..fd42f9c 100644 --- a/Source/BoundaryConditions/BoundaryConditions_zvel.cpp +++ b/Source/BoundaryConditions/REMORA_BoundaryConditions_zvel.cpp @@ -1,6 +1,6 @@ #include "AMReX_PhysBCFunct.H" #include -#include +#include using namespace amrex; diff --git a/Source/BoundaryConditions/REMORA_FillPatch.cpp b/Source/BoundaryConditions/REMORA_FillPatch.cpp index 5aeedf0..8b5fcfa 100644 --- a/Source/BoundaryConditions/REMORA_FillPatch.cpp +++ b/Source/BoundaryConditions/REMORA_FillPatch.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include using namespace amrex; diff --git a/Source/BoundaryConditions/REMORA_PhysBCFunct.H b/Source/BoundaryConditions/REMORA_PhysBCFunct.H index a859be5..f5255d1 100644 --- a/Source/BoundaryConditions/REMORA_PhysBCFunct.H +++ b/Source/BoundaryConditions/REMORA_PhysBCFunct.H @@ -12,9 +12,9 @@ #include "AMReX_TypeTraits.H" #include "AMReX_Orientation.H" -#include -#include -#include +#include +#include +#include using PlaneVector = amrex::Vector; diff --git a/Source/BoundaryConditions/REMORA_PhysBCFunct.cpp b/Source/BoundaryConditions/REMORA_PhysBCFunct.cpp index d45f69f..0a45c39 100644 --- a/Source/BoundaryConditions/REMORA_PhysBCFunct.cpp +++ b/Source/BoundaryConditions/REMORA_PhysBCFunct.cpp @@ -1,5 +1,5 @@ #include "AMReX_PhysBCFunct.H" -#include "IndexDefines.H" +#include "REMORA_IndexDefines.H" #include using namespace amrex; diff --git a/Source/BoundaryConditions/TimeInterpolatedData.H b/Source/BoundaryConditions/REMORA_TimeInterpolatedData.H similarity index 100% rename from Source/BoundaryConditions/TimeInterpolatedData.H rename to Source/BoundaryConditions/REMORA_TimeInterpolatedData.H diff --git a/Source/EOS.H b/Source/EOS.H deleted file mode 100644 index 6c37499..0000000 --- a/Source/EOS.H +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _EOS_H_ -#define _EOS_H_ - -#include -#include -#include - -AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE -amrex::Real getTgivenRandTh(const amrex::Real rho, const amrex::Real temp) -{ - amrex::Real p_loc = p_0 * std::pow(R_d * temp * ip_0, Gamma); - return p_loc / (R_d * rho); -} -#endif - diff --git a/Source/IO/Make.package b/Source/IO/Make.package index d4fee79..ec36a16 100644 --- a/Source/IO/Make.package +++ b/Source/IO/Make.package @@ -1,17 +1,17 @@ -CEXE_sources += Plotfile.cpp -CEXE_sources += Checkpoint.cpp -CEXE_sources += writeJobInfo.cpp +CEXE_sources += REMORA_Plotfile.cpp +CEXE_sources += REMORA_Checkpoint.cpp +CEXE_sources += REMORA_writeJobInfo.cpp -CEXE_sources += console_io.cpp +CEXE_sources += REMORA_console_io.cpp ifeq ($(USE_PNETCDF), TRUE) - CEXE_sources += ReadFromInitNetcdf.cpp - CEXE_sources += ReadFromBdryNetcdf.cpp - CEXE_sources += NCInterface.cpp - CEXE_sources += NCPlotFile.cpp - CEXE_sources += NCFile.cpp - CEXE_headers += NCInterface.H - CEXE_headers += NCPlotFile.H - CEXE_headers += NCFile.H + CEXE_sources += REMORA_ReadFromInitNetcdf.cpp + CEXE_sources += REMORA_ReadFromBdryNetcdf.cpp + CEXE_sources += REMORA_NCInterface.cpp + CEXE_sources += REMORA_NCPlotFile.cpp + CEXE_sources += REMORA_NCFile.cpp + CEXE_headers += REMORA_NCInterface.H + CEXE_headers += REMORA_NCPlotFile.H + CEXE_headers += REMORA_NCFile.H endif diff --git a/Source/IO/NCPlotFile.H b/Source/IO/NCPlotFile.H deleted file mode 100644 index 5ce09e4..0000000 --- a/Source/IO/NCPlotFile.H +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef _NCPLOTFILE_H_ -#define _NCPLOTFILE_H_ -extern std::string inputs_name; -#endif diff --git a/Source/IO/Checkpoint.cpp b/Source/IO/REMORA_Checkpoint.cpp similarity index 100% rename from Source/IO/Checkpoint.cpp rename to Source/IO/REMORA_Checkpoint.cpp diff --git a/Source/IO/NCFile.H b/Source/IO/REMORA_NCFile.H similarity index 99% rename from Source/IO/NCFile.H rename to Source/IO/REMORA_NCFile.H index 01f1927..7d69c41 100644 --- a/Source/IO/NCFile.H +++ b/Source/IO/REMORA_NCFile.H @@ -1,5 +1,5 @@ -#ifndef _NCFILE_H_ -#define _NCFILE_H_ +#ifndef _REMORA_NCFILE_H_ +#define _REMORA_NCFILE_H_ #include #include @@ -9,7 +9,7 @@ #include "AMReX_FArrayBox.H" #include "AMReX_IArrayBox.H" // this includes pnetcdf.h, and mpi.h -#include "NCInterface.H" +#include "REMORA_NCInterface.H" using PlaneVector = amrex::Vector; diff --git a/Source/IO/NCFile.cpp b/Source/IO/REMORA_NCFile.cpp similarity index 89% rename from Source/IO/NCFile.cpp rename to Source/IO/REMORA_NCFile.cpp index 62d8eb3..4e14035 100644 --- a/Source/IO/NCFile.cpp +++ b/Source/IO/REMORA_NCFile.cpp @@ -1,7 +1,7 @@ #include -#include "NCFile.H" -#include "NCInterface.H" +#include "REMORA_NCFile.H" +#include "REMORA_NCInterface.H" std::string ReadNetCDFVarAttrStr (const std::string& fname, diff --git a/Source/IO/NCInterface.H b/Source/IO/REMORA_NCInterface.H similarity index 99% rename from Source/IO/NCInterface.H rename to Source/IO/REMORA_NCInterface.H index 2a2685e..5f4854a 100644 --- a/Source/IO/NCInterface.H +++ b/Source/IO/REMORA_NCInterface.H @@ -6,8 +6,8 @@ * OOP-like manner. */ -#ifndef NC_INTREMORAACE_H -#define NC_INTREMORAACE_H +#ifndef REMORA_NC_INTERFACE_H +#define REMORA_NC_INTERFACE_H #ifdef REMORA_USE_NETCDF #include @@ -382,4 +382,4 @@ public: #endif -#endif /* NC_INTREMORAACE_H */ +#endif /* NC_INTERFACE_H */ diff --git a/Source/IO/NCInterface.cpp b/Source/IO/REMORA_NCInterface.cpp similarity index 99% rename from Source/IO/NCInterface.cpp rename to Source/IO/REMORA_NCInterface.cpp index 7723924..8d5ca61 100644 --- a/Source/IO/NCInterface.cpp +++ b/Source/IO/REMORA_NCInterface.cpp @@ -1,6 +1,6 @@ #include -#include "NCInterface.H" +#include "REMORA_NCInterface.H" #include #include diff --git a/Source/IO/REMORA_NCPlotFile.H b/Source/IO/REMORA_NCPlotFile.H new file mode 100644 index 0000000..31831ab --- /dev/null +++ b/Source/IO/REMORA_NCPlotFile.H @@ -0,0 +1,4 @@ +#ifndef _REMORA_NCPLOTFILE_H_ +#define _REMORA_NCPLOTFILE_H_ +extern std::string inputs_name; +#endif diff --git a/Source/IO/NCPlotFile.cpp b/Source/IO/REMORA_NCPlotFile.cpp similarity index 99% rename from Source/IO/NCPlotFile.cpp rename to Source/IO/REMORA_NCPlotFile.cpp index ff1cf15..2c33dea 100644 --- a/Source/IO/NCPlotFile.cpp +++ b/Source/IO/REMORA_NCPlotFile.cpp @@ -12,9 +12,9 @@ #include #include "REMORA.H" -#include "NCInterface.H" -#include "NCPlotFile.H" -#include "IndexDefines.H" +#include "REMORA_NCInterface.H" +#include "REMORA_NCPlotFile.H" +#include "REMORA_IndexDefines.H" using namespace amrex; diff --git a/Source/IO/Plotfile.cpp b/Source/IO/REMORA_Plotfile.cpp similarity index 99% rename from Source/IO/Plotfile.cpp rename to Source/IO/REMORA_Plotfile.cpp index 1bd781d..55ee6aa 100644 --- a/Source/IO/Plotfile.cpp +++ b/Source/IO/REMORA_Plotfile.cpp @@ -1,4 +1,3 @@ -#include #include #include "AMReX_Interp_3D_C.H" #include "AMReX_PlotFileUtil.H" diff --git a/Source/IO/ReadFromBdryNetcdf.cpp b/Source/IO/REMORA_ReadFromBdryNetcdf.cpp similarity index 99% rename from Source/IO/ReadFromBdryNetcdf.cpp rename to Source/IO/REMORA_ReadFromBdryNetcdf.cpp index b31fd9e..b515073 100644 --- a/Source/IO/ReadFromBdryNetcdf.cpp +++ b/Source/IO/REMORA_ReadFromBdryNetcdf.cpp @@ -1,7 +1,7 @@ -#include "NCFile.H" +#include "REMORA_NCFile.H" #include "AMReX_FArrayBox.H" -#include "DataStruct.H" -#include "IndexDefines.H" +#include "REMORA_DataStruct.H" +#include "REMORA_IndexDefines.H" using namespace amrex; diff --git a/Source/IO/ReadFromInitNetcdf.cpp b/Source/IO/REMORA_ReadFromInitNetcdf.cpp similarity index 99% rename from Source/IO/ReadFromInitNetcdf.cpp rename to Source/IO/REMORA_ReadFromInitNetcdf.cpp index 4c37772..117bb9d 100644 --- a/Source/IO/ReadFromInitNetcdf.cpp +++ b/Source/IO/REMORA_ReadFromInitNetcdf.cpp @@ -1,6 +1,6 @@ -#include "NCFile.H" +#include "REMORA_NCFile.H" #include "AMReX_FArrayBox.H" -#include "DataStruct.H" +#include "REMORA_DataStruct.H" using namespace amrex; diff --git a/Source/IO/console_io.cpp b/Source/IO/REMORA_console_io.cpp similarity index 99% rename from Source/IO/console_io.cpp rename to Source/IO/REMORA_console_io.cpp index dc5b3ab..1c61960 100644 --- a/Source/IO/console_io.cpp +++ b/Source/IO/REMORA_console_io.cpp @@ -5,7 +5,7 @@ #include "AMReX_Vector.H" #ifdef REMORA_USE_NETCDF -#include "NCInterface.H" +#include "REMORA_NCInterface.H" #endif namespace amrex { diff --git a/Source/IO/writeJobInfo.cpp b/Source/IO/REMORA_writeJobInfo.cpp similarity index 100% rename from Source/IO/writeJobInfo.cpp rename to Source/IO/REMORA_writeJobInfo.cpp diff --git a/Source/Initialization/Make.package b/Source/Initialization/Make.package index 75db746..7cf1c90 100644 --- a/Source/Initialization/Make.package +++ b/Source/Initialization/Make.package @@ -1,5 +1,5 @@ CEXE_sources += REMORA_init.cpp -CEXE_headers += prob_common.H +CEXE_headers += REMORA_prob_common.H CEXE_sources += REMORA_init_bcs.cpp CEXE_sources += REMORA_init1d.cpp diff --git a/Source/Initialization/REMORA_init.cpp b/Source/Initialization/REMORA_init.cpp index cd6cfc6..7aadf2d 100644 --- a/Source/Initialization/REMORA_init.cpp +++ b/Source/Initialization/REMORA_init.cpp @@ -3,9 +3,8 @@ */ #include -#include #include -#include +#include using namespace amrex; diff --git a/Source/Initialization/REMORA_init1d.cpp b/Source/Initialization/REMORA_init1d.cpp index 31778b0..9e19eea 100644 --- a/Source/Initialization/REMORA_init1d.cpp +++ b/Source/Initialization/REMORA_init1d.cpp @@ -1,6 +1,5 @@ #include -#include -#include +#include using namespace amrex; diff --git a/Source/Initialization/REMORA_init_from_netcdf.cpp b/Source/Initialization/REMORA_init_from_netcdf.cpp index 49f5f12..73d5c75 100644 --- a/Source/Initialization/REMORA_init_from_netcdf.cpp +++ b/Source/Initialization/REMORA_init_from_netcdf.cpp @@ -3,10 +3,9 @@ */ #include -#include #include -#include -#include +#include +#include using namespace amrex; diff --git a/Source/Initialization/REMORA_make_new_level.cpp b/Source/Initialization/REMORA_make_new_level.cpp index fa451a7..6a74441 100644 --- a/Source/Initialization/REMORA_make_new_level.cpp +++ b/Source/Initialization/REMORA_make_new_level.cpp @@ -2,9 +2,8 @@ * \file REMORA_make_new_level.cpp */ -#include -#include #include +#include #include diff --git a/Source/Initialization/prob_common.H b/Source/Initialization/REMORA_prob_common.H similarity index 95% rename from Source/Initialization/prob_common.H rename to Source/Initialization/REMORA_prob_common.H index 844b2cf..0f5d03b 100644 --- a/Source/Initialization/prob_common.H +++ b/Source/Initialization/REMORA_prob_common.H @@ -1,7 +1,7 @@ -#ifndef _PROBCOMMON_H_ -#define _PROBCOMMON_H_ +#ifndef _REMORA_PROBCOMMON_H_ +#define _REMORA_PROBCOMMON_H_ -#include +#include #include #include diff --git a/Source/Make.package b/Source/Make.package index bd73f17..25d2a05 100644 --- a/Source/Make.package +++ b/Source/Make.package @@ -2,12 +2,12 @@ CEXE_sources += main.cpp CEXE_sources += REMORA.cpp CEXE_headers += REMORA.H -CEXE_headers += IndexDefines.H -CEXE_headers += EOS.H -CEXE_headers += DataStruct.H +CEXE_headers += REMORA_IndexDefines.H +CEXE_headers += REMORA_EOS.H +CEXE_headers += REMORA_DataStruct.H CEXE_headers += REMORA_Constants.H CEXE_sources += REMORA_Tagging.cpp CEXE_sources += REMORA_SumIQ.cpp -CEXE_sources += Derive.cpp -CEXE_headers += Derive.H +CEXE_sources += REMORA_Derive.cpp +CEXE_headers += REMORA_Derive.H diff --git a/Source/Particles/Make.package b/Source/Particles/Make.package index 8987488..9e70600 100644 --- a/Source/Particles/Make.package +++ b/Source/Particles/Make.package @@ -3,5 +3,5 @@ CEXE_sources += REMORA_PC_Init.cpp CEXE_sources += REMORA_PC_Evolve.cpp CEXE_sources += REMORA_PC_Utils.cpp -CEXE_headers += ParticleData.H +CEXE_headers += REMORA_ParticleData.H CEXE_headers += REMORA_PC.H diff --git a/Source/Particles/REMORA_PC_Evolve.cpp b/Source/Particles/REMORA_PC_Evolve.cpp index 3f544a6..5fdb5f3 100644 --- a/Source/Particles/REMORA_PC_Evolve.cpp +++ b/Source/Particles/REMORA_PC_Evolve.cpp @@ -1,7 +1,7 @@ #ifdef REMORA_USE_PARTICLES #include -#include +#include #include #include diff --git a/Source/Particles/ParticleData.H b/Source/Particles/REMORA_ParticleData.H similarity index 99% rename from Source/Particles/ParticleData.H rename to Source/Particles/REMORA_ParticleData.H index 351383e..b6fb074 100644 --- a/Source/Particles/ParticleData.H +++ b/Source/Particles/REMORA_ParticleData.H @@ -1,5 +1,5 @@ -#ifndef _PARTICLE_DATA_H_ -#define _PARTICLE_DATA_H_ +#ifndef _REMORA_PARTICLE_DATA_H_ +#define _REMORA_PARTICLE_DATA_H_ #ifdef REMORA_USE_PARTICLES diff --git a/Source/REMORA.H b/Source/REMORA.H index 265fc86..b9da02f 100644 --- a/Source/REMORA.H +++ b/Source/REMORA.H @@ -30,17 +30,17 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef REMORA_USE_PARTICLES -#include "ParticleData.H" +#include "REMORA_ParticleData.H" #endif #ifdef REMORA_USE_NETCDF -#include "NCInterface.H" +#include "REMORA_NCInterface.H" #endif #include diff --git a/Source/REMORA.cpp b/Source/REMORA.cpp index c23cb24..6df087a 100644 --- a/Source/REMORA.cpp +++ b/Source/REMORA.cpp @@ -2,8 +2,7 @@ * \file REMORA.cpp */ -#include -#include +#include #include #include diff --git a/Source/DataStruct.H b/Source/REMORA_DataStruct.H similarity index 99% rename from Source/DataStruct.H rename to Source/REMORA_DataStruct.H index 8da7fef..84daeb9 100644 --- a/Source/DataStruct.H +++ b/Source/REMORA_DataStruct.H @@ -1,5 +1,5 @@ -#ifndef _DATA_STRUCT_H_ -#define _DATA_STRUCT_H_ +#ifndef _REMORA_DATA_STRUCT_H_ +#define _REMORA_DATA_STRUCT_H_ #include #include @@ -9,7 +9,7 @@ #include #include -#include "IndexDefines.H" +#include "REMORA_IndexDefines.H" enum struct CouplingType { OneWay, TwoWay diff --git a/Source/Derive.H b/Source/REMORA_Derive.H similarity index 93% rename from Source/Derive.H rename to Source/REMORA_Derive.H index 241d3bb..cc33735 100644 --- a/Source/Derive.H +++ b/Source/REMORA_Derive.H @@ -1,5 +1,5 @@ -#ifndef _Derive_H_ -#define _Derive_H_ +#ifndef _REMORA_Derive_H_ +#define _REMORA_Derive_H_ #include #include diff --git a/Source/Derive.cpp b/Source/REMORA_Derive.cpp similarity index 95% rename from Source/Derive.cpp rename to Source/REMORA_Derive.cpp index 080030b..36aacae 100644 --- a/Source/Derive.cpp +++ b/Source/REMORA_Derive.cpp @@ -1,6 +1,5 @@ -#include "Derive.H" -#include "EOS.H" -#include "IndexDefines.H" +#include "REMORA_Derive.H" +#include "REMORA_IndexDefines.H" using namespace amrex; diff --git a/Source/IndexDefines.H b/Source/REMORA_IndexDefines.H similarity index 100% rename from Source/IndexDefines.H rename to Source/REMORA_IndexDefines.H diff --git a/Source/REMORA_Tagging.cpp b/Source/REMORA_Tagging.cpp index 24458f8..cf35bfe 100644 --- a/Source/REMORA_Tagging.cpp +++ b/Source/REMORA_Tagging.cpp @@ -1,5 +1,5 @@ #include -#include +#include using namespace amrex; diff --git a/Source/TimeIntegration/REMORA_ComputeTimestep.cpp b/Source/TimeIntegration/REMORA_ComputeTimestep.cpp index 1c2876e..0441471 100644 --- a/Source/TimeIntegration/REMORA_ComputeTimestep.cpp +++ b/Source/TimeIntegration/REMORA_ComputeTimestep.cpp @@ -1,4 +1,3 @@ -#include #include using namespace amrex; diff --git a/Source/TimeIntegration/REMORA_set_weights.cpp b/Source/TimeIntegration/REMORA_set_weights.cpp index 915cc1e..e3071e1 100644 --- a/Source/TimeIntegration/REMORA_set_weights.cpp +++ b/Source/TimeIntegration/REMORA_set_weights.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include -#include +#include using namespace amrex; diff --git a/Source/Utils/Make.package b/Source/Utils/Make.package index 92bc3d3..fcd24e6 100644 --- a/Source/Utils/Make.package +++ b/Source/Utils/Make.package @@ -1,2 +1,2 @@ CEXE_headers += REMORA_Math.H -CEXE_headers += DepthStretchTransform.H +CEXE_headers += REMORA_DepthStretchTransform.H diff --git a/Source/Utils/DepthStretchTransform.H b/Source/Utils/REMORA_DepthStretchTransform.H similarity index 98% rename from Source/Utils/DepthStretchTransform.H rename to Source/Utils/REMORA_DepthStretchTransform.H index 948e3c7..1f7accd 100644 --- a/Source/Utils/DepthStretchTransform.H +++ b/Source/Utils/REMORA_DepthStretchTransform.H @@ -1,10 +1,10 @@ -#ifndef STRETCH_H_ -#define STRETCH_H_ +#ifndef _REMORA_STRETCH_H_ +#define _REMORA_STRETCH_H_ #include -#include +#include #include -#include +#include using namespace amrex;