LevelSetSolver2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: LevelSetSolver2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for 2-D level set solver.
6 > Created Time: 2017/08/29
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_LEVEL_SET_SOLVER2_H
10 #define CUBBYFLOW_LEVEL_SET_SOLVER2_H
11 
14 #include <Core/Grid/ScalarGrid2.h>
15 
16 #include <memory>
17 
18 namespace CubbyFlow
19 {
22  {
23  public:
26 
28  virtual ~LevelSetSolver2();
29 
37  virtual void Reinitialize(
38  const ScalarGrid2& inputSDF,
39  double maxDistance,
40  ScalarGrid2* outputSDF) = 0;
41 
50  virtual void Extrapolate(
51  const ScalarGrid2& input,
52  const ScalarField2& sdf,
53  double maxDistance,
54  ScalarGrid2* output) = 0;
55 
65  virtual void Extrapolate(
66  const CollocatedVectorGrid2& input,
67  const ScalarField2& sdf,
68  double maxDistance,
69  CollocatedVectorGrid2* output) = 0;
70 
80  virtual void Extrapolate(
81  const FaceCenteredGrid2& input,
82  const ScalarField2& sdf,
83  double maxDistance,
84  FaceCenteredGrid2* output) = 0;
85  };
86 
88  using LevelSetSolver2Ptr = std::shared_ptr<LevelSetSolver2>;
89 }
90 
91 #endif
Abstract base class for 2-D scalar field.
Definition: ScalarField2.h:21
virtual void Extrapolate(const ScalarGrid2 &input, const ScalarField2 &sdf, double maxDistance, ScalarGrid2 *output)=0
Abstract base class for 2-D collocated vector grid structure.
Definition: CollocatedVectorGrid2.h:19
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid2.h:25
Definition: pybind11Utils.h:24
Abstract base class for 2-D level set solver.
Definition: LevelSetSolver2.h:21
std::shared_ptr< LevelSetSolver2 > LevelSetSolver2Ptr
Shared pointer type for the LevelSetSolver2.
Definition: LevelSetSolver2.h:88
virtual ~LevelSetSolver2()
Default destructor.
LevelSetSolver2()
Default constructor.
virtual void Reinitialize(const ScalarGrid2 &inputSDF, double maxDistance, ScalarGrid2 *outputSDF)=0
Abstract base class for 2-D scalar grid structure.
Definition: ScalarGrid2.h:21