diff --git a/app/exawind/exawind.cpp b/app/exawind/exawind.cpp index eeaf92f..30e482b 100644 --- a/app/exawind/exawind.cpp +++ b/app/exawind/exawind.cpp @@ -204,6 +204,10 @@ int main(int argc, char** argv) const int nonlinear_its = node["nonlinear_iterations"] ? node["nonlinear_iterations"].as() : 1; + const bool holemap_alg = node["use_adaptive_holemap"] + ? node["use_adaptive_holemap"].as() + : 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++) { diff --git a/src/OversetSimulation.cpp b/src/OversetSimulation.cpp index 638472f..27344f2 100644 --- a/src/OversetSimulation.cpp +++ b/src/OversetSimulation.cpp @@ -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"); diff --git a/src/OversetSimulation.h b/src/OversetSimulation.h index 4091141..798a549 100644 --- a/src/OversetSimulation.h +++ b/src/OversetSimulation.h @@ -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 @@ -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