Skip to content

Commit

Permalink
Format 4 spaces, space after function declaration/definition, and rem…
Browse files Browse the repository at this point in the history
…ove metgrid moisture compile flags. (#1349)
  • Loading branch information
AMLattanzi authored Dec 18, 2023
1 parent bad5671 commit c18b1c3
Show file tree
Hide file tree
Showing 36 changed files with 2,610 additions and 2,647 deletions.
50 changes: 25 additions & 25 deletions Source/Advection/Advection.H
Original file line number Diff line number Diff line change
Expand Up @@ -62,41 +62,41 @@ void AdvectionSrcForMom (const amrex::Box& bxx, const amrex::Box& bxy, const amr
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
AdvType
EfficientAdvType(int nrk, AdvType adv_type)
EfficientAdvType (int nrk, AdvType adv_type)
{
AdvType eff_adv_type;
AdvType eff_adv_type;

if (nrk == 0) {
if (nrk == 0) {

eff_adv_type = AdvType::Centered_2nd;
eff_adv_type = AdvType::Centered_2nd;

} else if (nrk == 1) {
} else if (nrk == 1) {

if ( (adv_type == AdvType::Centered_2nd) ||
(adv_type == AdvType::Upwind_3rd) ||
(adv_type == AdvType::Centered_4th) ||
(adv_type == AdvType::Weno_3) ||
(adv_type == AdvType::Weno_3Z) ||
(adv_type == AdvType::Weno_3MZQ) )
{
eff_adv_type = AdvType::Centered_2nd;
if ( (adv_type == AdvType::Centered_2nd) ||
(adv_type == AdvType::Upwind_3rd) ||
(adv_type == AdvType::Centered_4th) ||
(adv_type == AdvType::Weno_3) ||
(adv_type == AdvType::Weno_3Z) ||
(adv_type == AdvType::Weno_3MZQ) )
{
eff_adv_type = AdvType::Centered_2nd;

} else if ( (adv_type == AdvType::Upwind_5th) ||
(adv_type == AdvType::Weno_5) ||
(adv_type == AdvType::Weno_5Z) )
{
eff_adv_type = AdvType::Upwind_3rd;
} else if ( (adv_type == AdvType::Upwind_5th) ||
(adv_type == AdvType::Weno_5) ||
(adv_type == AdvType::Weno_5Z) )
{
eff_adv_type = AdvType::Upwind_3rd;

} else { // (adv_type == AdvType::Centered_6th)
} else { // (adv_type == AdvType::Centered_6th)

eff_adv_type = AdvType::Centered_4th;
}
eff_adv_type = AdvType::Centered_4th;
}

} else {
} else {

eff_adv_type = adv_type;
}
eff_adv_type = adv_type;
}

return(eff_adv_type);
return(eff_adv_type);
}
#endif
64 changes: 32 additions & 32 deletions Source/Advection/AdvectionSrcForMom_N.H
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,22 @@ AdvectionSrcForZMom_N (int i, int j, int k,
*/
template<typename InterpType_H, typename InterpType_V, typename WallInterpType>
void
AdvectionSrcForMomWrapper_N(const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& rho_w,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
AdvectionSrcForMomWrapper_N (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& rho_w,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
{
// Instantiate the appropriate structs
InterpType_H interp_u_h(u); InterpType_V interp_u_v(u); // X-MOM
Expand Down Expand Up @@ -320,22 +320,22 @@ AdvectionSrcForMomWrapper_N(const amrex::Box& bxx, const amrex::Box& bxy, const
*/
template<typename InterpType_H>
void
AdvectionSrcForMomVert_N(const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& rho_w,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
AdvectionSrcForMomVert_N (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& rho_w,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
{
if (vert_adv_type == AdvType::Centered_2nd) {
AdvectionSrcForMomWrapper_N<InterpType_H,CENTERED2,UPWINDALL>(bxx, bxy, bxz,
Expand Down
70 changes: 35 additions & 35 deletions Source/Advection/AdvectionSrcForMom_T.H
Original file line number Diff line number Diff line change
Expand Up @@ -324,24 +324,24 @@ AdvectionSrcForZMom_T (int i, int j, int k,
*/
template<typename InterpType_H, typename InterpType_V, typename WallInterpType>
void
AdvectionSrcForMomWrapper_T(const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& Omega,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::Array4<const amrex::Real>& z_nd,
const amrex::Array4<const amrex::Real>& detJ,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
AdvectionSrcForMomWrapper_T (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& Omega,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::Array4<const amrex::Real>& z_nd,
const amrex::Array4<const amrex::Real>& detJ,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type,
const int domhi_z)
{
// Instantiate the appropriate structs
InterpType_H interp_u_h(u); InterpType_V interp_u_v(u); // X-MOM
Expand Down Expand Up @@ -374,23 +374,23 @@ AdvectionSrcForMomWrapper_T(const amrex::Box& bxx, const amrex::Box& bxy, const
*/
template<typename InterpType_H>
void
AdvectionSrcForMomVert_T(const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& Omega,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::Array4<const amrex::Real>& z_nd,
const amrex::Array4<const amrex::Real>& detJ,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type, const int domhi_z)
AdvectionSrcForMomVert_T (const amrex::Box& bxx, const amrex::Box& bxy, const amrex::Box& bxz,
const amrex::Array4<amrex::Real>& rho_u_rhs,
const amrex::Array4<amrex::Real>& rho_v_rhs,
const amrex::Array4<amrex::Real>& rho_w_rhs,
const amrex::Array4<const amrex::Real>& rho_u,
const amrex::Array4<const amrex::Real>& rho_v,
const amrex::Array4<const amrex::Real>& Omega,
const amrex::Array4<const amrex::Real>& u,
const amrex::Array4<const amrex::Real>& v,
const amrex::Array4<const amrex::Real>& w,
const amrex::Array4<const amrex::Real>& z_nd,
const amrex::Array4<const amrex::Real>& detJ,
const amrex::GpuArray<amrex::Real, AMREX_SPACEDIM>& cellSizeInv,
const amrex::Array4<const amrex::Real>& mf_m,
const amrex::Array4<const amrex::Real>& mf_u_inv,
const amrex::Array4<const amrex::Real>& mf_v_inv,
const AdvType vert_adv_type, const int domhi_z)
{
if (vert_adv_type == AdvType::Centered_2nd) {
AdvectionSrcForMomWrapper_T<InterpType_H,CENTERED2,UPWINDALL>(bxx, bxy, bxz,
Expand Down
30 changes: 15 additions & 15 deletions Source/Advection/AdvectionSrcForScalars.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
*/
template<typename InterpType_H, typename InterpType_V>
void
AdvectionSrcForScalarsWrapper(const amrex::Box& bx,
const int& ncomp, const int& icomp,
const amrex::GpuArray<const amrex::Array4<amrex::Real>, AMREX_SPACEDIM> flx_arr,
const amrex::Array4<const amrex::Real>& cell_prim,
const amrex::Array4<const amrex::Real>& avg_xmom,
const amrex::Array4<const amrex::Real>& avg_ymom,
const amrex::Array4<const amrex::Real>& avg_zmom)
AdvectionSrcForScalarsWrapper (const amrex::Box& bx,
const int& ncomp, const int& icomp,
const amrex::GpuArray<const amrex::Array4<amrex::Real>, AMREX_SPACEDIM> flx_arr,
const amrex::Array4<const amrex::Real>& cell_prim,
const amrex::Array4<const amrex::Real>& avg_xmom,
const amrex::Array4<const amrex::Real>& avg_ymom,
const amrex::Array4<const amrex::Real>& avg_zmom)
{
// Instantiate structs for vert/horiz interp
InterpType_H interp_prim_h(cell_prim);
Expand Down Expand Up @@ -60,14 +60,14 @@ AdvectionSrcForScalarsWrapper(const amrex::Box& bx,
*/
template<typename InterpType_H>
void
AdvectionSrcForScalarsVert(const amrex::Box& bx,
const int& ncomp, const int& icomp,
const amrex::GpuArray<const amrex::Array4<amrex::Real>, AMREX_SPACEDIM> flx_arr,
const amrex::Array4<const amrex::Real>& cell_prim,
const amrex::Array4<const amrex::Real>& avg_xmom,
const amrex::Array4<const amrex::Real>& avg_ymom,
const amrex::Array4<const amrex::Real>& avg_zmom,
const AdvType vert_adv_type)
AdvectionSrcForScalarsVert (const amrex::Box& bx,
const int& ncomp, const int& icomp,
const amrex::GpuArray<const amrex::Array4<amrex::Real>, AMREX_SPACEDIM> flx_arr,
const amrex::Array4<const amrex::Real>& cell_prim,
const amrex::Array4<const amrex::Real>& avg_xmom,
const amrex::Array4<const amrex::Real>& avg_ymom,
const amrex::Array4<const amrex::Real>& avg_zmom,
const AdvType vert_adv_type)
{
switch(vert_adv_type) {
case AdvType::Centered_2nd:
Expand Down
Loading

0 comments on commit c18b1c3

Please sign in to comment.