25 lines
579 B
C++
25 lines
579 B
C++
#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
|