Improve physical geometry, fluid solvers, audio, and profiling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user