Jet  v1.3.3
Public Member Functions | Protected Member Functions | List of all members
jet::GridBoundaryConditionSolver3 Class Referenceabstract

Abstract base class for 3-D boundary condition solver for grids. More...

#include <jet/grid_boundary_condition_solver3.h>

Inheritance diagram for jet::GridBoundaryConditionSolver3:
jet::GridFractionalBoundaryConditionSolver3 jet::GridBlockedBoundaryConditionSolver3

Public Member Functions

 GridBoundaryConditionSolver3 ()
 Default constructor. More...
 
virtual ~GridBoundaryConditionSolver3 ()
 Default destructor. More...
 
const Collider3Ptrcollider () const
 Returns associated collider. More...
 
void updateCollider (const Collider3Ptr &newCollider, const Size3 &gridSize, const Vector3D &gridSpacing, const Vector3D &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 (FaceCenteredGrid3 *velocity, unsigned int extrapolationDepth=5)=0
 
virtual ScalarField3Ptr colliderSdf () const =0
 Returns the signed distance field of the collider. More...
 
virtual VectorField3Ptr colliderVelocityField () const =0
 Returns the velocity field of the collider. More...
 

Protected Member Functions

virtual void onColliderUpdated (const Size3 &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin)=0
 Invoked when a new collider is set. More...
 
const Size3gridSize () const
 Returns the size of the velocity grid to be constrained. More...
 
const Vector3DgridSpacing () const
 Returns the spacing of the velocity grid to be constrained. More...
 
const Vector3DgridOrigin () const
 Returns the origin of the velocity grid to be constrained. More...
 

Detailed Description

Abstract base class for 3-D boundary condition solver for grids.

This is a helper class to constrain the 3-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.

Constructor & Destructor Documentation

◆ GridBoundaryConditionSolver3()

jet::GridBoundaryConditionSolver3::GridBoundaryConditionSolver3 ( )

Default constructor.

◆ ~GridBoundaryConditionSolver3()

virtual jet::GridBoundaryConditionSolver3::~GridBoundaryConditionSolver3 ( )
virtual

Default destructor.

Member Function Documentation

◆ closedDomainBoundaryFlag()

int jet::GridBoundaryConditionSolver3::closedDomainBoundaryFlag ( ) const

Returns the closed domain boundary flag.

◆ collider()

const Collider3Ptr& jet::GridBoundaryConditionSolver3::collider ( ) const

Returns associated collider.

◆ colliderSdf()

virtual ScalarField3Ptr jet::GridBoundaryConditionSolver3::colliderSdf ( ) const
pure virtual

Returns the signed distance field of the collider.

Implemented in jet::GridFractionalBoundaryConditionSolver3.

◆ colliderVelocityField()

virtual VectorField3Ptr jet::GridBoundaryConditionSolver3::colliderVelocityField ( ) const
pure virtual

Returns the velocity field of the collider.

Implemented in jet::GridFractionalBoundaryConditionSolver3.

◆ constrainVelocity()

virtual void jet::GridBoundaryConditionSolver3::constrainVelocity ( FaceCenteredGrid3 velocity,
unsigned int  extrapolationDepth = 5 
)
pure virtual

Constrains the velocity field to conform the collider boundary.

Parameters
velocityInput and output velocity grid.
extrapolationDepthNumber of inner-collider grid cells that velocity will get extrapolated.

Implemented in jet::GridFractionalBoundaryConditionSolver3, and jet::GridBlockedBoundaryConditionSolver3.

◆ gridOrigin()

const Vector3D& jet::GridBoundaryConditionSolver3::gridOrigin ( ) const
protected

Returns the origin of the velocity grid to be constrained.

◆ gridSize()

const Size3& jet::GridBoundaryConditionSolver3::gridSize ( ) const
protected

Returns the size of the velocity grid to be constrained.

◆ gridSpacing()

const Vector3D& jet::GridBoundaryConditionSolver3::gridSpacing ( ) const
protected

Returns the spacing of the velocity grid to be constrained.

◆ onColliderUpdated()

virtual void jet::GridBoundaryConditionSolver3::onColliderUpdated ( const Size3 gridSize,
const Vector3D gridSpacing,
const Vector3D gridOrigin 
)
protectedpure virtual

Invoked when a new collider is set.

Implemented in jet::GridFractionalBoundaryConditionSolver3, and jet::GridBlockedBoundaryConditionSolver3.

◆ setClosedDomainBoundaryFlag()

void jet::GridBoundaryConditionSolver3::setClosedDomainBoundaryFlag ( int  flag)

Sets the closed domain boundary flag.

◆ updateCollider()

void jet::GridBoundaryConditionSolver3::updateCollider ( const Collider3Ptr newCollider,
const Size3 gridSize,
const Vector3D gridSpacing,
const Vector3D 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.

Parameters
newColliderNew collider to apply.
gridSizeSize of the velocity grid to be constrained.
gridSpacingGrid spacing of the velocity grid to be constrained.
gridOriginOrigin of the velocity grid to be constrained.

The documentation for this class was generated from the following file: