Python API overview¶
DEME currently preserves its established C++-style method names in Python. This page maps common tasks to the principal bound objects; runtime docstrings and the C++ API reference provide signature-level detail.
Core objects¶
DEMSolverOwns workers and simulation state. It loads setup data, configures the solver, initializes, advances time, creates trackers and inspectors, and writes output.
DEMMaterialStores material properties loaded through
DEMSolver.LoadMaterial.DEMClumpTemplateandDEMClumpBatchDescribe clump topology and a group of instances. A batch returned by
AddClumpscan be passed toTrack.DEMMeshandDEMExternObjRepresent mesh particles/bodies and analytical external geometry. See Mesh particles and combined owners for mesh templates and contact scope.
Tracker(nativeDEMTracker)Reads or modifies a tracked batch/object after initialization. See Retrieving simulation data.
DEMInspectorQueries aggregate or spatial simulation properties.
DEMForceModelSelects or customizes the contact force calculation and its material or wildcard requirements.
DEMVisualizerDisplays the current solver state on each explicit
Rendercall without advancing the simulation. See Interactive visualization.
Common task map¶
Task |
Starting methods |
|---|---|
Select GPUs |
|
Load material |
|
Define the domain |
|
Create particles |
|
Create geometry |
|
Enable mesh–mesh and mesh–analytical contacts |
|
Create rigid combined bodies |
|
Configure motion |
gravity, family prescriptions, timestep methods |
Start simulation |
|
Advance simulation |
|
Inspect or control objects |
|
Retrieve CUDA data |
|
Write output |
|
Render interactively |
|
Discovering installed signatures¶
The pybind11 extension exposes method signatures and docstrings directly:
import deme
help(deme.DEMSolver)
help(deme.Tracker)
print(deme.DEMSolver.Initialize.__doc__)
Static type stubs and automatically generated Python API pages are not yet shipped. Consequently, IDE completion may be incomplete even though a method is available at runtime.