Skip to content

Latest commit

 

History

History
96 lines (77 loc) · 3.19 KB

File metadata and controls

96 lines (77 loc) · 3.19 KB

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

DEMSolver
Owns workers and simulation state. It loads setup data, configures the solver, initializes, advances time, creates trackers and inspectors, and writes output.
DEMMaterial
Stores material properties loaded through DEMSolver.LoadMaterial.
DEMClumpTemplate and DEMClumpBatch
Describe clump topology and a group of instances. A batch returned by AddClumps can be passed to Track.
DEMMesh and DEMExternObj
Represent mesh particles/bodies and analytical external geometry. See Mesh particles and combined owners for mesh templates and contact scope.
Tracker (native DEMTracker)
Reads or modifies a tracked batch/object after initialization. See Retrieving simulation data.
DEMInspector
Queries aggregate or spatial simulation properties.
DEMForceModel
Selects or customizes the contact force calculation and its material or wildcard requirements.
DEMVisualizer
Displays the current solver state on each explicit Render call without advancing the simulation. See Interactive visualization.

Common task map

Task Starting methods
Select GPUs DEMSolver(...), GetGPUDeviceIDs
Load material LoadMaterial
Define the domain InstructBoxDomainDimension, InstructBoxDomainBoundingBC
Create particles LoadSphereType, clump-template loaders, AddClumps
Create geometry LoadMeshType, mesh/external-object add methods, AddBCPlane
Enable mesh–mesh and mesh–analytical contacts SetMeshUniversalContact(True) during setup
Create rigid combined bodies LoadCombinedClumpType, LoadCombinedMeshType, AddCombinedFromTemplate
Configure motion gravity, family prescriptions, timestep methods
Start simulation Initialize
Advance simulation DoDynamics, DoDynamicsThenSync, DoStepDynamics
Inspect or control objects Track and Tracker methods
Retrieve CUDA data Tracker methods ending in ToDevice
Write output WriteSphereFile, mesh/contact output methods, WaitForPendingOutput
Render interactively DEMVisualizer, Render, SetRenderSpheres, SetRenderTriangles

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.