Skip to content

Commit

Permalink
Enabling the Tioga adaptive hole map option for the hybrid solver (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
itopcuoglu authored Feb 29, 2024
1 parent 0e0c75c commit 81ae1e5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/exawind/exawind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ int main(int argc, char** argv)
const int nonlinear_its = node["nonlinear_iterations"]
? node["nonlinear_iterations"].as<int>()
: 1;
const bool holemap_alg = node["use_adaptive_holemap"]
? node["use_adaptive_holemap"].as<bool>()
: false;
sim.set_holemap_alg(holemap_alg);

const YAML::Node yaml_replace_all = node["nalu_replace_all"];
for (int i = 0; i < num_nwsolvers; i++) {
Expand Down
5 changes: 5 additions & 0 deletions src/OversetSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ void OversetSimulation::perform_overset_connectivity()
m_timers_tg.tick("Connectivity");
if (m_has_amr) m_tg.preprocess_amr_data();
m_tg.profile();
if ((m_is_adaptive_holemap_alg == 1) &&
(m_complementary_comm_initialized == false)) {
m_tg.assembleComms();
m_complementary_comm_initialized = true;
}
m_tg.performConnectivity();
if (m_has_amr) m_tg.performConnectivityAMR();
m_timers_tg.tock("Connectivity");
Expand Down
10 changes: 10 additions & 0 deletions src/OversetSimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class OversetSimulation
int m_last_timestep{0};
//! Flag indicating whether initialization tasks have been performed
bool m_initialized{false};
//! Flag indicating if complementary comms have been initialized
bool m_complementary_comm_initialized{false};
//! Flag for holemap algorithm
bool m_is_adaptive_holemap_alg{false};
//! Tioga instance
TIOGA::tioga m_tg;
//! Determine unstructured and structured solver types
Expand Down Expand Up @@ -99,6 +103,12 @@ class OversetSimulation
m_nw_start_rank = start_ranks;
m_num_nw_solvers = m_nw_start_rank.size();
}

void set_holemap_alg(bool alg)
{
m_is_adaptive_holemap_alg = alg;
if (m_is_adaptive_holemap_alg == true) m_tg.setHoleMapAlgorithm(1);
}
};

} // namespace exawind
Expand Down

0 comments on commit 81ae1e5

Please sign in to comment.