|
peclet-dem 1.1.0
Performance-portable XPBD Discrete Element Method (Kokkos + ArborX)
|
Host-facing facade with std::vector setters/getters (binding-agnostic). More...
#include <sim.hpp>
Public Member Functions | |
| Simulation (int capacity) | |
| ~Simulation () | |
| void | releaseViews () |
| int | addAnalyticWall (const std::vector< int > &nodeInts, const std::vector< float > &nodeReals, int root, bool invert, float restitution, float friction) |
| Add an ANALYTIC wall from a core shape tree in the flat encoding (Layer 1). | |
| void | setDomain (float lx, float ly, float lz, bool px, bool py, bool pz) |
| void | setDomainMinMax (F3 mn, F3 mx) |
| void | enablePeriodicity (bool x, bool y, bool z) |
| void | setDomainCanonical (F3 extent, F3 origin, bool px, bool py, bool pz) |
| std::tuple< float, float, float > | domainOrigin () const |
| std::tuple< float, float, float > | domainExtent () const |
| std::tuple< bool, bool, bool > | domainPeriodic () const |
| void | setGravity (float gx, float gy, float gz) |
| std::tuple< float, float, float > | gravity () const |
| void | setThermostat (float temperature, float tau, float kB) |
| void | setSolverIterations (int pos, int vel) |
| void | setVelocityUseGS (bool useGS) |
| bool | velocityUseGS () const |
| void | setStabilizationMode (const std::string &mode) |
| Select the stabilization pass of the staged velocity solve: "off" (pure symmetric PGS), "onesided" (default: held-lower-side grounded impulses – arrests any collapse but is a momentum sink), "multilevel" (GraphMG contact-graph aggregation: coarse inelastic solves at super-body masses – momentum-conserving transport acceleration), "escalate" (extra symmetric sweeps up to 256; diagnostic/fallback), "ordered" (level-ordered symmetric sweeps; measurement mode, known insufficient for deep columns). | |
| std::string | stabilizationMode () const |
| void | setRestitutionModel (const std::string &model) |
| Restitution model of the PGS velocity solve: "newton" (default; per-substep restitution with Moreau's target, -e x the pre-solve normal velocity on every closed contact above the resting threshold — docs/contact_physics_followups.md §4) or "poisson" (event-level: each pair banks its kinetic compression impulse and releases e x the bank as a budget-capped separation-velocity target during unloading — restores the multi-substep-impact rebound that per-substep restitution structurally cannot return; it keeps Newton's per-substep targets, -e x the approach on approaching contacts only, R-C4). | |
| std::string | restitutionModel () const |
| void | setSleeping (bool enabled, float threshold_scale=2.0f, int consecutive=64, float wake_scale=40.0f, bool wake_on_lost_contact=false, float immovable_frac=0.01f) |
Island sleeping / freezing (single-GPU statics, default ON; enabled=False disables). | |
| bool | sleeping () const |
| True while island sleeping is enabled. | |
| void | setVerletSkin (float skin_frac) |
| Verlet-cached impulse broadphase (single-GPU, non-periodic; default OFF). | |
| float | verletSkin () const |
| void | setCudaGraphs (bool enabled) |
| CUDA-graph replay of the solver's iteration loops (single-rank CUDA; default ON). | |
| bool | cudaGraphs () const |
| void | setFusedSweeps (const std::string &mode) |
| Fused colour sweeps (CUDA): run a whole sweep — and where eligible the whole adaptive iteration loop — as ONE kernel iterating device-side behind software grid barriers. | |
| std::string | fusedSweeps () const |
| void | setIncrementalColoring (bool enabled) |
| Incremental (warm-started) graph colouring of the contact manifolds (default ON): reuse last substep's colours and repair only the conflicts instead of recolouring from scratch. | |
| bool | incrementalColoring () const |
| void | setShellDetection (const std::string &mode) |
| Narrow-phase shell detection of the XPBD engine (step / step_mpi / relax / compute_overlaps; the Hertz engine is unaffected): "one_way" (default: the lower-index body's shell points against the other's SDF) or "two_way" (shell pairs are probed from both sides, and a sphere-shell pair always takes the exact sphere probe). | |
| std::string | shellDetection () const |
| int | numAsleep () |
| Number of currently-sleeping real bodies (diagnostics / tests). | |
| void | setHertzMaterial (int mat, float youngs, float poisson) |
| Per-material Young's modulus + Poisson ratio for the Hertz-Mindlin engine (material ids as in setMaterialIds; without ids every particle is material 0). | |
| void | stepHertz (int substeps, float skin_frac) |
Advance substeps explicit soft-sphere Hertz-Mindlin steps of the stored dt (device-side loop; the (e, mu) pairs come from the impulse solver's material tables). | |
| void | setGlobalScale (float s) |
| float | globalScale () const |
| void | setDt (float dt) |
| The time step every stepper uses (suite/docs/NAMING.md 1.5). | |
| float | dt () const |
| int | capacity () const |
| void | setMaterialParams (float restitution_normal, float restitution_tangent, float friction) |
| void | setMaterialIds (const std::vector< int > &ids) |
| Per-particle material ids (0..kMaxMaterials-1); pair (e, mu) values come from setPairMaterial. | |
| void | setPairMaterial (int a, int b, float restitution, float friction) |
| Set the symmetric pair material (restitution, friction) for material ids (a, b). | |
| void | setWallMaterialId (int wid, int mat) |
| Give an SDF wall a material id so particle-wall (e, mu) also resolves via the pair table. | |
| void | addPlane (float px, float py, float pz, float nx, float ny, float nz) |
| int | addSdfWall (const std::vector< float > &grid, int nx, int ny, int nz, F3 origin, F3 spacing, float restitution, float friction) |
| void | setWallVelocity (int wallIndex, F3 linVel, F3 angVel, F3 center) |
| void | setWallTransform (int wallIndex, F3 translation, float qx, float qy, float qz, float qw) |
| std::vector< float > | wallSdfAt (int wallIndex, const std::vector< float > &pts) const |
| void | setPositions (const std::vector< float > &xyz) |
| void | setScalesUniform (float s) |
| void | setScales (const std::vector< float > &s) |
| void | setVelocities (const std::vector< float > &v) |
| void | setExternalForces (const std::vector< float > &f) |
| void | clearExternalForces () |
| void | setExternalTorques (const std::vector< float > &t) |
| void | clearExternalTorques () |
| const V3 & | externalTorquesView () const |
| const V3 & | externalForcesView () const |
| const Vf & | invMassView () const |
| void | setQuaternions (const std::vector< float > &q) |
| void | setAngularVelocities (const std::vector< float > &w) |
| void | setInvInertia (const std::vector< float > &ii) |
| void | setInvMass (const std::vector< float > &im) |
| std::vector< float > | getAngularVelocities () const |
| std::vector< float > | getInvInertia () const |
| void | setGrowthParams (float rate, float new_factor) |
| float | growthFactor () const |
| float | getGrowthRate () const |
| std::vector< float > | getMasses () const |
| std::vector< float > | getPositions () const |
| std::vector< float > | getVelocities () const |
| std::vector< float > | getQuaternions () const |
| std::vector< float > | getScales () const |
| void | step (int n=1) |
Advance n XPBD substeps of the stored dt (set_dt first; suite/docs/NAMING.md 1.5). | |
| void | relax (int n=1) |
n dynamics-free RELAXATION substeps (overlap removal only, no gravity / velocity update): the growth-packing protocol's "settle" move. | |
| float | computeOverlaps () |
| void | exportLammps (const std::string &filename, int step) const |
| void | exportSdf (const std::string &filename, int rx, int ry, int rz) |
| std::vector< float > | getSdfGrid (int rx, int ry, int rz) |
| int | numParticles () const |
| const V3 & | positionsView () const |
| const V3 & | velocitiesView () const |
| int | numContacts () |
| int | numManifolds () |
| std::pair< int, int > | debugColoringConflicts () |
| std::pair< int, int > | debugColoringLeftovers () |
| int | debugMultilevelColoringConflicts () |
| peclet::dem::SplitStats | debugSplitStats () const |
| float | maxOverlap () |
| std::tuple< double, float, int > | restBankStats () |
| Poisson-restitution diagnostics: (sum, max, count>0) of the committed per-pair owed separation impulse (prevRestBank[0:prevPairCount], physical units). | |
| std::tuple< double, float, int > | restOrphanStats () |
| Orphan-account diagnostics: (sum, max, count>0) of the per-body orphaned budget. | |
| void | writeVtp (const std::string &filename) const |
Public Member Functions inherited from peclet::dem::ShapeRegistry | |
| void | setSphereShape (float radius) |
| void | initializeShape (int shape_type, float radius, float height, float thickness) |
| int | addShape (int shape_type, float radius, float height, float thickness) |
| Append an analytic shape and return its index, for simulations with a MIXTURE of shapes. | |
| void | setShapeIds (const std::vector< int > &ids) |
| Per-particle shape assignment. | |
| int | addSdfShape (const std::vector< float > &grid, int nx, int ny, int nz, F3 origin, F3 spacing, const std::vector< float > &shellFlat, F3 invInertia, float boundingRadius) |
| Append a grid-SDF shape (the general non-spherical particle) to the mixture and return its index. | |
| int | numShapes () const |
| void | setSdfShape (const std::vector< float > &grid, int nx, int ny, int nz, F3 origin, F3 spacing, const std::vector< float > &shellFlat, F3 invInertia, float boundingRadius) |
| int | addSceneShape (const std::vector< int > &nodeInts, const std::vector< float > &nodeReals, int root, const std::vector< float > &shellFlat, F3 invInertia, float boundingRadius) |
| std::vector< float > | autoShell (const std::vector< float > &grid, int nx, int ny, int nz, F3 origin, F3 spacing, float boundingRadius) const |
| Generate a collision shell for a grid SDF by sampling its own zero level set, so a caller does not have to supply one. | |
Static Public Member Functions | |
| static void | releaseAll () |
| static std::vector< Simulation * > & | registry () |
Additional Inherited Members | |
Protected Member Functions inherited from peclet::dem::ShapeRegistry | |
| void | ensureContactCapacity () |
| void | clearShapes () |
| void | appendShape (ShapeDesc sd, const std::vector< F3 > &shell, F3 invI, float baseRadius) |
| Append one shape, taking ownership of its shell. | |
| void | uploadShapes () |
| Rebuild the device Views from the host registry. | |
Protected Attributes inherited from peclet::dem::ShapeRegistry | |
| Particles | P_ |
| float | baseRadius_ = 1.0f |
| std::vector< ShapeDesc > | shapesHost_ |
| std::vector< F3 > | shellHost_ |
| std::vector< F3 > | invIHost_ |
| std::vector< float > | baseRadiusHost_ |
| std::vector< float > | sdfSamplesHost_ |
| int | shellPoints_ = 0 |
| std::vector< peclet::core::geom::ShapeNode< float > > | shapeNodesHost_ |
| F3 | defaultInvI_ {2.5f, 2.5f, 2.5f} |
Host-facing facade with std::vector setters/getters (binding-agnostic).
|
inlineexplicit |
Definition at line 58 of file sim.hpp.
References peclet::dem::Particles::allocate(), capacity(), peclet::dem::ShapeRegistry::P_, registry(), and peclet::dem::ShapeRegistry::setSphereShape().
|
inline |
Definition at line 64 of file sim.hpp.
References registry().
|
inline |
Definition at line 73 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_.
|
inlinestatic |
|
inlinestatic |
Definition at line 85 of file sim.hpp.
Referenced by releaseAll(), Simulation(), and ~Simulation().
|
inline |
Add an ANALYTIC wall from a core shape tree in the flat encoding (Layer 1).
Replaces the voxelised container/stirrer: exact at every scale, and no per-rank replicated sample pool.
nodeInts / nodeReals are core's flat node encoding (geom/scene_builder.hpp: 3 ints and 16 reals per node, kind/aux/params/transform).
SIGN. A wall must read POSITIVE in the void where the grains live and NEGATIVE in wall material; core's leaves are negative-inside-solid. So:
Do NOT build a container from a thin TUBE and invert it: a tube's bore is already void, so inverting makes the bore read as solid and the solver pushes every grain out through it.
POSITION. An analytic wall is placed by its node TRANSFORM. Unlike add_sdf_wall, where the grid origin positions the field implicitly, a leaf with an identity transform sits at the ORIGIN – which is a domain corner in the usual [0,L]^3 setup, not the centre. Getting this wrong looks exactly like a sign error: grains start outside the body, read "solid", and are driven out of the domain.
Grid leaves are not supported inside an analytic wall tree – use add_sdf_wall for a sampled container.
Definition at line 115 of file sim.hpp.
References peclet::dem::ShapeRegistry::ensureContactCapacity(), peclet::dem::Particles::numWalls, peclet::dem::ShapeRegistry::P_, peclet::dem::WallSdf::shapeRoot, and peclet::dem::Particles::wallNodes.
Referenced by NB_MODULE().
|
inline |
Definition at line 164 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Particles::globalScale, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::skin.
Definition at line 169 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Particles::globalScale, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, peclet::dem::Domain::periodic_z, peclet::dem::Particles::skin, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 178 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, and peclet::dem::Domain::periodic_z.
Referenced by NB_MODULE().
|
inline |
Definition at line 186 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Particles::globalScale, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::skin, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 192 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Domain::min, peclet::dem::ShapeRegistry::P_, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 195 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::size, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 198 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, and peclet::dem::Domain::periodic_z.
Referenced by NB_MODULE().
|
inline |
Definition at line 201 of file sim.hpp.
References peclet::dem::Particles::gravity, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 202 of file sim.hpp.
References peclet::dem::Particles::gravity, peclet::dem::ShapeRegistry::P_, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 205 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::thermostatKB, peclet::dem::Particles::thermostatTau, and peclet::dem::Particles::thermostatTemp.
Referenced by NB_MODULE().
|
inline |
Definition at line 210 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::positionIterations, and peclet::dem::Particles::velocityIterations.
Referenced by NB_MODULE().
|
inline |
Definition at line 216 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::velocityUseGS.
|
inline |
Definition at line 217 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::velocityUseGS.
|
inline |
Select the stabilization pass of the staged velocity solve: "off" (pure symmetric PGS), "onesided" (default: held-lower-side grounded impulses – arrests any collapse but is a momentum sink), "multilevel" (GraphMG contact-graph aggregation: coarse inelastic solves at super-body masses – momentum-conserving transport acceleration), "escalate" (extra symmetric sweeps up to 256; diagnostic/fallback), "ordered" (level-ordered symmetric sweeps; measurement mode, known insufficient for deep columns).
Definition at line 224 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::stabilizationMode.
Referenced by NB_MODULE().
|
inline |
Definition at line 240 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::stabilizationMode.
Referenced by NB_MODULE().
|
inline |
Restitution model of the PGS velocity solve: "newton" (default; per-substep restitution with Moreau's target, -e x the pre-solve normal velocity on every closed contact above the resting threshold — docs/contact_physics_followups.md §4) or "poisson" (event-level: each pair banks its kinetic compression impulse and releases e x the bank as a budget-capped separation-velocity target during unloading — restores the multi-substep-impact rebound that per-substep restitution structurally cannot return; it keeps Newton's per-substep targets, -e x the approach on approaching contacts only, R-C4).
Definition at line 251 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::restitutionModel.
Referenced by NB_MODULE().
|
inline |
Definition at line 259 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::restitutionModel.
Referenced by NB_MODULE().
|
inline |
Island sleeping / freezing (single-GPU statics, default ON; enabled=False disables).
A REAL body whose linear AND angular motion stays below scale x the resting floor (2 dt |g|) for K substeps while grounded is put to sleep: velocity zeroed, integration skipped, and a manifold whose BOTH endpoints are asleep (a static wall counts) is excluded from the colouring / sweeps / multilevel hierarchy — so a settled bed collapses to the broad/narrow-phase floor. A sleeper keeps a small POSITIVE effective inverse mass in the solve (sleepImmovableFrac x its own; heavy but not perfectly rigid), so an awake body wedged between sleepers relieves against them instead of the PGS normal impulse diverging; its velocity is re-zeroed each substep so no momentum accumulates. It wakes only when disturbed (fast approaching neighbour, contact-set change, moving wall). Requires gravity on and no external (CFD-DEM drag) force; inert under MPI. wake_on_lost_contact additionally wakes a sleeper whose support disappeared (rule (b)); immovable_frac is the sleeper's effective inverse-mass fraction in the solve (0 = exactly immovable; the default 0.01 keeps it 100x a grain's mass but not infinitely rigid).
Definition at line 275 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::sleepImmovableFrac, peclet::dem::Particles::sleepingEnabled, peclet::dem::Particles::sleepK, peclet::dem::Particles::sleepScale, peclet::dem::Particles::sleepWakeLostContact, and peclet::dem::Particles::wakeScale.
Referenced by NB_MODULE().
|
inline |
True while island sleeping is enabled.
Definition at line 290 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::sleepingEnabled.
Referenced by NB_MODULE().
|
inline |
Verlet-cached impulse broadphase (single-GPU, non-periodic; default OFF).
skin_frac is the broadphase-skin fraction of the max grain radius: the ArborX rebuild is skipped while no particle has moved more than skin/2, so between rebuilds the candidate list is a superset and the narrowphase yields identical contacts. Composes with sleeping (a frozen bed never rebuilds).
Definition at line 296 of file sim.hpp.
References peclet::dem::Particles::impNumPairs, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::verletSkinFrac.
Referenced by NB_MODULE().
|
inline |
Definition at line 300 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::verletSkinFrac.
Referenced by NB_MODULE().
|
inline |
CUDA-graph replay of the solver's iteration loops (single-rank CUDA; default ON).
Capture collapses each iteration's launch storm into one replay; the arithmetic, the residual readback and the adaptive stop are unchanged, so results are bit-identical either way. Inert on every non-CUDA backend and on the distributed step (ghost syncs forbid capture).
Definition at line 305 of file sim.hpp.
References peclet::dem::Particles::cudaGraphs, and peclet::dem::ShapeRegistry::P_.
|
inline |
Definition at line 306 of file sim.hpp.
References peclet::dem::Particles::cudaGraphs, and peclet::dem::ShapeRegistry::P_.
|
inline |
Fused colour sweeps (CUDA): run a whole sweep — and where eligible the whole adaptive iteration loop — as ONE kernel iterating device-side behind software grid barriers.
"auto" (default) uses them exactly where graph replay is unavailable (the distributed step, or set_cuda_graphs(False)); "on"/"off" force. Same colour ordering, bit-identical results.
Definition at line 311 of file sim.hpp.
References peclet::dem::Particles::fusedSweeps, and peclet::dem::ShapeRegistry::P_.
|
inline |
Definition at line 321 of file sim.hpp.
References peclet::dem::Particles::fusedSweeps, and peclet::dem::ShapeRegistry::P_.
|
inline |
Incremental (warm-started) graph colouring of the contact manifolds (default ON): reuse last substep's colours and repair only the conflicts instead of recolouring from scratch.
This CHANGES RESULTS – the colouring fixes the Gauss-Seidel sweep order – so it is a numerical option, not just a speed one; False reproduces the pre-incremental behaviour.
Definition at line 328 of file sim.hpp.
References peclet::dem::Particles::incrementalColoring, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 329 of file sim.hpp.
References peclet::dem::Particles::incrementalColoring, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Narrow-phase shell detection of the XPBD engine (step / step_mpi / relax / compute_overlaps; the Hertz engine is unaffected): "one_way" (default: the lower-index body's shell points against the other's SDF) or "two_way" (shell pairs are probed from both sides, and a sphere-shell pair always takes the exact sphere probe).
CHANGES RESULTS for non-sphere bodies; costs up to 2x the narrow phase and contacts of shell pairs (docs/solver_details.md, "Two-way shell detection"; detectContactsKokkos).
Definition at line 336 of file sim.hpp.
References peclet::dem::ShapeRegistry::ensureContactCapacity(), peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::shellDetection.
Referenced by NB_MODULE().
|
inline |
Definition at line 345 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::shellDetection.
Referenced by NB_MODULE().
|
inline |
Number of currently-sleeping real bodies (diagnostics / tests).
Definition at line 347 of file sim.hpp.
References peclet::dem::Particles::asleep, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Per-material Young's modulus + Poisson ratio for the Hertz-Mindlin engine (material ids as in setMaterialIds; without ids every particle is material 0).
Definition at line 357 of file sim.hpp.
References peclet::dem::Particles::hertzE, peclet::dem::Particles::hertzNu, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Advance substeps explicit soft-sphere Hertz-Mindlin steps of the stored dt (device-side loop; the (e, mu) pairs come from the impulse solver's material tables).
Definition at line 371 of file sim.hpp.
References peclet::dem::demStepHertz(), peclet::dem::Particles::dt, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 375 of file sim.hpp.
References peclet::dem::Particles::globalScale, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::skin.
Referenced by NB_MODULE().
|
inline |
Definition at line 379 of file sim.hpp.
References peclet::dem::Particles::globalScale, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
The time step every stepper uses (suite/docs/NAMING.md 1.5).
Must be > 0; a step called before set_dt raises instead of silently running on a default.
Definition at line 382 of file sim.hpp.
References peclet::dem::Particles::dt, dt(), and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 388 of file sim.hpp.
References peclet::dem::Particles::dt, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE(), relax(), and setDt().
|
inline |
Definition at line 389 of file sim.hpp.
References peclet::dem::Particles::capacity, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE(), and Simulation().
|
inline |
Definition at line 400 of file sim.hpp.
References peclet::dem::Particles::frictionDynamic, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::restitutionNormal, and peclet::dem::Particles::restitutionTangent.
Referenced by NB_MODULE().
|
inline |
Per-particle material ids (0..kMaxMaterials-1); pair (e, mu) values come from setPairMaterial.
Ids default to 0; without any setPairMaterial call the global material applies everywhere.
Definition at line 408 of file sim.hpp.
References peclet::dem::Particles::materialId, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Set the symmetric pair material (restitution, friction) for material ids (a, b).
The first call allocates the pair table, initialised from the current global material for every pair.
Definition at line 417 of file sim.hpp.
References peclet::dem::Particles::frictionDynamic, peclet::dem::kMaxMaterials, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::pairMaterials, and peclet::dem::Particles::restitutionNormal.
Referenced by NB_MODULE().
|
inline |
Give an SDF wall a material id so particle-wall (e, mu) also resolves via the pair table.
Definition at line 439 of file sim.hpp.
References peclet::dem::Particles::numWalls, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::walls.
Referenced by NB_MODULE().
|
inline |
Definition at line 447 of file sim.hpp.
References peclet::dem::Particles::numPlanes, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::planes.
Referenced by NB_MODULE().
|
inline |
Definition at line 464 of file sim.hpp.
References peclet::dem::ShapeRegistry::ensureContactCapacity(), peclet::dem::WallSdf::grid, peclet::dem::Particles::numWalls, peclet::dem::ShapeRegistry::P_, peclet::dem::toCoreVec(), peclet::dem::Particles::wallFrictionMax, peclet::dem::Particles::wallGrid, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 505 of file sim.hpp.
Referenced by NB_MODULE().
|
inline |
Definition at line 525 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::wallNodes, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 552 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::sampleWallSdf(), and peclet::dem::Particles::wallGrid.
|
inline |
Definition at line 578 of file sim.hpp.
References peclet::dem::Particles::angVel, peclet::dem::Particles::capacity, peclet::dem::ShapeRegistry::defaultInvI_, peclet::dem::Particles::gid, peclet::dem::Particles::hertzNumPairs, peclet::dem::Particles::hertzPrevCount, peclet::dem::Particles::invInertia, peclet::dem::Particles::invMass, peclet::dem::Particles::numParticles, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::pos, peclet::dem::Particles::prevPairCount, peclet::dem::Particles::quat, peclet::dem::Particles::scale, peclet::dem::Particles::shapeId, peclet::dem::Particles::targetScale, peclet::dem::Particles::vel, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 630 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::scale, and peclet::dem::Particles::targetScale.
Referenced by NB_MODULE().
|
inline |
Definition at line 639 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::scale, and peclet::dem::Particles::targetScale.
Referenced by NB_MODULE().
|
inline |
Definition at line 646 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::vel.
Referenced by NB_MODULE().
|
inline |
Definition at line 657 of file sim.hpp.
References peclet::dem::Particles::extForce, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 666 of file sim.hpp.
References peclet::dem::Particles::extForce, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 672 of file sim.hpp.
References peclet::dem::Particles::extTorque, peclet::dem::Particles::extTorqueActive, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 682 of file sim.hpp.
References peclet::dem::Particles::extTorque, peclet::dem::Particles::extTorqueActive, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 686 of file sim.hpp.
References peclet::dem::Particles::extTorque, and peclet::dem::ShapeRegistry::P_.
|
inline |
Definition at line 687 of file sim.hpp.
References peclet::dem::Particles::extForce, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 688 of file sim.hpp.
References peclet::dem::Particles::invMass, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 691 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::quat.
Referenced by NB_MODULE().
|
inline |
Definition at line 701 of file sim.hpp.
References peclet::dem::Particles::angVel, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 710 of file sim.hpp.
References peclet::dem::Particles::invInertia, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 719 of file sim.hpp.
References peclet::dem::Particles::invMass, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 725 of file sim.hpp.
References peclet::dem::Particles::angVel, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 729 of file sim.hpp.
References peclet::dem::Particles::invInertia, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 735 of file sim.hpp.
References peclet::dem::Particles::growthFactor, peclet::dem::Particles::growthRate, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::scale, peclet::dem::Particles::targetScale, and peclet::dem::updateGrowthScalesKokkos().
Referenced by NB_MODULE().
|
inline |
Definition at line 744 of file sim.hpp.
References peclet::dem::Particles::growthFactor, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 745 of file sim.hpp.
References peclet::dem::Particles::growthRate, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 748 of file sim.hpp.
References peclet::dem::Particles::invMass, peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 757 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::pos.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 761 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::vel.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 765 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::quat.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 769 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::scale.
Referenced by NB_MODULE().
|
inline |
Advance n XPBD substeps of the stored dt (set_dt first; suite/docs/NAMING.md 1.5).
Definition at line 774 of file sim.hpp.
References peclet::dem::demStep(), peclet::dem::SplitStats::mlHubAggregated, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::splitStats.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
n dynamics-free RELAXATION substeps (overlap removal only, no gravity / velocity update): the growth-packing protocol's "settle" move.
Runs the pipeline with dt = 0 and restores the stored dt afterwards; does not require set_dt.
Definition at line 783 of file sim.hpp.
References peclet::dem::demStep(), peclet::dem::Particles::dt, dt(), peclet::dem::SplitStats::mlHubAggregated, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::splitStats.
Referenced by NB_MODULE().
|
inline |
Definition at line 793 of file sim.hpp.
References peclet::dem::computeOverlapsKokkos(), and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 797 of file sim.hpp.
References peclet::dem::ShapeRegistry::baseRadius_, peclet::dem::Particles::domain, getPositions(), getQuaternions(), getVelocities(), peclet::dem::Particles::globalScale, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, peclet::dem::Domain::periodic_z, peclet::dem::Particles::scale, step(), and peclet::dem::writeLammpsDump().
Referenced by NB_MODULE().
|
inline |
Definition at line 809 of file sim.hpp.
References peclet::dem::Particles::domain, getSdfGrid(), peclet::dem::Domain::max, peclet::dem::Domain::min, peclet::dem::ShapeRegistry::P_, peclet::dem::writeSdfVti(), peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 951 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::generateSdfKokkos(), peclet::dem::Particles::globalScale, peclet::dem::Domain::max, peclet::dem::Domain::min, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, peclet::dem::Domain::periodic_z, peclet::dem::Particles::pos, peclet::dem::Particles::quat, peclet::dem::Particles::scale, peclet::dem::Particles::sdfGrid, peclet::dem::Particles::shapeId, and peclet::dem::Particles::shapes.
Referenced by exportSdf(), and NB_MODULE().
|
inline |
Definition at line 958 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Definition at line 962 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::pos.
Referenced by NB_MODULE().
|
inline |
Definition at line 963 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::vel.
Referenced by NB_MODULE().
|
inline |
Definition at line 964 of file sim.hpp.
References peclet::dem::Particles::contactCount, peclet::dem::ShapeRegistry::P_, and peclet::dem::readInt().
Referenced by NB_MODULE().
|
inline |
Definition at line 965 of file sim.hpp.
References peclet::dem::Particles::manifoldCount, peclet::dem::ShapeRegistry::P_, and peclet::dem::readInt().
Referenced by NB_MODULE().
|
inline |
Definition at line 970 of file sim.hpp.
References peclet::dem::Particles::capacity, peclet::dem::Particles::contactCount, peclet::dem::Particles::contacts, peclet::dem::Particles::manifoldColor, peclet::dem::Particles::manifoldCount, peclet::dem::Particles::manifolds, peclet::dem::PhaseCopies::nCopies, peclet::dem::PhaseCopies::nHubs, peclet::dem::Particles::numParticles, peclet::dem::Particles::numPosUnits, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::posCopies, peclet::dem::readInt(), peclet::dem::Particles::realIndices, peclet::dem::SlotOverride::slotA(), peclet::dem::PhaseCopies::slotA, peclet::dem::SlotOverride::slotB(), peclet::dem::PhaseCopies::slotB, peclet::dem::PhaseCopies::slotBase, peclet::dem::Particles::unitColor, peclet::dem::Particles::unitContacts, peclet::dem::Particles::unitStart, and peclet::dem::Particles::velCopies.
|
inline |
Definition at line 1043 of file sim.hpp.
References peclet::dem::kColorUncolourable, peclet::dem::Particles::manifoldColor, peclet::dem::Particles::manifoldCount, peclet::dem::Particles::numPosUnits, peclet::dem::ShapeRegistry::P_, peclet::dem::readInt(), peclet::dem::Particles::unitColor, and peclet::dem::Particles::velocityUseGS.
|
inline |
Definition at line 1071 of file sim.hpp.
References peclet::dem::kMlSlotSkip, peclet::dem::Particles::manifolds, peclet::dem::Particles::mlColorPacked, peclet::dem::Particles::mlLast, peclet::dem::Particles::mlParent, peclet::dem::Particles::MlLast::numManifolds, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::realIndices.
|
inline |
Definition at line 1119 of file sim.hpp.
References peclet::dem::Particles::orphanClampCount, peclet::dem::SplitStats::orphanClamps, peclet::dem::ShapeRegistry::P_, and peclet::dem::Particles::splitStats.
|
inline |
Definition at line 1125 of file sim.hpp.
References peclet::dem::Particles::maxOverlap, and peclet::dem::ShapeRegistry::P_.
Referenced by NB_MODULE().
|
inline |
Poisson-restitution diagnostics: (sum, max, count>0) of the committed per-pair owed separation impulse (prevRestBank[0:prevPairCount], physical units).
Definition at line 1132 of file sim.hpp.
References peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::prevPairCount, peclet::dem::Particles::prevRestBank, and peclet::dem::restBankStatsKokkos().
|
inline |
Orphan-account diagnostics: (sum, max, count>0) of the per-body orphaned budget.
Definition at line 1136 of file sim.hpp.
References peclet::dem::Particles::bodyOrphan, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, and peclet::dem::restBankStatsKokkos().
|
inline |
Definition at line 1142 of file sim.hpp.
References peclet::dem::ShapeRegistry::baseRadius_, peclet::dem::Particles::globalScale, peclet::dem::Particles::numReal, peclet::dem::ShapeRegistry::P_, peclet::dem::Particles::pos, peclet::dem::Particles::scale, and peclet::dem::Particles::vel.
Referenced by NB_MODULE().