LevelSetSolver3.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_SOLVER3_HPP
12 #define CUBBYFLOW_LEVEL_SET_SOLVER3_HPP
13 
16 #include <Core/Grid/ScalarGrid.hpp>
17 
18 #include <memory>
19 
20 namespace CubbyFlow
21 {
24 {
25  public:
27  LevelSetSolver3() = default;
28 
30  LevelSetSolver3(const LevelSetSolver3&) = delete;
31 
33  LevelSetSolver3(LevelSetSolver3&&) noexcept = delete;
34 
36  virtual ~LevelSetSolver3() = default;
37 
39  LevelSetSolver3& operator=(const LevelSetSolver3&) = delete;
40 
42  LevelSetSolver3& operator=(LevelSetSolver3&&) noexcept = delete;
43 
51  virtual void Reinitialize(const ScalarGrid3& inputSDF, double maxDistance,
52  ScalarGrid3* outputSDF) = 0;
53 
62  virtual void Extrapolate(const ScalarGrid3& input, const ScalarField3& sdf,
63  double maxDistance, ScalarGrid3* output) = 0;
64 
74  virtual void Extrapolate(const CollocatedVectorGrid3& input,
75  const ScalarField3& sdf, double maxDistance,
76  CollocatedVectorGrid3* output) = 0;
77 
87  virtual void Extrapolate(const FaceCenteredGrid3& input,
88  const ScalarField3& sdf, double maxDistance,
89  FaceCenteredGrid3* output) = 0;
90 };
91 
93 using LevelSetSolver3Ptr = std::shared_ptr<LevelSetSolver3>;
94 } // namespace CubbyFlow
95 
96 #endif
Abstract base class for 3-D level set solver.
Definition: LevelSetSolver3.hpp:23
Abstract base class for N-D scalar grid structure.
Definition: ScalarGrid.hpp:24
Abstract base class for N-D scalar field.
Definition: ScalarField.hpp:24
LevelSetSolver3()=default
Default constructor.
Definition: pybind11Utils.hpp:20
virtual void Extrapolate(const ScalarGrid3 &input, const ScalarField3 &sdf, double maxDistance, ScalarGrid3 *output)=0
virtual ~LevelSetSolver3()=default
Default virtual destructor.
N-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid.hpp:31
virtual void Reinitialize(const ScalarGrid3 &inputSDF, double maxDistance, ScalarGrid3 *outputSDF)=0
std::shared_ptr< LevelSetSolver3 > LevelSetSolver3Ptr
Shared pointer type for the LevelSetSolver3.
Definition: LevelSetSolver3.hpp:93
Abstract base class for N-D collocated vector grid structure.
Definition: CollocatedVectorGrid.hpp:22
LevelSetSolver3 & operator=(const LevelSetSolver3 &)=delete
Deleted copy assignment operator.