Loading...
Searching...
No Matches
GridForwardEulerDiffusionSolver2.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_GRID_FORWARD_EULER_DIFFUSION_SOLVER2_HPP
12#define CUBBYFLOW_GRID_FORWARD_EULER_DIFFUSION_SOLVER2_HPP
13
15
16namespace CubbyFlow
17{
30{
31 public:
34
37 delete;
38
42
45
49
53
65 double timeIntervalInSeconds, ScalarGrid2* dest,
67 ConstantScalarField2{ std::numeric_limits<double>::max() },
69 -std::numeric_limits<double>::max() }) override;
70
82 double timeIntervalInSeconds, CollocatedVectorGrid2* dest,
84 ConstantScalarField2{ std::numeric_limits<double>::max() },
86 -std::numeric_limits<double>::max() }) override;
87
99 double timeIntervalInSeconds, FaceCenteredGrid2* dest,
101 ConstantScalarField2{ std::numeric_limits<double>::max() },
103 -std::numeric_limits<double>::max() }) override;
104
105 private:
106 void BuildMarkers(const Vector2UZ& size,
107 const std::function<Vector2D(const Vector2UZ&)>& pos,
109 const ScalarField2& fluidSDF);
110
111 Array2<char> m_markers;
112};
113
116 std::shared_ptr<GridForwardEulerDiffusionSolver2>;
117} // namespace CubbyFlow
118
119#endif
Abstract base class for N-D collocated vector grid structure.
Definition CollocatedVectorGrid.hpp:23
N-D constant scalar field.
Definition ConstantScalarField.hpp:21
N-D face-centered (a.k.a MAC or staggered) grid.
Definition FaceCenteredGrid.hpp:32
Abstract base class for 2-D grid-based diffusion equation solver.
Definition GridDiffusionSolver2.hpp:31
2-D grid-based forward Euler diffusion solver.
Definition GridForwardEulerDiffusionSolver2.hpp:30
void Solve(const ScalarGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2{ std::numeric_limits< double >::max() }, const ScalarField2 &fluidSDF=ConstantScalarField2{ -std::numeric_limits< double >::max() }) override
GridForwardEulerDiffusionSolver2(const GridForwardEulerDiffusionSolver2 &)=delete
Deleted copy constructor.
void Solve(const FaceCenteredGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2{ std::numeric_limits< double >::max() }, const ScalarField2 &fluidSDF=ConstantScalarField2{ -std::numeric_limits< double >::max() }) override
void Solve(const CollocatedVectorGrid2 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid2 *dest, const ScalarField2 &boundarySDF=ConstantScalarField2{ std::numeric_limits< double >::max() }, const ScalarField2 &fluidSDF=ConstantScalarField2{ -std::numeric_limits< double >::max() }) override
GridForwardEulerDiffusionSolver2()=default
Default constructor.
GridForwardEulerDiffusionSolver2(GridForwardEulerDiffusionSolver2 &&) noexcept=delete
Deleted move constructor.
Definition Matrix.hpp:30
Abstract base class for N-D scalar field.
Definition ScalarField.hpp:25
Abstract base class for N-D scalar grid structure.
Definition ScalarGrid.hpp:25
Definition pybind11Utils.hpp:21
ScalarField< 2 > ScalarField2
2-D ScalarField type.
Definition ScalarField.hpp:61
Vector2< double > Vector2D
Definition Matrix.hpp:774
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
Vector2< size_t > Vector2UZ
Definition Matrix.hpp:776
std::shared_ptr< GridForwardEulerDiffusionSolver2 > GridForwardEulerDiffusionSolver2Ptr
Shared pointer type for the GridForwardEulerDiffusionSolver2.
Definition GridForwardEulerDiffusionSolver2.hpp:116