Skip to content

Commit

Permalink
Whitespace cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
hgopalan committed Dec 10, 2024
1 parent 6a5731f commit 1287291
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Exec/ABL/write_terrain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import numpy as np
import numpy as np

target=open("erf_terrain_def","w")

Expand Down
2 changes: 1 addition & 1 deletion Source/DataStructs/ERF_DataStruct.H
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ struct SolverChoice {

// Flag for valid canopy model
bool do_forest {false};
// Immersed Forcing
// Immersed Forcing
bool do_terrain {false};
};
#endif
6 changes: 3 additions & 3 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ ERF::ERF_shared ()

// NOTE: size canopy model before readparams (if file exists, we construct)
m_forest.resize(nlevs_max);
for (int lev = 0; lev < max_level; ++lev) { m_forest[lev] = nullptr; }
for (int lev = 0; lev < max_level; ++lev) { m_forest[lev] = nullptr;}

// Immersed Forcing
m_terrain.resize(nlevs_max);
for (int lev = 0; lev < max_level; ++lev) { m_terrain[lev] = nullptr; }
for (int lev = 0; lev < max_level; ++lev) { m_terrain[lev] = nullptr;}


ReadParameters();
Expand Down Expand Up @@ -1633,7 +1633,7 @@ ERF::ReadParameters ()
for (int lev = 0; lev <= max_level; ++lev) {
m_terrain[lev] = std::make_unique<TerrainDrag>(terrainfile);
}
}
}

// AmrMesh iterate on grids?
bool iterate(true);
Expand Down
12 changes: 6 additions & 6 deletions Source/SourceTerms/ERF_MakeMomSources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ void make_mom_sources (int level,
// 6. nudging towards input sounding data
// 7. numerical diffusion for (xmom,ymom,zmom)
// 8. sponge
// 9. Forest canopy
// 10. Immersed Forcing
// 9. Forest canopy
// 10. Immersed Forcing
// *****************************************************************************
const bool l_use_ndiff = solverChoice.use_NumDiff;
const bool use_terrain = solverChoice.terrain_type != TerrainType::None;
const bool l_do_forest = solverChoice.do_forest;
const bool l_do_terrain = solverChoice.do_terrain;

// Check if terrain and immersed terrain clash
// Check if terrain and immersed terrain clash
if(use_terrain && l_do_terrain){
amrex::Error(" Cannot use immersed forcing with terrain");
}
Expand Down Expand Up @@ -555,7 +555,7 @@ void make_mom_sources (int level,
+ w(i, j , k+1) + w(i-1, j , k+1) );
const Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i-1, j, k));
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
xmom_src_arr(i, j, k) -= t_blank * CdM * ux * windspeed;
});
ParallelFor(tby, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
Expand All @@ -567,7 +567,7 @@ void make_mom_sources (int level,
+ w(i , j , k+1) + w(i , j-1, k+1) );
const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i, j-1, k));
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
ymom_src_arr(i, j, k) -= t_blank * CdM * uy * windspeed;
});
ParallelFor(tbz, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
Expand All @@ -579,7 +579,7 @@ void make_mom_sources (int level,
const amrex::Real uz = w(i, j, k);
const amrex::Real windspeed = std::sqrt(ux * ux + uy * uy + uz * uz);
const Real t_blank = 0.5 * (t_blank_arr(i, j, k) + t_blank_arr(i, j, k-1));
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
const Real CdM = std::min(drag_coefficient / (windspeed + tiny), 1000.0);
zmom_src_arr(i, j, k) -= t_blank * CdM * uz * windspeed;
});
}
Expand Down
4 changes: 2 additions & 2 deletions Source/TimeIntegration/ERF_TI_slow_rhs_fun.H
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
// Canopy data for mom sources
MultiFab* forest_drag = nullptr;
if (solverChoice.do_forest) { forest_drag = m_forest[level]->get_drag_field(); }
// Immersed Forcing
// Immersed Forcing
MultiFab* terrain_blank = nullptr;
if(solverChoice.do_terrain) { terrain_blank = m_terrain[level]->get_terrain_blank_field(); }

Expand Down Expand Up @@ -436,7 +436,7 @@
// Canopy data for mom sources
MultiFab* forest_drag = nullptr;
if (solverChoice.do_forest) { forest_drag = m_forest[level]->get_drag_field(); }
// Immersed Forcing
// Immersed Forcing
MultiFab* terrain_blank = nullptr;
if(solverChoice.do_terrain) { terrain_blank = m_terrain[level]->get_terrain_blank_field(); }

Expand Down

0 comments on commit 1287291

Please sign in to comment.