feat(stroid): added mesh viewer and tmop toggle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user