Port FluidSim core and scenarios to C++20
This commit is contained in:
24
include/FluidSim/Solver.hpp
Normal file
24
include/FluidSim/Solver.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "FluidSim/Component.hpp"
|
||||
#include "FluidSim/Fluid.hpp"
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace fluidsim::port {
|
||||
|
||||
class Solver {
|
||||
public:
|
||||
Solver(std::vector<Pipe1D>& pipes, BoundarySystem& boundaries);
|
||||
int minimum_substeps{4};
|
||||
void add_component(Component& component);
|
||||
void step(float dt);
|
||||
std::uint64_t step_count() const { return step_count_; }
|
||||
private:
|
||||
std::vector<Pipe1D>& pipes_;
|
||||
BoundarySystem& boundaries_;
|
||||
std::vector<Component*> components_;
|
||||
std::uint64_t step_count_{};
|
||||
};
|
||||
|
||||
} // namespace fluidsim::port
|
||||
Reference in New Issue
Block a user