Loading...
Searching...
No Matches
GridBoundaryConditionSolver3.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_BOUNDARY_CONDITION_SOLVER3_HPP
12#define CUBBYFLOW_GRID_BOUNDARY_CONDITION_SOLVER3_HPP
13
17
18namespace CubbyFlow
19{
28{
29 public:
32
35
38 delete;
39
42
46
50
53
69
72
75
84 unsigned int extrapolationDepth = 5) = 0;
85
88
91
97
100
103
106
107 private:
108 Collider3Ptr m_collider;
109 Vector3UZ m_gridSize;
110 Vector3D m_gridSpacing;
111 Vector3D m_gridOrigin;
112 int m_closedDomainBoundaryFlag = DIRECTION_ALL;
113};
114
118} // namespace CubbyFlow
119
120#endif
N-D face-centered (a.k.a MAC or staggered) grid.
Definition FaceCenteredGrid.hpp:32
Abstract base class for 3-D boundary condition solver for grids.
Definition GridBoundaryConditionSolver3.hpp:28
const Vector3D & GetGridSpacing() const
Returns the spacing of the velocity grid to be constrained.
void SetClosedDomainBoundaryFlag(int flag)
Sets the closed domain boundary flag.
void UpdateCollider(const Collider3Ptr &newCollider, const Vector3UZ &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin)
Applies new collider and build the internals.
const Collider3Ptr & GetCollider() const
Returns associated collider.
virtual void OnColliderUpdated(const Vector3UZ &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin)=0
Invoked when a new collider is set.
int GetClosedDomainBoundaryFlag() const
Returns the closed domain boundary flag.
GridBoundaryConditionSolver3()=default
Default constructor.
virtual void ConstrainVelocity(FaceCenteredGrid3 *velocity, unsigned int extrapolationDepth=5)=0
GridBoundaryConditionSolver3(const GridBoundaryConditionSolver3 &)=delete
Deleted copy constructor.
const Vector3UZ & GetGridSize() const
Returns the size of the velocity grid to be constrained.
virtual ScalarField3Ptr GetColliderSDF() const =0
Returns the signed distance field of the collider.
virtual VectorField3Ptr GetColliderVelocityField() const =0
Returns the velocity field of the collider.
const Vector3D & GetGridOrigin() const
Returns the origin of the velocity grid to be constrained.
GridBoundaryConditionSolver3(GridBoundaryConditionSolver3 &&) noexcept=delete
Deleted move constructor.
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
std::shared_ptr< Collider3 > Collider3Ptr
Shared pointer type for the Collider3.
Definition Collider.hpp:144
std::shared_ptr< ScalarField3 > ScalarField3Ptr
Shared pointer for the ScalarField3 type.
Definition ScalarField.hpp:70
constexpr int DIRECTION_ALL
All direction.
Definition Constants.hpp:332
std::shared_ptr< VectorField3 > VectorField3Ptr
Shared pointer for the VectorField3 type.
Definition VectorField.hpp:90
std::shared_ptr< GridBoundaryConditionSolver3 > GridBoundaryConditionSolver3Ptr
Shared pointer type for the GridBoundaryConditionSolver3.
Definition GridBoundaryConditionSolver3.hpp:117