|
Jet
v1.3.3
|
2-D Affine Particle-in-Cell (APIC) implementation More...
#include <jet/apic_solver2.h>
Classes | |
| class | Builder |
| Front-end to create ApicSolver2 objects step by step. More... | |
Public Member Functions | |
| ApicSolver2 () | |
| Default constructor. More... | |
| ApicSolver2 (const Size2 &resolution, const Vector2D &gridSpacing, const Vector2D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~ApicSolver2 () |
| Default destructor. More... | |
Public Member Functions inherited from jet::PicSolver2 | |
| PicSolver2 () | |
| Default constructor. More... | |
| PicSolver2 (const Size2 &resolution, const Vector2D &gridSpacing, const Vector2D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~PicSolver2 () |
| Default destructor. More... | |
| ScalarGrid2Ptr | signedDistanceField () const |
| Returns the signed-distance field of particles. More... | |
| const ParticleSystemData2Ptr & | particleSystemData () const |
| Returns the particle system data. More... | |
| const ParticleEmitter2Ptr & | particleEmitter () const |
| Returns the particle emitter. More... | |
| void | setParticleEmitter (const ParticleEmitter2Ptr &newEmitter) |
| Sets the particle emitter. More... | |
Public Member Functions inherited from jet::GridFluidSolver2 | |
| GridFluidSolver2 () | |
| Default constructor. More... | |
| GridFluidSolver2 (const Size2 &resolution, const Vector2D &gridSpacing, const Vector2D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~GridFluidSolver2 () |
| Default destructor. More... | |
| const Vector2D & | gravity () const |
| Returns the gravity vector of the system. More... | |
| void | setGravity (const Vector2D &newGravity) |
| Sets the gravity of the system. More... | |
| double | viscosityCoefficient () const |
| Returns the viscosity coefficient. More... | |
| void | setViscosityCoefficient (double newValue) |
| Sets the viscosity coefficient. More... | |
| double | cfl (double timeIntervalInSeconds) const |
| Returns the CFL number from the current velocity field for given time interval. More... | |
| double | maxCfl () const |
| Returns the max allowed CFL number. More... | |
| void | setMaxCfl (double newCfl) |
| Sets the max allowed CFL number. More... | |
| bool | useCompressedLinearSystem () const |
| Returns true if the solver is using compressed linear system. More... | |
| void | setUseCompressedLinearSystem (bool onoff) |
| Sets whether the solver should use compressed linear system. More... | |
| const AdvectionSolver2Ptr & | advectionSolver () const |
| Returns the advection solver instance. More... | |
| void | setAdvectionSolver (const AdvectionSolver2Ptr &newSolver) |
| Sets the advection solver. More... | |
| const GridDiffusionSolver2Ptr & | diffusionSolver () const |
| Returns the diffusion solver instance. More... | |
| void | setDiffusionSolver (const GridDiffusionSolver2Ptr &newSolver) |
| Sets the diffusion solver. More... | |
| const GridPressureSolver2Ptr & | pressureSolver () const |
| Returns the pressure solver instance. More... | |
| void | setPressureSolver (const GridPressureSolver2Ptr &newSolver) |
| Sets the pressure solver. More... | |
| int | closedDomainBoundaryFlag () const |
| Returns the closed domain boundary flag. More... | |
| void | setClosedDomainBoundaryFlag (int flag) |
| Sets the closed domain boundary flag. More... | |
| const GridSystemData2Ptr & | gridSystemData () const |
| Returns the grid system data. More... | |
| void | resizeGrid (const Size2 &newSize, const Vector2D &newGridSpacing, const Vector2D &newGridOrigin) |
| Resizes grid system data. More... | |
| Size2 | resolution () const |
| Returns the resolution of the grid system data. More... | |
| Vector2D | gridSpacing () const |
| Returns the grid spacing of the grid system data. More... | |
| Vector2D | gridOrigin () const |
| Returns the origin of the grid system data. More... | |
| const FaceCenteredGrid2Ptr & | velocity () const |
| Returns the velocity field. More... | |
| const Collider2Ptr & | collider () const |
| Returns the collider. More... | |
| void | setCollider (const Collider2Ptr &newCollider) |
| Sets the collider. More... | |
| const GridEmitter2Ptr & | emitter () const |
| Returns the emitter. More... | |
| void | setEmitter (const GridEmitter2Ptr &newEmitter) |
| Sets the emitter. More... | |
Public Member Functions inherited from jet::PhysicsAnimation | |
| PhysicsAnimation () | |
| Default constructor. More... | |
| virtual | ~PhysicsAnimation () |
| Destructor. More... | |
| bool | isUsingFixedSubTimeSteps () const |
| Returns true if fixed sub-timestepping is used. More... | |
| void | setIsUsingFixedSubTimeSteps (bool isUsing) |
| Sets true if fixed sub-timestepping is used. More... | |
| unsigned int | numberOfFixedSubTimeSteps () const |
| Returns the number of fixed sub-timesteps. More... | |
| void | setNumberOfFixedSubTimeSteps (unsigned int numberOfSteps) |
| Sets the number of fixed sub-timesteps. More... | |
| void | advanceSingleFrame () |
| Advances a single frame. More... | |
| Frame | currentFrame () const |
| Returns current frame. More... | |
| void | setCurrentFrame (const Frame &frame) |
| Sets current frame cursor (but do not invoke update()). More... | |
| double | currentTimeInSeconds () const |
| Returns current time in seconds. More... | |
Public Member Functions inherited from jet::Animation | |
| Animation () | |
| virtual | ~Animation () |
| void | update (const Frame &frame) |
Updates animation state for given frame. More... | |
Static Public Member Functions | |
| static Builder | builder () |
| Returns builder fox ApicSolver2. More... | |
Static Public Member Functions inherited from jet::PicSolver2 | |
| static Builder | builder () |
| Returns builder fox PicSolver2. More... | |
Static Public Member Functions inherited from jet::GridFluidSolver2 | |
| static Builder | builder () |
| Returns builder fox GridFluidSolver2. More... | |
Protected Member Functions | |
| void | transferFromParticlesToGrids () override |
| Transfers velocity field from particles to grids. More... | |
| void | transferFromGridsToParticles () override |
| Transfers velocity field from grids to particles. More... | |
Protected Member Functions inherited from jet::PicSolver2 | |
| void | onInitialize () override |
| Initializes the simulator. More... | |
| void | onBeginAdvanceTimeStep (double timeIntervalInSeconds) override |
| Invoked before a simulation time-step begins. More... | |
| void | computeAdvection (double timeIntervalInSeconds) override |
| Computes the advection term of the fluid solver. More... | |
| ScalarField2Ptr | fluidSdf () const override |
| Returns the signed-distance field of the fluid. More... | |
| virtual void | moveParticles (double timeIntervalInSeconds) |
| Moves particles. More... | |
Protected Member Functions inherited from jet::GridFluidSolver2 | |
| void | onAdvanceTimeStep (double timeIntervalInSeconds) override |
| Called when advancing a single time-step. More... | |
| unsigned int | numberOfSubTimeSteps (double timeIntervalInSeconds) const override |
| Returns the required sub-time-steps for given time interval. More... | |
| virtual void | onEndAdvanceTimeStep (double timeIntervalInSeconds) |
| Called at the end of a time-step. More... | |
| virtual void | computeExternalForces (double timeIntervalInSeconds) |
| Computes the external force terms. More... | |
| virtual void | computeViscosity (double timeIntervalInSeconds) |
| Computes the viscosity term using the diffusion solver. More... | |
| virtual void | computePressure (double timeIntervalInSeconds) |
| Computes the pressure term using the pressure solver. More... | |
| void | computeGravity (double timeIntervalInSeconds) |
| Computes the gravity term. More... | |
| void | applyBoundaryCondition () |
| Applies the boundary condition to the velocity field. More... | |
| void | extrapolateIntoCollider (ScalarGrid2 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| void | extrapolateIntoCollider (CollocatedVectorGrid2 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| void | extrapolateIntoCollider (FaceCenteredGrid2 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| ScalarField2Ptr | colliderSdf () const |
| Returns the signed-distance field representation of the collider. More... | |
| VectorField2Ptr | colliderVelocityField () const |
| Returns the velocity field of the collider. More... | |
Additional Inherited Members | |
Protected Attributes inherited from jet::PicSolver2 | |
| Array2< char > | _uMarkers |
| Array2< char > | _vMarkers |
2-D Affine Particle-in-Cell (APIC) implementation
This class implements 2-D Affine Particle-in-Cell (APIC) solver from the SIGGRAPH paper, Jiang 2015.
| jet::ApicSolver2::ApicSolver2 | ( | ) |
Default constructor.
| jet::ApicSolver2::ApicSolver2 | ( | const Size2 & | resolution, |
| const Vector2D & | gridSpacing, | ||
| const Vector2D & | gridOrigin | ||
| ) |
Constructs solver with initial grid size.
|
virtual |
Default destructor.
|
static |
Returns builder fox ApicSolver2.
|
overrideprotectedvirtual |
Transfers velocity field from grids to particles.
Reimplemented from jet::PicSolver2.
|
overrideprotectedvirtual |
Transfers velocity field from particles to grids.
Reimplemented from jet::PicSolver2.
1.8.18