CubbyFlow::GridBoundaryConditionSolver3 Class Referenceabstract

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

#include <Core/Solver/Grid/GridBoundaryConditionSolver3.hpp>

Inheritance diagram for CubbyFlow::GridBoundaryConditionSolver3:
CubbyFlow::GridFractionalBoundaryConditionSolver3 CubbyFlow::GridBlockedBoundaryConditionSolver3

Public Member Functions

 GridBoundaryConditionSolver3 ()=default
 Default constructor. More...
 
 GridBoundaryConditionSolver3 (const GridBoundaryConditionSolver3 &)=delete
 Deleted copy constructor. More...
 
 GridBoundaryConditionSolver3 (GridBoundaryConditionSolver3 &&) noexcept=delete
 Deleted move constructor. More...
 
virtual ~GridBoundaryConditionSolver3 ()=default
 Default virtual destructor. More...
 
GridBoundaryConditionSolver3operator= (const GridBoundaryConditionSolver3 &)=delete
 Deleted copy assignment operator. More...
 
GridBoundaryConditionSolver3operator= (GridBoundaryConditionSolver3 &&) noexcept=delete
 Deleted move assignment operator. More...
 
const Collider3PtrGetCollider () const
 Returns associated collider. More...
 
void UpdateCollider (const Collider3Ptr &newCollider, const Vector3UZ &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin)
 Applies new collider and build the internals. More...
 
int GetClosedDomainBoundaryFlag () 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 GetColliderSDF () const =0
 Returns the signed distance field of the collider. More...
 
virtual VectorField3Ptr GetColliderVelocityField () const =0
 Returns the velocity field of the collider. More...
 

Protected Member Functions

virtual void OnColliderUpdated (const Vector3UZ &gridSize, const Vector3D &gridSpacing, const Vector3D &gridOrigin)=0
 Invoked when a new collider is set. More...
 
const Vector3UZGetGridSize () const
 Returns the size of the velocity grid to be constrained. More...
 
const Vector3DGetGridSpacing () const
 Returns the spacing of the velocity grid to be constrained. More...
 
const Vector3DGetGridOrigin () 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() [1/3]

CubbyFlow::GridBoundaryConditionSolver3::GridBoundaryConditionSolver3 ( )
default

Default constructor.

◆ GridBoundaryConditionSolver3() [2/3]

CubbyFlow::GridBoundaryConditionSolver3::GridBoundaryConditionSolver3 ( const GridBoundaryConditionSolver3 )
delete

Deleted copy constructor.

◆ GridBoundaryConditionSolver3() [3/3]

CubbyFlow::GridBoundaryConditionSolver3::GridBoundaryConditionSolver3 ( GridBoundaryConditionSolver3 &&  )
deletenoexcept

Deleted move constructor.

◆ ~GridBoundaryConditionSolver3()

virtual CubbyFlow::GridBoundaryConditionSolver3::~GridBoundaryConditionSolver3 ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ ConstrainVelocity()

virtual void CubbyFlow::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 CubbyFlow::GridFractionalBoundaryConditionSolver3, and CubbyFlow::GridBlockedBoundaryConditionSolver3.

◆ GetClosedDomainBoundaryFlag()

int CubbyFlow::GridBoundaryConditionSolver3::GetClosedDomainBoundaryFlag ( ) const

Returns the closed domain boundary flag.

◆ GetCollider()

const Collider3Ptr& CubbyFlow::GridBoundaryConditionSolver3::GetCollider ( ) const

Returns associated collider.

◆ GetColliderSDF()

virtual ScalarField3Ptr CubbyFlow::GridBoundaryConditionSolver3::GetColliderSDF ( ) const
pure virtual

Returns the signed distance field of the collider.

Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver3.

◆ GetColliderVelocityField()

virtual VectorField3Ptr CubbyFlow::GridBoundaryConditionSolver3::GetColliderVelocityField ( ) const
pure virtual

Returns the velocity field of the collider.

Implemented in CubbyFlow::GridFractionalBoundaryConditionSolver3.

◆ GetGridOrigin()

const Vector3D& CubbyFlow::GridBoundaryConditionSolver3::GetGridOrigin ( ) const
protected

Returns the origin of the velocity grid to be constrained.

◆ GetGridSize()

const Vector3UZ& CubbyFlow::GridBoundaryConditionSolver3::GetGridSize ( ) const
protected

Returns the size of the velocity grid to be constrained.

◆ GetGridSpacing()

const Vector3D& CubbyFlow::GridBoundaryConditionSolver3::GetGridSpacing ( ) const
protected

Returns the spacing of the velocity grid to be constrained.

◆ OnColliderUpdated()

virtual void CubbyFlow::GridBoundaryConditionSolver3::OnColliderUpdated ( const Vector3UZ gridSize,
const Vector3D gridSpacing,
const Vector3D gridOrigin 
)
protectedpure virtual

◆ operator=() [1/2]

GridBoundaryConditionSolver3& CubbyFlow::GridBoundaryConditionSolver3::operator= ( const GridBoundaryConditionSolver3 )
delete

Deleted copy assignment operator.

◆ operator=() [2/2]

GridBoundaryConditionSolver3& CubbyFlow::GridBoundaryConditionSolver3::operator= ( GridBoundaryConditionSolver3 &&  )
deletenoexcept

Deleted move assignment operator.

◆ SetClosedDomainBoundaryFlag()

void CubbyFlow::GridBoundaryConditionSolver3::SetClosedDomainBoundaryFlag ( int  flag)

Sets the closed domain boundary flag.

◆ UpdateCollider()

void CubbyFlow::GridBoundaryConditionSolver3::UpdateCollider ( const Collider3Ptr newCollider,
const Vector3UZ 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: