AdvectionSolver2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: AdvectionSolver2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: Abstract based class for 2-D grid-based advection solver.
6 > Created Time: 2017/08/07
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_ADVECTION_SOLVER2_H
10 #define CUBBYFLOW_ADVECTION_SOLVER2_H
11 
16 #include <Core/Grid/ScalarGrid2.h>
17 
18 namespace CubbyFlow
19 {
27  {
28  public:
30 
31  virtual ~AdvectionSolver2();
32 
51  virtual void Advect(
52  const ScalarGrid2& input,
53  const VectorField2& flow,
54  double dt,
55  ScalarGrid2* output,
56  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max())) = 0;
57 
76  virtual void Advect(
77  const CollocatedVectorGrid2& input,
78  const VectorField2& flow,
79  double dt,
80  CollocatedVectorGrid2* output,
81  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max()));
82 
102  virtual void Advect(
103  const FaceCenteredGrid2& input,
104  const VectorField2& flow,
105  double dt,
106  FaceCenteredGrid2* output,
107  const ScalarField2& boundarySDF = ConstantScalarField2(std::numeric_limits<double>::max()));
108  };
109 
111  using AdvectionSolver2Ptr = std::shared_ptr<AdvectionSolver2>;
112 }
113 
114 #endif
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
std::shared_ptr< AdvectionSolver2 > AdvectionSolver2Ptr
Shared pointer type for the 2-D advection solver.
Definition: AdvectionSolver2.h:111
2-D constant scalar field.
Definition: ConstantScalarField2.h:17
Abstract based class for 2-D grid-based advection solver.
Definition: AdvectionSolver2.h:26
Abstract base class for 2-D vector field.
Definition: VectorField2.h:21
virtual void Advect(const ScalarGrid2 &input, const VectorField2 &flow, double dt, ScalarGrid2 *output, const ScalarField2 &boundarySDF=ConstantScalarField2(std::numeric_limits< double >::max()))=0
Solves advection equation for given scalar grid.
Abstract base class for 2-D scalar grid structure.
Definition: ScalarGrid2.h:21