LevelSetUtils.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: LevelSetUtils.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Level set util functions for CubbyFlow.
6 > Created Time: 2017/07/13
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_LEVEL_SET_UTILS_H
10 #define CUBBYFLOW_LEVEL_SET_UTILS_H
11 
12 namespace CubbyFlow
13 {
23  template <typename T>
24  bool IsInsideSDF(T phi);
25 
41  template <typename T>
42  T SmearedHeavisideSDF(T phi);
43 
58  template <typename T>
59  T SmearedDeltaSDF(T phi);
60 
80  template <typename T>
81  T FractionInsideSDF(T phi0, T phi1);
82 
100  template <typename T>
101  T FractionInside(T phiBottomLeft, T phiBottomRight, T phiTopLeft, T phiTopRight);
102 }
103 
105 
106 #endif
T FractionInside(T phiBottomLeft, T phiBottomRight, T phiTopLeft, T phiTopRight)
Returns the fraction occupied by the implicit surface.
Definition: LevelSetUtils-Impl.h:96
bool IsInsideSDF(T phi)
Returns true if phi is inside the implicit surface (< 0).
Definition: LevelSetUtils-Impl.h:29
T FractionInsideSDF(T phi0, T phi1)
Returns the fraction occupied by the implicit surface.
Definition: LevelSetUtils-Impl.h:62
T SmearedHeavisideSDF(T phi)
Returns smeared Heaviside function.
Definition: LevelSetUtils-Impl.h:35
Definition: pybind11Utils.h:24
T SmearedDeltaSDF(T phi)
Returns smeared delta function.
Definition: LevelSetUtils-Impl.h:51