N-D material point method solver for snow. More...
#include <Core/Solver/Particle/MPM/SnowMPMSolver.hpp>
Classes | |
| class | Builder |
| Front-end to create SnowMPMSolver objects step by step. More... | |
| struct | LinearSystem |
| struct | LinearSystemBLAS |
Public Types | |
| using | Base = std::conditional_t< N==2, ParticleSystemSolver2, ParticleSystemSolver3 > |
| using | MatrixType = Matrix< double, N, N > |
| using | VectorType = Vector< double, N > |
| using | SizeType = Vector< size_t, N > |
Public Member Functions | |
| SnowMPMSolver (const SizeType &resolution=SizeType::MakeConstant(32), const VectorType &gridSpacing=VectorType::MakeConstant(1.0), const VectorType &gridOrigin=VectorType{}, double radius=1e-3, double mass=1e-3) | |
| Constructs an empty snow MPM solver. | |
| std::shared_ptr< MPMSystemData< N > > | GetMPMSystemData () const |
| Returns the owned MPM particle and grid state. | |
| double | GetTimeStepLimitScale () const |
| Returns the scale applied to adaptive time-step limits. | |
| void | SetTimeStepLimitScale (double newScale) |
Sets the adaptive time-step scale in (0, 1]. | |
| bool | GetIsUsingSemiImplicit () const |
| Returns whether the elastic grid update is semi-implicit. | |
| void | SetIsUsingSemiImplicit (bool isUsing) |
| Enables or disables the semi-implicit elastic grid update. | |
| unsigned int | GetMaxNumberOfIterations () const |
| Returns the maximum conjugate-residual iteration count. | |
| void | SetMaxNumberOfIterations (unsigned int maxNumberOfIterations) |
| double | GetTolerance () const |
| Returns the relative conjugate-residual tolerance. | |
| void | SetTolerance (double tolerance) |
| Sets the positive finite tolerance relative to the initial residual. | |
| unsigned int | GetLastNumberOfIterations () const |
| Returns the iteration count from the last semi-implicit solve. | |
| double | GetLastResidual () const |
| Returns the relative residual from the last semi-implicit solve. | |
| int | GetClosedDomainBoundaryFlag () const |
| Returns the closed domain boundary flag. | |
| void | SetClosedDomainBoundaryFlag (int flag) |
| Sets the closed domain boundary flag. | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns a builder for SnowMPMSolver. | |
Protected Member Functions | |
| void | OnInitialize () override |
| Initializes particle-grid state before the first adaptive step query. | |
| unsigned int | GetNumberOfSubTimeSteps (double timeIntervalInSeconds) const override |
| Returns the number of adaptive sub-time-steps. | |
| void | AccumulateForces (double timeStepInSeconds) override |
| Snow forces are integrated on the background grid. | |
| void | OnBeginAdvanceTimeStep (double timeStepInSeconds) override |
| Advances particle-grid snow state before base particle integration. | |
| void | OnEndAdvanceTimeStep (double timeStepInSeconds) override |
| Projects particles back into selected closed domain boundaries. | |
Detailed Description
class CubbyFlow::SnowMPMSolver< N >
N-D material point method solver for snow.
Uses fixed-corotated elastoplastic snow response with the existing MPM particle-grid transfers and particle-solver collision lifecycle. When semi-implicit integration is enabled, failures are reported before particle state is advanced.
- Exceptions
-
std::runtime_error If the semi-implicit linear solve does not converge or produces a non-finite result. std::invalid_argument If the constitutive state or its stress differential is invalid or non-finite.
Member Typedef Documentation
◆ Base
| using CubbyFlow::SnowMPMSolver< N >::Base = std::conditional_t<N == 2, ParticleSystemSolver2, ParticleSystemSolver3> |
◆ MatrixType
◆ SizeType
◆ VectorType
Constructor & Destructor Documentation
◆ SnowMPMSolver()
|
explicit |
Constructs an empty snow MPM solver.
Member Function Documentation
◆ AccumulateForces()
|
overrideprotected |
Snow forces are integrated on the background grid.
◆ GetBuilder()
|
static |
Returns a builder for SnowMPMSolver.
◆ GetClosedDomainBoundaryFlag()
| int CubbyFlow::SnowMPMSolver< N >::GetClosedDomainBoundaryFlag | ( | ) | const |
Returns the closed domain boundary flag.
◆ GetIsUsingSemiImplicit()
| bool CubbyFlow::SnowMPMSolver< N >::GetIsUsingSemiImplicit | ( | ) | const |
Returns whether the elastic grid update is semi-implicit.
◆ GetLastNumberOfIterations()
| unsigned int CubbyFlow::SnowMPMSolver< N >::GetLastNumberOfIterations | ( | ) | const |
Returns the iteration count from the last semi-implicit solve.
◆ GetLastResidual()
| double CubbyFlow::SnowMPMSolver< N >::GetLastResidual | ( | ) | const |
Returns the relative residual from the last semi-implicit solve.
◆ GetMaxNumberOfIterations()
| unsigned int CubbyFlow::SnowMPMSolver< N >::GetMaxNumberOfIterations | ( | ) | const |
Returns the maximum conjugate-residual iteration count.
◆ GetMPMSystemData()
| std::shared_ptr< MPMSystemData< N > > CubbyFlow::SnowMPMSolver< N >::GetMPMSystemData | ( | ) | const |
Returns the owned MPM particle and grid state.
◆ GetNumberOfSubTimeSteps()
|
overrideprotected |
Returns the number of adaptive sub-time-steps.
◆ GetTimeStepLimitScale()
| double CubbyFlow::SnowMPMSolver< N >::GetTimeStepLimitScale | ( | ) | const |
Returns the scale applied to adaptive time-step limits.
◆ GetTolerance()
| double CubbyFlow::SnowMPMSolver< N >::GetTolerance | ( | ) | const |
Returns the relative conjugate-residual tolerance.
◆ OnBeginAdvanceTimeStep()
|
overrideprotected |
Advances particle-grid snow state before base particle integration.
◆ OnEndAdvanceTimeStep()
|
overrideprotected |
Projects particles back into selected closed domain boundaries.
◆ OnInitialize()
|
overrideprotected |
Initializes particle-grid state before the first adaptive step query.
◆ SetClosedDomainBoundaryFlag()
| void CubbyFlow::SnowMPMSolver< N >::SetClosedDomainBoundaryFlag | ( | int | flag | ) |
Sets the closed domain boundary flag.
◆ SetIsUsingSemiImplicit()
| void CubbyFlow::SnowMPMSolver< N >::SetIsUsingSemiImplicit | ( | bool | isUsing | ) |
Enables or disables the semi-implicit elastic grid update.
◆ SetMaxNumberOfIterations()
| void CubbyFlow::SnowMPMSolver< N >::SetMaxNumberOfIterations | ( | unsigned int | maxNumberOfIterations | ) |
Sets the maximum conjugate-residual iteration count. Zero permits only an already-converged solve; any nonzero residual makes the update fail.
◆ SetTimeStepLimitScale()
| void CubbyFlow::SnowMPMSolver< N >::SetTimeStepLimitScale | ( | double | newScale | ) |
Sets the adaptive time-step scale in (0, 1].
◆ SetTolerance()
| void CubbyFlow::SnowMPMSolver< N >::SetTolerance | ( | double | tolerance | ) |
Sets the positive finite tolerance relative to the initial residual.
The documentation for this class was generated from the following files:
- Core/Solver/Particle/MPM/SnowMPMSolver.hpp
- Core/Solver/Particle/MPM/SnowMPMSolver-Impl.hpp
1.9.8