Loading...
Searching...
No Matches
GridForwardEulerDiffusionSolver3.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_SOLVER3_HPP
12#define CUBBYFLOW_GRID_FORWARD_EULER_DIFFUSION_SOLVER3_HPP
13
15
16namespace CubbyFlow
17{
30{
31 public:
34
37 delete;
38
42
45
49
53
65 double timeIntervalInSeconds, ScalarGrid3* dest,
67 ConstantScalarField3{ std::numeric_limits<double>::max() },
69 -std::numeric_limits<double>::max() }) override;
70
82 double timeIntervalInSeconds, CollocatedVectorGrid3* dest,
84 ConstantScalarField3{ std::numeric_limits<double>::max() },
86 -std::numeric_limits<double>::max() }) override;
87
99 double timeIntervalInSeconds, FaceCenteredGrid3* dest,
101 ConstantScalarField3{ std::numeric_limits<double>::max() },
103 -std::numeric_limits<double>::max() }) override;
104
105 private:
106 void BuildMarkers(const Vector3UZ& size,
107 const std::function<Vector3D(const Vector3UZ&)>& pos,
109 const ScalarField3& fluidSDF);
110
111 Array3<char> m_markers;
112};
113
116 std::shared_ptr<GridForwardEulerDiffusionSolver3>;
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 3-D grid-based diffusion equation solver.
Definition GridDiffusionSolver3.hpp:31
3-D grid-based forward Euler diffusion solver.
Definition GridForwardEulerDiffusionSolver3.hpp:30
GridForwardEulerDiffusionSolver3()=default
Default constructor.
void Solve(const ScalarGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, ScalarGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
GridForwardEulerDiffusionSolver3(const GridForwardEulerDiffusionSolver3 &)=delete
Deleted copy constructor.
GridForwardEulerDiffusionSolver3(GridForwardEulerDiffusionSolver3 &&) noexcept=delete
Deleted move constructor.
void Solve(const CollocatedVectorGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, CollocatedVectorGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
void Solve(const FaceCenteredGrid3 &source, double diffusionCoefficient, double timeIntervalInSeconds, FaceCenteredGrid3 *dest, const ScalarField3 &boundarySDF=ConstantScalarField3{ std::numeric_limits< double >::max() }, const ScalarField3 &fluidSDF=ConstantScalarField3{ -std::numeric_limits< double >::max() }) override
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
Vector3< double > Vector3D
Definition Matrix.hpp:787
ScalarField< 3 > ScalarField3
3-D ScalarField type.
Definition ScalarField.hpp:64
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
std::shared_ptr< GridForwardEulerDiffusionSolver3 > GridForwardEulerDiffusionSolver3Ptr
Shared pointer type for the GridForwardEulerDiffusionSolver3.
Definition GridForwardEulerDiffusionSolver3.hpp:116
Vector3< size_t > Vector3UZ
Definition Matrix.hpp:789