Skip to content

Commit

Permalink
add increment timers for FSI-related function calls (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashesh2512 authored Sep 1, 2023
1 parent c2517bf commit b2ec45c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/ExawindSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ class ExawindSolver
void call_init_epilog() { init_epilog(); };
void call_prepare_solver_prolog() { prepare_solver_prolog(); };
void call_prepare_solver_epilog() { prepare_solver_epilog(); };
void call_pre_advance_stage1(size_t inonlin)
void call_pre_advance_stage1(size_t inonlin, const bool increment)
{
const std::string name = "Pre";
m_timers.tick(name);
m_timers.tick(name, increment);
pre_advance_stage1(inonlin);
m_timers.tock(name);
};
void call_pre_advance_stage2(size_t inonlin)
void call_pre_advance_stage2(size_t inonlin, const bool increment)
{
const std::string name = "Pre";
m_timers.tick(name);
m_timers.tick(name, increment);
pre_advance_stage2(inonlin);
m_timers.tock(name);
};
void call_advance_timestep(size_t inonlin)
void call_advance_timestep(size_t inonlin, const bool increment)
{
const std::string name = "Solve";
m_timers.tick(name);
m_timers.tick(name, increment);
advance_timestep(inonlin);
m_timers.tock(name);
};
Expand Down
12 changes: 8 additions & 4 deletions src/OversetSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,20 @@ void OversetSimulation::run_timesteps(

for (size_t inonlin = 0; inonlin < nonlinear_its; inonlin++) {

for (auto& ss : m_solvers) ss->call_pre_advance_stage1(inonlin);
bool increment_timer = inonlin > 0 ? true : false;

for (auto& ss : m_solvers)
ss->call_pre_advance_stage1(inonlin, increment_timer);

if (do_connectivity(nt)) perform_overset_connectivity();

for (auto& ss : m_solvers) ss->call_pre_advance_stage2(inonlin);
for (auto& ss : m_solvers)
ss->call_pre_advance_stage2(inonlin, increment_timer);

bool increment_timer = inonlin > 0 ? true : false;
exchange_solution(increment_timer);

for (auto& ss : m_solvers) ss->call_advance_timestep(inonlin);
for (auto& ss : m_solvers)
ss->call_advance_timestep(inonlin, increment_timer);
}

if (add_pic_its > 0) {
Expand Down

0 comments on commit b2ec45c

Please sign in to comment.