PhysicsBasedAnimationToolkit 0.0.10
Cross-platform C++20 library of algorithms and data structures commonly used in computer graphics research on physically-based simulation.
Loading...
Searching...
No Matches
pbat::gpu::vbd::Integrator Class Reference

The VBD public API wrapper around the VBD integrator implementation. [2]. More...

#include <Integrator.h>

Public Types

using EInitializationStrategy
 Initialization strategy.
 
using Data = pbat::sim::vbd::Data
 VBD data.
 

Public Member Functions

PBAT_API Integrator (Data const &data)
 Construct a new Integrator object.
 
 Integrator (Integrator const &)=delete
 
Integratoroperator= (Integrator const &)=delete
 
PBAT_API Integrator (Integrator &&other) noexcept
 Move constructor.
 
PBAT_API Integratoroperator= (Integrator &&other) noexcept
 Move assignment operator.
 
PBAT_API ~Integrator ()
 Destructor.
 
PBAT_API void Step (GpuScalar dt, GpuIndex iterations, GpuIndex substeps=GpuIndex{1})
 Execute one simulation step.
 
PBAT_API void TracedStep (GpuScalar dt, GpuIndex iterations, GpuIndex substeps, GpuIndex t, std::string_view dir=".")
 Execute one simulation step and trace the result.
 
PBAT_API void SetPositions (Eigen::Ref< GpuMatrixX const > const &X)
 Set the vertex positions.
 
PBAT_API void SetVelocities (Eigen::Ref< GpuMatrixX const > const &v)
 Set the vertex velocities.
 
PBAT_API void SetExternalAcceleration (Eigen::Ref< GpuMatrixX const > const &aext)
 Set the external accelerations.
 
PBAT_API void SetNumericalZeroForHessianDeterminant (GpuScalar zero)
 Set threshold for zero determinant check.
 
PBAT_API void SetRayleighDampingCoefficient (GpuScalar kD)
 Set the damping coefficient for Rayleigh damping.
 
PBAT_API void SetInitializationStrategy (EInitializationStrategy strategy)
 Sets the initialization strategy to kick-start the time step minimization.
 
PBAT_API void SetBlockSize (GpuIndex blockSize)
 Sets the GPU thread block size, for the BDF1 minimization.
 
PBAT_API void SetSceneBoundingBox (Eigen::Vector< GpuScalar, 3 > const &min, Eigen::Vector< GpuScalar, 3 > const &max)
 Sets the scene bounding box.
 
PBAT_API GpuMatrixX GetPositions () const
 Get the vertex positions.
 
PBAT_API GpuMatrixX GetVelocities () const
 Get the vertex velocities.
 

Detailed Description

The VBD public API wrapper around the VBD integrator implementation. [2].

Member Typedef Documentation

◆ EInitializationStrategy

Initial value:
EInitializationStrategy
Initialization strategies for the VBD time step minimization.
Definition Enums.h:9

Initialization strategy.

Constructor & Destructor Documentation

◆ Integrator() [1/2]

pbat::gpu::vbd::Integrator::Integrator ( Data const & data)

Construct a new Integrator object.

Parameters
dataVBD data

◆ Integrator() [2/2]

pbat::gpu::vbd::Integrator::Integrator ( Integrator && other)
noexcept

Move constructor.

Parameters
otherOther object

Member Function Documentation

◆ GetPositions()

GpuMatrixX pbat::gpu::vbd::Integrator::GetPositions ( ) const

Get the vertex positions.

Returns
|# dims|x|# vertices| array of vertex positions

◆ GetVelocities()

GpuMatrixX pbat::gpu::vbd::Integrator::GetVelocities ( ) const

Get the vertex velocities.

Returns
|# dims|x|# vertices| array of vertex velocities

◆ operator=()

Integrator & pbat::gpu::vbd::Integrator::operator= ( Integrator && other)
noexcept

Move assignment operator.

Parameters
otherOther object
Returns
Reference to this object

◆ SetBlockSize()

void pbat::gpu::vbd::Integrator::SetBlockSize ( GpuIndex blockSize)

Sets the GPU thread block size, for the BDF1 minimization.

Parameters
blockSize# threads per block, should be a multiple of 32

◆ SetExternalAcceleration()

void pbat::gpu::vbd::Integrator::SetExternalAcceleration ( Eigen::Ref< GpuMatrixX const > const & aext)

Set the external accelerations.

Parameters
aext3x|# vertices| array of external accelerations

◆ SetInitializationStrategy()

void pbat::gpu::vbd::Integrator::SetInitializationStrategy ( EInitializationStrategy strategy)

Sets the initialization strategy to kick-start the time step minimization.

Parameters
strategyInitialization strategy

◆ SetNumericalZeroForHessianDeterminant()

void pbat::gpu::vbd::Integrator::SetNumericalZeroForHessianDeterminant ( GpuScalar zero)

Set threshold for zero determinant check.

Parameters
zeroNumerical zero used in Hessian determinant check for approximate singularity detection

◆ SetPositions()

void pbat::gpu::vbd::Integrator::SetPositions ( Eigen::Ref< GpuMatrixX const > const & X)

Set the vertex positions.

Parameters
X3x|# vertices| array of vertex positions

◆ SetRayleighDampingCoefficient()

void pbat::gpu::vbd::Integrator::SetRayleighDampingCoefficient ( GpuScalar kD)

Set the damping coefficient for Rayleigh damping.

Parameters
kDDamping coefficient

◆ SetSceneBoundingBox()

void pbat::gpu::vbd::Integrator::SetSceneBoundingBox ( Eigen::Vector< GpuScalar, 3 > const & min,
Eigen::Vector< GpuScalar, 3 > const & max )

Sets the scene bounding box.

Parameters
minMinimum corner of the bounding box
maxMaximum corner of the bounding box

◆ SetVelocities()

void pbat::gpu::vbd::Integrator::SetVelocities ( Eigen::Ref< GpuMatrixX const > const & v)

Set the vertex velocities.

Parameters
v3x|# vertices| array of vertex velocities

◆ Step()

void pbat::gpu::vbd::Integrator::Step ( GpuScalar dt,
GpuIndex iterations,
GpuIndex substeps = GpuIndex{1} )

Execute one simulation step.

Parameters
dtTime step
iterationsNumber of optimization iterations per substep
substepsNumber of substeps

◆ TracedStep()

void pbat::gpu::vbd::Integrator::TracedStep ( GpuScalar dt,
GpuIndex iterations,
GpuIndex substeps,
GpuIndex t,
std::string_view dir = "." )

Execute one simulation step and trace the result.

  • Saves matrix market files which follow the pattern {variable}.t.{timestep}.s.{substep}[.k.{iteration}].mtx
Parameters
dtTime step
iterationsNumber of optimization iterations per substep
substepsNumber of substeps
tCurrent time step
dirDirectory to save the matrix market files

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