feat(stroid): added mesh viewer and tmop toggle

This commit is contained in:
2026-04-07 12:58:16 -04:00
parent 5a82311251
commit 37416adb03
7 changed files with 88 additions and 25 deletions

View File

@@ -11,4 +11,9 @@ namespace stroid::topology {
* @breif Apply target matrix optimization to improve conditioning of the mesh
*/
void ApplyTMOP(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config);
/**
*@breif Helper to call TMOP if the correct flags are set
*/
void OptimizeMesh(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &cfg);
}

View File

@@ -228,4 +228,10 @@ class TMOPProgressBar : public mfem::IterativeSolverMonitor {
delete metric;
delete target_c;
}
void OptimizeMesh(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &cfg) {
if (cfg->optimization_methods.has_value() && cfg->optimization_methods.value().tmop.has_value() && cfg->optimization_methods.value().tmop.value()) {
ApplyTMOP(mesh, cfg);
}
}
}