|
peclet-dem
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 () |
| void | setSphereShape (float radius) |
| void | initializeShape (int shape_type, float radius, float height, float thickness) |
| 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) |
| 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) |
| std::tuple< float, float, float > | getDomainMin () const |
| std::tuple< float, float, float > | getDomainMax () const |
| void | setGravity (float gx, float gy, float gz) |
| void | setThermostat (float temperature, float tau, float kB) |
| void | setSolverIterations (int pos, int vel) |
| void | setGlobalScale (float s) |
| void | setDt (float dt) |
| void | setMaterialParams (float restitution_normal, float restitution_tangent, float friction) |
| 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 | 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 () |
| const V3 & | externalForcesView () 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 (float dt) |
| 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 () |
| float | maxOverlap () |
| void | writeVtp (const std::string &filename) const |
Static Public Member Functions | |
| static void | releaseAll () |
| static std::vector< Simulation * > & | registry () |
Host-facing facade with std::vector setters/getters (binding-agnostic).
|
inlineexplicit |
Definition at line 395 of file sim.hpp.
References peclet::dem::Particles::allocate(), registry(), and setSphereShape().
|
inline |
Definition at line 401 of file sim.hpp.
References registry().
|
inlinestatic |
|
inlinestatic |
Definition at line 422 of file sim.hpp.
Referenced by releaseAll(), Simulation(), and ~Simulation().
|
inline |
Definition at line 427 of file sim.hpp.
References initializeShape(), and peclet::dem::SPHERE.
Referenced by NB_MODULE(), and Simulation().
|
inline |
Definition at line 433 of file sim.hpp.
References peclet::dem::Particles::baseRadius, peclet::dem::BOX, peclet::dem::genBoxShell(), peclet::dem::genCylinderShell(), peclet::dem::HOLLOW_CYLINDER, L, peclet::dem::Particles::shapes, peclet::dem::Particles::shell, and peclet::dem::SPHERE.
Referenced by NB_MODULE(), and setSphereShape().
|
inline |
Definition at line 518 of file sim.hpp.
References peclet::dem::Particles::baseRadius, peclet::dem::Particles::sdfGrid, peclet::dem::SHAPE_GRID_SDF, peclet::dem::Particles::shapes, peclet::dem::Particles::shell, peclet::dem::ShapeDesc::type, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 570 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Particles::globalScale, and peclet::dem::Particles::skin.
Referenced by NB_MODULE().
Definition at line 575 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Particles::globalScale, 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 584 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Domain::periodic_x, peclet::dem::Domain::periodic_y, and peclet::dem::Domain::periodic_z.
Referenced by NB_MODULE().
|
inline |
Definition at line 589 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Domain::min, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 592 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::Domain::max, peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 595 of file sim.hpp.
References peclet::dem::Particles::gravity.
Referenced by NB_MODULE().
|
inline |
Definition at line 596 of file sim.hpp.
References peclet::dem::Particles::thermostatKB, peclet::dem::Particles::thermostatTau, and peclet::dem::Particles::thermostatTemp.
Referenced by NB_MODULE().
|
inline |
Definition at line 601 of file sim.hpp.
References peclet::dem::Particles::positionIterations, and peclet::dem::Particles::velocityIterations.
Referenced by NB_MODULE().
|
inline |
Definition at line 605 of file sim.hpp.
References peclet::dem::Particles::globalScale, and peclet::dem::Particles::skin.
Referenced by NB_MODULE().
|
inline |
Definition at line 609 of file sim.hpp.
References peclet::dem::Particles::dt.
Referenced by NB_MODULE().
|
inline |
Definition at line 613 of file sim.hpp.
References peclet::dem::Particles::frictionDynamic, and peclet::dem::Particles::restitutionNormal.
Referenced by NB_MODULE().
|
inline |
Definition at line 618 of file sim.hpp.
References peclet::dem::Particles::numPlanes, and peclet::dem::Particles::planes.
Referenced by NB_MODULE().
|
inline |
Definition at line 634 of file sim.hpp.
References peclet::dem::Particles::numWalls, peclet::dem::WallSdf::nx, 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 672 of file sim.hpp.
Referenced by NB_MODULE().
|
inline |
Definition at line 682 of file sim.hpp.
References peclet::dem::Particles::angVel, peclet::dem::Particles::invInertia, peclet::dem::Particles::invMass, peclet::dem::Particles::numParticles, peclet::dem::Particles::numReal, peclet::dem::Particles::pos, 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 721 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::Particles::scale, and peclet::dem::Particles::targetScale.
Referenced by NB_MODULE().
|
inline |
Definition at line 730 of file sim.hpp.
References peclet::dem::Particles::numReal, peclet::dem::Particles::scale, and peclet::dem::Particles::targetScale.
Referenced by NB_MODULE().
|
inline |
Definition at line 737 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::vel.
Referenced by NB_MODULE().
|
inline |
Definition at line 748 of file sim.hpp.
References peclet::dem::Particles::extForce, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 757 of file sim.hpp.
References peclet::dem::Particles::extForce.
Referenced by NB_MODULE().
|
inline |
Definition at line 758 of file sim.hpp.
References peclet::dem::Particles::extForce.
Referenced by NB_MODULE().
|
inline |
Definition at line 761 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::quat.
Referenced by NB_MODULE().
|
inline |
Definition at line 771 of file sim.hpp.
References peclet::dem::Particles::angVel, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 780 of file sim.hpp.
References peclet::dem::Particles::invInertia, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 789 of file sim.hpp.
References peclet::dem::Particles::invMass, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 795 of file sim.hpp.
References peclet::dem::Particles::angVel, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 799 of file sim.hpp.
References peclet::dem::Particles::invInertia, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 805 of file sim.hpp.
References peclet::dem::Particles::growthFactor, peclet::dem::Particles::growthRate, peclet::dem::Particles::numReal, peclet::dem::Particles::scale, peclet::dem::Particles::targetScale, and peclet::dem::updateGrowthScalesKokkos().
Referenced by NB_MODULE().
|
inline |
Definition at line 814 of file sim.hpp.
References peclet::dem::Particles::growthFactor.
Referenced by NB_MODULE().
|
inline |
Definition at line 815 of file sim.hpp.
References peclet::dem::Particles::growthRate.
Referenced by NB_MODULE().
|
inline |
Definition at line 818 of file sim.hpp.
References peclet::dem::Particles::invMass, and peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 827 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::pos.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 831 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::vel.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 835 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::quat.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 839 of file sim.hpp.
References peclet::dem::Particles::numReal, and peclet::dem::Particles::scale.
Referenced by NB_MODULE().
|
inline |
Definition at line 845 of file sim.hpp.
References peclet::dem::demStep(), and peclet::dem::Particles::dt.
Referenced by exportLammps(), and NB_MODULE().
|
inline |
Definition at line 851 of file sim.hpp.
References peclet::dem::computeOverlapsKokkos().
Referenced by NB_MODULE().
|
inline |
Definition at line 855 of file sim.hpp.
References peclet::dem::Particles::domain, getPositions(), getQuaternions(), getVelocities(), peclet::dem::Particles::globalScale, peclet::dem::Particles::numReal, 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 867 of file sim.hpp.
References peclet::dem::Particles::domain, getSdfGrid(), peclet::dem::Domain::max, peclet::dem::Domain::min, peclet::dem::writeSdfVti(), peclet::dem::F3::x, peclet::dem::F3::y, and peclet::dem::F3::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 927 of file sim.hpp.
References peclet::dem::Particles::domain, peclet::dem::generateSdfKokkos(), peclet::dem::Domain::max, peclet::dem::Domain::min, peclet::dem::Particles::numReal, 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 933 of file sim.hpp.
References peclet::dem::Particles::numReal.
Referenced by NB_MODULE().
|
inline |
Definition at line 937 of file sim.hpp.
References peclet::dem::Particles::pos.
Referenced by NB_MODULE().
|
inline |
Definition at line 938 of file sim.hpp.
References peclet::dem::Particles::vel.
Referenced by NB_MODULE().
|
inline |
Definition at line 939 of file sim.hpp.
References peclet::dem::Particles::contactCount, and peclet::dem::readInt().
Referenced by NB_MODULE().
|
inline |
Definition at line 940 of file sim.hpp.
References peclet::dem::Particles::manifoldCount, and peclet::dem::readInt().
Referenced by NB_MODULE().
|
inline |
Definition at line 941 of file sim.hpp.
References peclet::dem::Particles::maxOverlap.
Referenced by NB_MODULE().
|
inline |
Definition at line 949 of file sim.hpp.
References peclet::dem::Particles::globalScale, peclet::dem::Particles::numReal, peclet::dem::Particles::pos, peclet::dem::Particles::scale, and peclet::dem::Particles::vel.
Referenced by NB_MODULE().