Building blocks¶
Operators¶
An operator is a small C++ component that does one thing: create particles on a lattice, set their radius, compute the contact forces, move a driver, write a file... Each operator has typed slots: its inputs and outputs.
$ exaDEM --help set_radius
Operator : set_radius
Description :
This operator sets the radius value for every particles.
YAML example:
- set_radius:
rad: 0.5
Slots :
grid
flow IN/OUT
type Grid<soatl::FieldIds<vx,vy,vz,ax,ay,az,mass,homothety,radius,orient,mom,vrot,arot,inertia,id,type,group,stress>>
rad
flow IN
type double
desc default radius value for all particles
region
flow IN
type ParticleRegionCSG
...
Slots are connected by name: when domain outputs the domain slot and lattice fills the grid slot, every
later operator with a domain or grid input reads these values. You never wire operators by hand.
Batches¶
A YAML list of operators is a batch: the operators run in order. A batch can be given a name and used as an operator itself:
Batches can also loop (loop: true with a condition slot) or run conditionally (condition: with a boolean slot).
The DEM time loop compute_loop is such a batch.
Setting slot values¶
A slot value is given in YAML under the operator name:
Values not given keep the default of the operator (see exaDEM --help <operator>). Required slots must be set, or be
produced by an earlier operator.
Regions¶
Many operators take an optional region slot to act only on the particles of a spatial area. Regions are declared
once in particle_regions (boxes, quadrics, ...) and combined with and, or, not: