|
Jet
v1.3.3
|
3-D Affine Particle-in-Cell (APIC) implementation More...
#include <jet/apic_solver3.h>
Classes | |
| class | Builder |
| Front-end to create ApicSolver3 objects step by step. More... | |
Public Member Functions | |
| ApicSolver3 () | |
| Default constructor. More... | |
| ApicSolver3 (const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~ApicSolver3 () |
| Default destructor. More... | |
Public Member Functions inherited from jet::PicSolver3 | |
| PicSolver3 () | |
| Default constructor. More... | |
| PicSolver3 (const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~PicSolver3 () |
| Default destructor. More... | |
| ScalarGrid3Ptr | signedDistanceField () const |
| Returns the signed-distance field of particles. More... | |
| const ParticleSystemData3Ptr & | particleSystemData () const |
| Returns the particle system data. More... | |
| const ParticleEmitter3Ptr & | particleEmitter () const |
| Returns the particle emitter. More... | |
| void | setParticleEmitter (const ParticleEmitter3Ptr &newEmitter) |
| Sets the particle emitter. More... | |
Public Member Functions inherited from jet::GridFluidSolver3 | |
| GridFluidSolver3 () | |
| Default constructor. More... | |
| GridFluidSolver3 (const Size3 &resolution, const Vector3D &gridSpacing, const Vector3D &gridOrigin) | |
| Constructs solver with initial grid size. More... | |
| virtual | ~GridFluidSolver3 () |
| Default destructor. More... | |
| const Vector3D & | gravity () const |
| Returns the gravity vector of the system. More... | |
| void | setGravity (const Vector3D &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 AdvectionSolver3Ptr & | advectionSolver () const |
| Returns the advection solver instance. More... | |
| void | setAdvectionSolver (const AdvectionSolver3Ptr &newSolver) |
| Sets the advection solver. More... | |
| const GridDiffusionSolver3Ptr & | diffusionSolver () const |
| Returns the diffusion solver instance. More... | |
| void | setDiffusionSolver (const GridDiffusionSolver3Ptr &newSolver) |
| Sets the diffusion solver. More... | |
| const GridPressureSolver3Ptr & | pressureSolver () const |
| Returns the pressure solver instance. More... | |
| void | setPressureSolver (const GridPressureSolver3Ptr &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 GridSystemData3Ptr & | gridSystemData () const |
| Returns the grid system data. More... | |
| void | resizeGrid (const Size3 &newSize, const Vector3D &newGridSpacing, const Vector3D &newGridOrigin) |
| Resizes grid system data. More... | |
| Size3 | resolution () const |
| Returns the resolution of the grid system data. More... | |
| Vector3D | gridSpacing () const |
| Returns the grid spacing of the grid system data. More... | |
| Vector3D | gridOrigin () const |
| Returns the origin of the grid system data. More... | |
| const FaceCenteredGrid3Ptr & | velocity () const |
| Returns the velocity field. More... | |
| const Collider3Ptr & | collider () const |
| Returns the collider. More... | |
| void | setCollider (const Collider3Ptr &newCollider) |
| Sets the collider. More... | |
| const GridEmitter3Ptr & | emitter () const |
| Returns the emitter. More... | |
| void | setEmitter (const GridEmitter3Ptr &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 ApicSolver3. More... | |
Static Public Member Functions inherited from jet::PicSolver3 | |
| static Builder | builder () |
| Returns builder fox PicSolver3. More... | |
Static Public Member Functions inherited from jet::GridFluidSolver3 | |
| static Builder | builder () |
| Returns builder fox GridFluidSolver3. 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::PicSolver3 | |
| 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... | |
| ScalarField3Ptr | 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::GridFluidSolver3 | |
| 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 (ScalarGrid3 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| void | extrapolateIntoCollider (CollocatedVectorGrid3 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| void | extrapolateIntoCollider (FaceCenteredGrid3 *grid) |
| Extrapolates given field into the collider-occupied region. More... | |
| ScalarField3Ptr | colliderSdf () const |
| Returns the signed-distance field representation of the collider. More... | |
| VectorField3Ptr | colliderVelocityField () const |
| Returns the velocity field of the collider. More... | |
Additional Inherited Members | |
Protected Attributes inherited from jet::PicSolver3 | |
| Array3< char > | _uMarkers |
| Array3< char > | _vMarkers |
| Array3< char > | _wMarkers |
3-D Affine Particle-in-Cell (APIC) implementation
This class implements 3-D Affine Particle-in-Cell (APIC) solver from the SIGGRAPH paper, Jiang 2015.
| jet::ApicSolver3::ApicSolver3 | ( | ) |
Default constructor.
| jet::ApicSolver3::ApicSolver3 | ( | const Size3 & | resolution, |
| const Vector3D & | gridSpacing, | ||
| const Vector3D & | gridOrigin | ||
| ) |
Constructs solver with initial grid size.
|
virtual |
Default destructor.
|
static |
Returns builder fox ApicSolver3.
|
overrideprotectedvirtual |
Transfers velocity field from grids to particles.
Reimplemented from jet::PicSolver3.
|
overrideprotectedvirtual |
Transfers velocity field from particles to grids.
Reimplemented from jet::PicSolver3.
1.8.18