Skip to content

Commit

Permalink
Fix issue with STF smoothing.
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi committed Jan 11, 2024
1 parent ba76913 commit f750e66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Utils/TerrainMetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ init_terrain_grid (const Geometry& geom, MultiFab& z_phys_nd, amrex::Vector<Real
Real zz = z_lev_h[k];
Real zz_minus = z_lev_h[k-1];

Real h_m = max_h; //high point of hill
Real gamma_m = 0.5; // min allowed fractional grid spacing
Real z_H = 2.44/(1-gamma_m);
Real z_H = (h_m*2.44)/(1-gamma_m);

Real A;
Real foo = cos((PI/2)*(zz/z_H));
Expand All @@ -231,7 +232,6 @@ init_terrain_grid (const Geometry& geom, MultiFab& z_phys_nd, amrex::Vector<Real
const auto & h_s = ma_h_s[box_no];
const auto & h_s_old = ma_h_s_old[box_no];

Real h_m = max_h; //high point of hill
Real beta_k = 0.2*std::min(zz/(2*h_m),1.0); //smoothing coefficient

// Clip indices for ghost-cells
Expand Down

0 comments on commit f750e66

Please sign in to comment.