N-D weakly compressible MPM fluid transfer state. More...
#include <Core/Particle/MPM/MPMFluidSystemData.hpp>
Public Types | |
| using | Base = MPMTransferSystemData< N > |
| using | MatrixType = Matrix< double, N, N > |
Public Types inherited from CubbyFlow::MPMTransferSystemData< N > | |
| using | Base = ParticleSystemData< N > |
Public Types inherited from CubbyFlow::ParticleSystemData< N > | |
| using | ScalarData = Array1< double > |
| Scalar data chunk. | |
| using | VectorData = Array1< Vector< double, N > > |
| Vector data chunk. | |
Public Member Functions | |
| MPMFluidSystemData (const Vector< size_t, N > &resolution=Vector< size_t, N >::MakeConstant(1), const Vector< double, N > &gridSpacing=Vector< double, N >::MakeConstant(1.0), const Vector< double, N > &gridOrigin=Vector< double, N >{}, size_t numberOfParticles=0) | |
| Constructs fluid MPM state with a vertex-centered background grid. | |
| void | Resize (size_t newNumberOfParticles) override |
| Resizes particle state, initializing new fluid attributes. | |
| void | Deserialize (const std::vector< uint8_t > &buffer) override |
| Deserializes inherited particle state and resets fluid state. | |
| void | Set (const ParticleSystemData< N > &other) override |
| Copies inherited particle state and resets fluid state. | |
| ConstArrayView1< double > | VolumeRatios () const |
| Returns current-to-reference particle volume ratios. | |
| ArrayView1< double > | VolumeRatios () |
| Returns current-to-reference particle volume ratios. | |
| ConstArrayView1< MatrixType > | VelocityGradients () const |
| Returns particle velocity gradients interpolated from the grid. | |
| ArrayView1< MatrixType > | VelocityGradients () |
| Returns particle velocity gradients interpolated from the grid. | |
| void | TransferFromGridToParticles (double timeStepInSeconds) |
Public Member Functions inherited from CubbyFlow::MPMTransferSystemData< N > | |
| MPMTransferSystemData (const Vector< size_t, N > &resolution=Vector< size_t, N >::MakeConstant(1), const Vector< double, N > &gridSpacing=Vector< double, N >::MakeConstant(1.0), const Vector< double, N > &gridOrigin=Vector< double, N >{}, size_t numberOfParticles=0) | |
| Constructs transfer state with a vertex-centered background grid. | |
| void | Resize (size_t newNumberOfParticles) override |
| Resizes particle state, initializing new transfer attributes. | |
| void | Deserialize (const std::vector< uint8_t > &buffer) override |
| Deserializes inherited particle state and resets transfer state. | |
| void | Set (const ParticleSystemData< N > &other) override |
| Copies inherited particle state and resets transfer state. | |
| void | ResizeGrid (const Vector< size_t, N > &resolution, const Vector< double, N > &gridSpacing, const Vector< double, N > &gridOrigin) |
| Resizes the background grid without changing particle state. | |
| ConstArrayView1< double > | ParticleMasses () const |
| Returns per-particle masses. | |
| ArrayView1< double > | ParticleMasses () |
| Returns per-particle masses. | |
| ConstArrayView1< double > | InitialVolumes () const |
| Returns per-particle initial volumes. | |
| ArrayView1< double > | InitialVolumes () |
| Returns per-particle initial volumes. | |
| const VertexCenteredScalarGrid< N > & | GridMass () const |
| Returns grid mass. | |
| VertexCenteredScalarGrid< N > & | GridMass () |
| Returns grid mass. | |
| const VertexCenteredVectorGrid< N > & | GridVelocities () const |
| Returns current grid velocities. | |
| VertexCenteredVectorGrid< N > & | GridVelocities () |
| Returns current grid velocities. | |
| const VertexCenteredVectorGrid< N > & | GridVelocitiesBeforeUpdate () const |
| Returns grid velocities before the grid update. | |
| VertexCenteredVectorGrid< N > & | GridVelocitiesBeforeUpdate () |
| Returns grid velocities before the grid update. | |
| double | FLIPBlendingFactor () const |
| Returns the FLIP fraction used for grid-to-particle transfer. | |
| void | SetFLIPBlendingFactor (double factor) |
| Sets the FLIP fraction used for grid-to-particle transfer. | |
| void | TransferFromParticlesToGrid () |
Public Member Functions inherited from CubbyFlow::ParticleSystemData< N > | |
| ParticleSystemData () | |
| Default constructor. | |
| ParticleSystemData (size_t numberOfParticles) | |
| Constructs particle system data with given number of particles. | |
| ~ParticleSystemData () override=default | |
| Default virtual destructor. | |
| ParticleSystemData (const ParticleSystemData &other) | |
| Copy constructor. | |
| ParticleSystemData (ParticleSystemData &&other) noexcept | |
| Move constructor. | |
| ParticleSystemData & | operator= (const ParticleSystemData &other) |
| Copy assignment operator. | |
| ParticleSystemData & | operator= (ParticleSystemData &&other) noexcept |
| Move assignment operator. | |
| size_t | NumberOfParticles () const |
| Returns the number of particles. | |
| size_t | AddScalarData (double initialVal=0.0) |
| Adds a scalar data layer and returns its index. | |
| size_t | AddVectorData (const Vector< double, N > &initialVal=Vector< double, N >{}) |
| Adds a vector data layer and returns its index. | |
| double | Radius () const |
| Returns the radius of the particles. | |
| virtual void | SetRadius (double newRadius) |
| Sets the radius of the particles. | |
| double | Mass () const |
| Returns the mass of the particles. | |
| virtual void | SetMass (double newMass) |
| Sets the mass of the particles. | |
| ConstArrayView1< Vector< double, N > > | Positions () const |
| Returns the position array (immutable). | |
| ArrayView1< Vector< double, N > > | Positions () |
| Returns the position array (mutable). | |
| ConstArrayView1< Vector< double, N > > | Velocities () const |
| Returns the velocity array (immutable). | |
| ArrayView1< Vector< double, N > > | Velocities () |
| Returns the velocity array (mutable). | |
| ConstArrayView1< Vector< double, N > > | Forces () const |
| Returns the force array (immutable). | |
| ArrayView1< Vector< double, N > > | Forces () |
| Returns the force array (mutable). | |
| ConstArrayView1< double > | ScalarDataAt (size_t idx) const |
| Returns custom scalar data layer at given index (immutable). | |
| ArrayView1< double > | ScalarDataAt (size_t idx) |
| Returns custom scalar data layer at given index (mutable). | |
| ConstArrayView1< Vector< double, N > > | VectorDataAt (size_t idx) const |
| Returns custom vector data layer at given index (immutable). | |
| ArrayView1< Vector< double, N > > | VectorDataAt (size_t idx) |
| Returns custom vector data layer at given index (mutable). | |
| void | AddParticle (const Vector< double, N > &newPosition, const Vector< double, N > &newVelocity=Vector< double, N >(), const Vector< double, N > &newForce=Vector< double, N >()) |
| Adds a particle to the data structure. | |
| void | AddParticles (const ConstArrayView1< Vector< double, N > > &newPositions, const ConstArrayView1< Vector< double, N > > &newVelocities=ConstArrayView1< Vector< double, N > >(), const ConstArrayView1< Vector< double, N > > &newForces=ConstArrayView1< Vector< double, N > >()) |
| Adds particles to the data structure. | |
| const std::shared_ptr< PointNeighborSearcher< N > > & | NeighborSearcher () const |
| Returns neighbor searcher. | |
| void | SetNeighborSearcher (const std::shared_ptr< PointNeighborSearcher< N > > &newNeighborSearcher) |
| Sets neighbor searcher. | |
| const Array1< Array1< size_t > > & | NeighborLists () const |
| Returns neighbor lists. | |
| void | BuildNeighborSearcher (double maxSearchRadius) |
| Builds neighbor searcher with given search radius. | |
| void | BuildNeighborLists (double maxSearchRadius) |
| Builds neighbor lists with given search radius. | |
| void | Serialize (std::vector< uint8_t > *buffer) const override |
| Serializes this particle system data to the buffer. | |
| void | Deserialize (const std::vector< uint8_t > &buffer) override |
| Deserializes this particle system data from the buffer. | |
Public Member Functions inherited from CubbyFlow::Serializable | |
| Serializable ()=default | |
| Default constructor. | |
| Serializable (const Serializable &)=default | |
| Default copy constructor. | |
| Serializable (Serializable &&) noexcept=default | |
| Default move constructor. | |
| virtual | ~Serializable ()=default |
| Default virtual destructor. | |
| Serializable & | operator= (const Serializable &)=default |
| Default copy assignment operator. | |
| Serializable & | operator= (Serializable &&) noexcept=default |
| Default move assignment operator. | |
Detailed Description
class CubbyFlow::MPMFluidSystemData< N >
N-D weakly compressible MPM fluid transfer state.
Stores the particle volume ratio and velocity gradient required by a fluid constitutive model without carrying snow deformation or plasticity state.
Member Typedef Documentation
◆ Base
| using CubbyFlow::MPMFluidSystemData< N >::Base = MPMTransferSystemData<N> |
◆ MatrixType
Constructor & Destructor Documentation
◆ MPMFluidSystemData()
|
explicit |
Constructs fluid MPM state with a vertex-centered background grid.
Member Function Documentation
◆ Deserialize()
|
overridevirtual |
Deserializes inherited particle state and resets fluid state.
Implements CubbyFlow::Serializable.
◆ Resize()
|
overridevirtual |
Resizes particle state, initializing new fluid attributes.
Reimplemented from CubbyFlow::ParticleSystemData< N >.
◆ Set()
|
overridevirtual |
Copies inherited particle state and resets fluid state.
Reimplemented from CubbyFlow::ParticleSystemData< N >.
◆ TransferFromGridToParticles()
| void CubbyFlow::MPMFluidSystemData< N >::TransferFromGridToParticles | ( | double | timeStepInSeconds | ) |
Transfers updated grid velocities and advances fluid kinematic state.
The volume ratio is updated by the determinant of the incremental deformation gradient, I + dt * velocityGradient.
◆ VelocityGradients() [1/2]
| ArrayView1< typename MPMFluidSystemData< N >::MatrixType > CubbyFlow::MPMFluidSystemData< N >::VelocityGradients | ( | ) |
Returns particle velocity gradients interpolated from the grid.
◆ VelocityGradients() [2/2]
| ConstArrayView1< typename MPMFluidSystemData< N >::MatrixType > CubbyFlow::MPMFluidSystemData< N >::VelocityGradients | ( | ) | const |
Returns particle velocity gradients interpolated from the grid.
◆ VolumeRatios() [1/2]
| ArrayView1< double > CubbyFlow::MPMFluidSystemData< N >::VolumeRatios | ( | ) |
Returns current-to-reference particle volume ratios.
◆ VolumeRatios() [2/2]
| ConstArrayView1< double > CubbyFlow::MPMFluidSystemData< N >::VolumeRatios | ( | ) | const |
Returns current-to-reference particle volume ratios.
The documentation for this class was generated from the following files:
- Core/Particle/MPM/MPMFluidSystemData.hpp
- Core/Particle/MPM/MPMFluidSystemData-Impl.hpp
Public Types inherited from
1.9.8