Loading...
Searching...
No Matches
GridDiffusionSolver2.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_DIFFUSION_SOLVER2_HPP
12#define CUBBYFLOW_GRID_DIFFUSION_SOLVER2_HPP
13
18
19namespace CubbyFlow
20{
31{
32 public:
35
38
41
44
47
50
62 double timeIntervalInSeconds, ScalarGrid2* dest,
65 std::numeric_limits<double>::max() },
67 -std::numeric_limits<double>::max() }) = 0;
68
79 virtual void Solve(
81 double timeIntervalInSeconds, CollocatedVectorGrid2* dest,
83 ConstantScalarField2{ std::numeric_limits<double>::max() },
85 -std::numeric_limits<double>::max() }) = 0;
86
97 virtual void Solve(const FaceCenteredGrid2& source,
99 double timeIntervalInSeconds, FaceCenteredGrid2* dest,
102 std::numeric_limits<double>::max() },
104 -std::numeric_limits<double>::max() }) = 0;
105};
106
108using GridDiffusionSolver2Ptr = std::shared_ptr<GridDiffusionSolver2>;
109} // namespace CubbyFlow
110
111#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
GridDiffusionSolver2(const GridDiffusionSolver2 &)=delete
Deleted copy constructor.
GridDiffusionSolver2()=default
Default constructor.
GridDiffusionSolver2(GridDiffusionSolver2 &&) noexcept=delete
Deleted move constructor.
virtual 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() })=0
virtual 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() })=0
virtual 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() })=0
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
std::shared_ptr< GridDiffusionSolver2 > GridDiffusionSolver2Ptr
Shared pointer type for the GridDiffusionSolver2.
Definition GridDiffusionSolver2.hpp:108