Improve physical geometry, fluid solvers, audio, and profiling

This commit is contained in:
max
2026-10-30 18:57:56 +01:00
parent bf8621ad39
commit eb2b6366c2
130 changed files with 14649 additions and 862 deletions

View File

@@ -2,12 +2,13 @@
#include <stdexcept>
#include <string_view>
namespace fluidsim::port {
enum class PipeSolver { Rusanov, Hlle, Hllc };
enum class PipeSolver { Rusanov, Hlle, Hllc, Muscl };
inline const char* pipe_solver_name(PipeSolver solver) {
switch(solver) {
case PipeSolver::Rusanov: return "rusanov";
case PipeSolver::Hlle: return "hlle";
case PipeSolver::Hllc: return "hllc";
case PipeSolver::Muscl: return "muscl";
}
return "unknown";
}
@@ -15,6 +16,7 @@ inline PipeSolver parse_pipe_solver(std::string_view name) {
if(name=="rusanov") return PipeSolver::Rusanov;
if(name=="hlle") return PipeSolver::Hlle;
if(name=="hllc") return PipeSolver::Hllc;
throw std::invalid_argument("choose rusanov, hlle or hllc pipe solver");
if(name=="muscl") return PipeSolver::Muscl;
throw std::invalid_argument("choose rusanov, hlle, hllc or muscl pipe solver");
}
} // namespace fluidsim::port