Add Explosive interfaces and restart

This commit is contained in:
Codex
2026-07-03 12:32:14 +08:00
parent 5853ac2644
commit 187af844d1
17 changed files with 629 additions and 32 deletions
+16
View File
@@ -78,5 +78,21 @@ int main()
}
gas_session.close();
sphlite::Session explosive_session;
std::string explosive_input =
std::string(SPHLITE_TEST_DATA_DIR) + "/explosive_conversion_phase_040.inp";
sphlite::read_inp(explosive_input);
sphlite::set_ignition_point(0.0, 0.0, 0.0, 0.0);
sphlite::build_model();
sphlite::run_explicit();
sphlite::ExplosiveSummary explosive = sphlite::explosive_summary();
if (explosive.particle_count <= 0 || explosive.reacted_count <= 0) {
return 1;
}
if (explosive.lambda_range[1] <= 0.0 || explosive.released_totals[1] <= 0.0) {
return 1;
}
explosive_session.close();
return 0;
}