GridDiffusionSolver2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: GridDiffusionSolver2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract base class for 2-D grid-based diffusion equation solver.
6 > Created Time: 2017/08/10
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_GRID_DIFFUSION_SOLVER2_H
10 #define CUBBYFLOW_GRID_DIFFUSION_SOLVER2_H
11 
15 #include <Core/Grid/ScalarGrid2.h>
16 
17 namespace CubbyFlow
18 {
29  {
30  public:
33 
35  virtual ~GridDiffusionSolver2();
36 
47  virtual void Solve(
48  const ScalarGrid2& source,
49  double diffusionCoefficient,
50  double timeIntervalInSeconds,
51  ScalarGrid2* dest,
52  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max()),
53  const ScalarField2& fluidSDF = ConstantScalarField2(-std::numeric_limits<double>::max())) = 0;
54 
65  virtual void Solve(
66  const CollocatedVectorGrid2& source,
67  double diffusionCoefficient,
68  double timeIntervalInSeconds,
70  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max()),
71  const ScalarField2& fluidSDF = ConstantScalarField2(-std::numeric_limits<double>::max())) = 0;
72 
83  virtual void Solve(
84  const FaceCenteredGrid2& source,
85  double diffusionCoefficient,
86  double timeIntervalInSeconds,
87  FaceCenteredGrid2* dest,
88  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max()),
89  const ScalarField2& fluidSDF = ConstantScalarField2(-std::numeric_limits<double>::max())) = 0;
90  };
91 
93  using GridDiffusionSolver2Ptr = std::shared_ptr<GridDiffusionSolver2>;
94 }
95 
96 #endif
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
GridDiffusionSolver2()
Default constructor.
Abstract base class for 2-D scalar field.
Definition: ScalarField2.h:21
Abstract base class for 2-D collocated vector grid structure.
Definition: CollocatedVectorGrid2.h:19
2-D face-centered (a.k.a MAC or staggered) grid.
Definition: FaceCenteredGrid2.h:25
Definition: pybind11Utils.h:24
virtual ~GridDiffusionSolver2()
Default destructor.
2-D constant scalar field.
Definition: ConstantScalarField2.h:17
Abstract base class for 2-D scalar grid structure.
Definition: ScalarGrid2.h:21
Abstract base class for 2-D grid-based diffusion equation solver.
Definition: GridDiffusionSolver2.h:28
std::shared_ptr< GridDiffusionSolver2 > GridDiffusionSolver2Ptr
Shared pointer type for the GridDiffusionSolver2.
Definition: GridDiffusionSolver2.h:93