| 
    Jet
    v1.3.3
    
   | 
 
Abstract base class for 2-D boundary condition solver for grids. More...
#include <jet/grid_boundary_condition_solver2.h>
  
Public Member Functions | |
| GridBoundaryConditionSolver2 () | |
| Default constructor.  More... | |
| virtual | ~GridBoundaryConditionSolver2 () | 
| Default destructor.  More... | |
| const Collider2Ptr & | collider () const | 
| Returns associated collider.  More... | |
| void | updateCollider (const Collider2Ptr &newCollider, const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin) | 
| Applies new collider and build the internals.  More... | |
| int | closedDomainBoundaryFlag () const | 
| Returns the closed domain boundary flag.  More... | |
| void | setClosedDomainBoundaryFlag (int flag) | 
| Sets the closed domain boundary flag.  More... | |
| virtual void | constrainVelocity (FaceCenteredGrid2 *velocity, unsigned int extrapolationDepth=5)=0 | 
| virtual ScalarField2Ptr | colliderSdf () const =0 | 
| Returns the signed distance field of the collider.  More... | |
| virtual VectorField2Ptr | colliderVelocityField () const =0 | 
| Returns the velocity field of the collider.  More... | |
Protected Member Functions | |
| virtual void | onColliderUpdated (const Size2 &gridSize, const Vector2D &gridSpacing, const Vector2D &gridOrigin)=0 | 
| Invoked when a new collider is set.  More... | |
| const Size2 & | gridSize () const | 
| Returns the size of the velocity grid to be constrained.  More... | |
| const Vector2D & | gridSpacing () const | 
| Returns the spacing of the velocity grid to be constrained.  More... | |
| const Vector2D & | gridOrigin () const | 
| Returns the origin of the velocity grid to be constrained.  More... | |
Abstract base class for 2-D boundary condition solver for grids.
This is a helper class to constrain the 2-D velocity field with given collider object. It also determines whether to open any domain boundaries. To control the friction level, tune the collider parameter.
| jet::GridBoundaryConditionSolver2::GridBoundaryConditionSolver2 | ( | ) | 
Default constructor.
      
  | 
  virtual | 
Default destructor.
| int jet::GridBoundaryConditionSolver2::closedDomainBoundaryFlag | ( | ) | const | 
Returns the closed domain boundary flag.
| const Collider2Ptr& jet::GridBoundaryConditionSolver2::collider | ( | ) | const | 
Returns associated collider.
      
  | 
  pure virtual | 
Returns the signed distance field of the collider.
Implemented in jet::GridFractionalBoundaryConditionSolver2.
      
  | 
  pure virtual | 
Returns the velocity field of the collider.
Implemented in jet::GridFractionalBoundaryConditionSolver2.
      
  | 
  pure virtual | 
Constrains the velocity field to conform the collider boundary.
| velocity | Input and output velocity grid. | 
| extrapolationDepth | Number of inner-collider grid cells that velocity will get extrapolated. | 
Implemented in jet::GridFractionalBoundaryConditionSolver2, and jet::GridBlockedBoundaryConditionSolver2.
      
  | 
  protected | 
Returns the origin of the velocity grid to be constrained.
      
  | 
  protected | 
Returns the size of the velocity grid to be constrained.
      
  | 
  protected | 
Returns the spacing of the velocity grid to be constrained.
      
  | 
  protectedpure virtual | 
Invoked when a new collider is set.
Implemented in jet::GridFractionalBoundaryConditionSolver2, and jet::GridBlockedBoundaryConditionSolver2.
| void jet::GridBoundaryConditionSolver2::setClosedDomainBoundaryFlag | ( | int | flag | ) | 
Sets the closed domain boundary flag.
| void jet::GridBoundaryConditionSolver2::updateCollider | ( | const Collider2Ptr & | newCollider, | 
| const Size2 & | gridSize, | ||
| const Vector2D & | gridSpacing, | ||
| const Vector2D & | gridOrigin | ||
| ) | 
Applies new collider and build the internals.
This function is called to apply new collider and build the internal cache. To provide a hint to the cache, info for the expected velocity grid that will be constrained is provided.
| newCollider | New collider to apply. | 
| gridSize | Size of the velocity grid to be constrained. | 
| gridSpacing | Grid spacing of the velocity grid to be constrained. | 
| gridOrigin | Origin of the velocity grid to be constrained. | 
 1.8.18