#pragma once #include #include "vector.h" using Velocity = Vector; using Density = double; class FluidBuffer { private: const std::size_t dim_x_; const std::size_t dim_y_; std::unique_ptr density_; std::unique_ptr velocity_; public: FluidBuffer(std::size_t dimX, std::size_t dimY); std::size_t dimX() const; std::size_t dimY() const; Density& density(std::size_t x, std::size_t y); Density& density(Vector pos); Velocity& velocity(std::size_t x, std::size_t y); Velocity& velocity(Vector pos); void writeAsVTK(int time); };