CubicSemiLagrangian2.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_CUBIC_SEMI_LAGRANGIAN2_HPP
12 #define CUBBYFLOW_CUBIC_SEMI_LAGRANGIAN2_HPP
13 
15 
16 namespace CubbyFlow
17 {
24 {
25  protected:
32  [[nodiscard]] std::function<double(const Vector2D&)> GetScalarSamplerFunc(
33  const ScalarGrid2& source) const override;
34 
41  [[nodiscard]] std::function<Vector2D(const Vector2D&)> GetVectorSamplerFunc(
42  const CollocatedVectorGrid2& source) const override;
43 
50  [[nodiscard]] std::function<Vector2D(const Vector2D&)> GetVectorSamplerFunc(
51  const FaceCenteredGrid2& source) const override;
52 };
53 
54 using CubicSemiLagrangian2Ptr = std::shared_ptr<CubicSemiLagrangian2>;
55 } // namespace CubbyFlow
56 
57 #endif
std::function< double(const Vector2D &)> GetScalarSamplerFunc(const ScalarGrid2 &source) const override
Returns spatial interpolation function object for given scalar grid.
Implementation of 2-D semi-Lagrangian advection solver.
Definition: SemiLagrangian2.hpp:29
std::shared_ptr< CubicSemiLagrangian2 > CubicSemiLagrangian2Ptr
Definition: CubicSemiLagrangian2.hpp:54
Abstract base class for N-D scalar grid structure.
Definition: ScalarGrid.hpp:24
Definition: pybind11Utils.hpp:20
N-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid.hpp:31
Implementation of 2-D cubic semi-Lagrangian advection solver.
Definition: CubicSemiLagrangian2.hpp:23
Abstract base class for N-D collocated vector grid structure.
Definition: CollocatedVectorGrid.hpp:22
std::function< Vector2D(const Vector2D &)> GetVectorSamplerFunc(const CollocatedVectorGrid2 &source) const override
Returns spatial interpolation function object for given collocated vector grid.