FMMLevelSetSolver3.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_FMM_LEVEL_SET_SOLVER3_HPP
12 #define CUBBYFLOW_FMM_LEVEL_SET_SOLVER3_HPP
13 
15 
16 namespace CubbyFlow
17 {
30 class FMMLevelSetSolver3 final : public LevelSetSolver3
31 {
32  public:
34  FMMLevelSetSolver3() = default;
35 
43  void Reinitialize(const ScalarGrid3& inputSDF, double maxDistance,
44  ScalarGrid3* outputSDF) override;
45 
54  void Extrapolate(const ScalarGrid3& input, const ScalarField3& sdf,
55  double maxDistance, ScalarGrid3* output) override;
56 
66  void Extrapolate(const CollocatedVectorGrid3& input,
67  const ScalarField3& sdf, double maxDistance,
68  CollocatedVectorGrid3* output) override;
69 
79  void Extrapolate(const FaceCenteredGrid3& input, const ScalarField3& sdf,
80  double maxDistance, FaceCenteredGrid3* output) override;
81 
82  private:
83  void Extrapolate(const ConstArrayView3<double>& input,
84  const ConstArrayView3<double>& sdf,
85  const Vector3D& gridSpacing, double maxDistance,
86  ArrayView3<double> output);
87 };
88 
90 using FMMLevelSetSolver3Ptr = std::shared_ptr<FMMLevelSetSolver3>;
91 } // namespace CubbyFlow
92 
93 #endif
Three-dimensional fast marching method (FMM) implementation.
Definition: FMMLevelSetSolver3.hpp:30
Abstract base class for 3-D level set solver.
Definition: LevelSetSolver3.hpp:23
std::shared_ptr< FMMLevelSetSolver3 > FMMLevelSetSolver3Ptr
Shared pointer type for the FMMLevelSetSolver3.
Definition: FMMLevelSetSolver3.hpp:90
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
Definition: Matrix.hpp:27
Definition: pybind11Utils.hpp:20
N-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid.hpp:31
Generic N-dimensional array class interface.
Definition: Array.hpp:32
Abstract base class for N-D collocated vector grid structure.
Definition: CollocatedVectorGrid.hpp:22
FMMLevelSetSolver3()=default
Default constructor.
void Extrapolate(const ScalarGrid3 &input, const ScalarField3 &sdf, double maxDistance, ScalarGrid3 *output) override
void Reinitialize(const ScalarGrid3 &inputSDF, double maxDistance, ScalarGrid3 *outputSDF) override