Skip to content

Commit

Permalink
Have code determine when to use InitialPressureProject
Browse files Browse the repository at this point in the history
  • Loading branch information
cgilet committed Jun 20, 2024
1 parent fc5e8a6 commit 8bf9585
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/incflo.H
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ private:

// Initial projection / iterations
bool m_do_initial_proj = true;
bool m_do_initial_pressure_proj = false;
int m_initial_iterations = 3;

// Use Boussinesq approximation for buoyancy?
Expand Down
4 changes: 3 additions & 1 deletion src/incflo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ void incflo::InitData ()
if (m_do_initial_proj) {
InitialProjection();

if (m_do_initial_pressure_proj) {
if (!m_constant_density
&& std::abs(m_gravity.sum()) > std::numeric_limits<Real>::epsilon()
&& !(m_ro_0 > std::numeric_limits<Real>::epsilon()) ) {
InitialPressureProjection();
}
}
Expand Down
1 change: 0 additions & 1 deletion src/setup/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ void incflo::ReadParameters ()
pp.query("steady_state_tol", m_steady_state_tol);
pp.query("initial_iterations", m_initial_iterations);
pp.query("do_initial_proj", m_do_initial_proj);
pp.query("do_initial_pressure_proj", m_do_initial_pressure_proj);

pp.query("fixed_dt", m_fixed_dt);
pp.query("cfl", m_cfl);
Expand Down

0 comments on commit 8bf9585

Please sign in to comment.