Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling the Tioga adaptive hole map option for the hybrid solver #64

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Copy link
Contributor

@marchdf marchdf Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holemap_alg can we rename to is_adaptive_holemap_alg

? 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
4 changes: 4 additions & 0 deletions src/OversetSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ void OversetSimulation::perform_overset_connectivity()
m_timers_tg.tick("Connectivity");
if (m_has_amr) m_tg.preprocess_amr_data();
m_tg.profile();
if ((m_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_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_holemap_alg = alg;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m_holemap_alg to m_is_adaptive_holemap_alg

if (m_holemap_alg == true) m_tg.setHoleMapAlgorithm(1);
}
};

} // namespace exawind
Expand Down
Loading