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