LevelSetSolver2.hpp
Go to the documentation of this file.
1 // This code is based on Jet framework.
2 // Copyright (c) 2018 Doyub Kim
3 // CubbyFlow is voxel-based fluid simulation engine for computer games.
4 // Copyright (c) 2020 CubbyFlow Team
5 // Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6 // AI Part: Dongheon Cho, Minseo Kim
7 // We are making my contributions/submissions to this project solely in our
8 // personal capacity and are not conveying any rights to any intellectual
9 // property of any third parties.
10 
11 #ifndef CUBBYFLOW_LEVEL_SET_SOLVER2_HPP
12 #define CUBBYFLOW_LEVEL_SET_SOLVER2_HPP
13 
16 #include <Core/Grid/ScalarGrid.hpp>
17 
18 #include <memory>
19 
20 namespace CubbyFlow
21 {
24 {
25  public:
27  LevelSetSolver2() = default;
28 
30  LevelSetSolver2(const LevelSetSolver2&) = delete;
31 
33  LevelSetSolver2(LevelSetSolver2&&) noexcept = delete;
34 
36  virtual ~LevelSetSolver2() = default;
37 
39  LevelSetSolver2& operator=(const LevelSetSolver2&) = delete;
40 
42  LevelSetSolver2& operator=(LevelSetSolver2&&) noexcept = delete;
43 
51  virtual void Reinitialize(const ScalarGrid2& inputSDF, double maxDistance,
52  ScalarGrid2* outputSDF) = 0;
53 
62  virtual void Extrapolate(const ScalarGrid2& input, const ScalarField2& sdf,
63  double maxDistance, ScalarGrid2* output) = 0;
64 
74  virtual void Extrapolate(const CollocatedVectorGrid2& input,
75  const ScalarField2& sdf, double maxDistance,
76  CollocatedVectorGrid2* output) = 0;
77 
87  virtual void Extrapolate(const FaceCenteredGrid2& input,
88  const ScalarField2& sdf, double maxDistance,
89  FaceCenteredGrid2* output) = 0;
90 };
91 
93 using LevelSetSolver2Ptr = std::shared_ptr<LevelSetSolver2>;
94 } // namespace CubbyFlow
95 
96 #endif
virtual void Extrapolate(const ScalarGrid2 &input, const ScalarField2 &sdf, double maxDistance, ScalarGrid2 *output)=0
Abstract base class for N-D scalar grid structure.
Definition: ScalarGrid.hpp:24
LevelSetSolver2 & operator=(const LevelSetSolver2 &)=delete
Deleted copy assignment operator.
LevelSetSolver2()=default
Default constructor.
Abstract base class for N-D scalar field.
Definition: ScalarField.hpp:24
Definition: pybind11Utils.hpp:20
N-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid.hpp:31
Abstract base class for 2-D level set solver.
Definition: LevelSetSolver2.hpp:23
std::shared_ptr< LevelSetSolver2 > LevelSetSolver2Ptr
Shared pointer type for the LevelSetSolver2.
Definition: LevelSetSolver2.hpp:93
virtual void Reinitialize(const ScalarGrid2 &inputSDF, double maxDistance, ScalarGrid2 *outputSDF)=0
Abstract base class for N-D collocated vector grid structure.
Definition: CollocatedVectorGrid.hpp:22
virtual ~LevelSetSolver2()=default
Default virtual destructor.