FMMLevelSetSolver2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: FMMLevelSetSolver2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Two-dimensional fast marching method (FMM) implementation.
6 > Created Time: 2017/09/01
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_FMM_LEVEL_SET_SOLVER2_H
10 #define CUBBYFLOW_FMM_LEVEL_SET_SOLVER2_H
11 
13 
14 namespace CubbyFlow
15 {
27  class FMMLevelSetSolver2 final : public LevelSetSolver2
28  {
29  public:
32 
40  void Reinitialize(
41  const ScalarGrid2& inputSDF,
42  double maxDistance,
43  ScalarGrid2* outputSDF) override;
44 
53  void Extrapolate(
54  const ScalarGrid2& input,
55  const ScalarField2& sdf,
56  double maxDistance,
57  ScalarGrid2* output) override;
58 
68  void Extrapolate(
69  const CollocatedVectorGrid2& input,
70  const ScalarField2& sdf,
71  double maxDistance,
72  CollocatedVectorGrid2* output) override;
73 
83  void Extrapolate(
84  const FaceCenteredGrid2& input,
85  const ScalarField2& sdf,
86  double maxDistance,
87  FaceCenteredGrid2* output) override;
88 
89  private:
90  void Extrapolate(
91  const ConstArrayAccessor2<double>& input,
92  const ConstArrayAccessor2<double>& sdf,
93  const Vector2D& gridSpacing,
94  double maxDistance,
95  ArrayAccessor2<double> output);
96  };
97 
99  using FMMLevelSetSolver2Ptr = std::shared_ptr<FMMLevelSetSolver2>;
100 }
101 
102 #endif
2-D read-only array accessor class.
Definition: ArrayAccessor2.h:261
Abstract base class for 2-D scalar field.
Definition: ScalarField2.h:21
Abstract base class for 2-D collocated vector grid structure.
Definition: CollocatedVectorGrid2.h:19
void Reinitialize(const ScalarGrid2 &inputSDF, double maxDistance, ScalarGrid2 *outputSDF) override
2-D array accessor class.
Definition: ArrayAccessor2.h:31
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid2.h:25
Definition: pybind11Utils.h:24
void Extrapolate(const ScalarGrid2 &input, const ScalarField2 &sdf, double maxDistance, ScalarGrid2 *output) override
FMMLevelSetSolver2()
Default constructor.
Abstract base class for 2-D level set solver.
Definition: LevelSetSolver2.h:21
std::shared_ptr< FMMLevelSetSolver2 > FMMLevelSetSolver2Ptr
Shared pointer type for the FMMLevelSetSolver2.
Definition: FMMLevelSetSolver2.h:99
2-D vector class.
Definition: Vector2.h:26
Abstract base class for 2-D scalar grid structure.
Definition: ScalarGrid2.h:21
Two-dimensional fast marching method (FMM) implementation.
Definition: FMMLevelSetSolver2.h:27