Difference between revisions of "Yade2"

From Yade

(Created page with "Overview: Scene [field, field, ...] engines (1) Field: [node, node, ...] [nodeData, nodeData, ...] (2) Node: position, orientation constraint* DynState* DemFi…")
 
Line 1: Line 1:
  +
= Object overview =
Overview:
 
   
 
Scene
 
Scene
Line 5: Line 5:
 
engines (1)
 
engines (1)
 
Field:
 
Field:
[node, node, ...]
+
[Node, Node, ...] (2)
[nodeData, nodeData, ...] (2)
+
[NodeData, NodeData, ...] (3)
 
Node:
 
Node:
 
position, orientation
 
position, orientation
  +
Constraint
constraint*
 
DynState*
+
DynState (4)
  +
  +
(1) Each engine chooses to which field it applies, and is run only for them (serially or in parallel, if desired); it is also possible to restrict engine to only some fields by hand.
  +
  +
(2) All objects in sequences or objects encapsulated in other objects are shared_ptr's are are shared as much as meaningful. Nodes in fields are shared, aobjects store pointers rather than ids, which necessitate stable storage. (Care must be taken to avoid ownership loops, which would lead to stale objects).
  +
  +
(3) Each field should be able to attach its own data to nodes, independently of other fields. The association is not straightforward, as nodes cannot contain to node data, as they are shared over fields. Perhaps nodeData could contain Node*, and there would be no [node, ...] in the Field itself.
  +
  +
(4) I thought other fields than DEM could be interested about velocity etc of the node.
   
 
DemField: Field
 
DemField: Field
[particle, particle, ...]
+
[Particle, Particle, ...]
[contact, contact, ...] (3)
+
[Contact, Contact, ...] (5)
 
Particle:
 
Particle:
Material*
+
Material
 
Shape:
 
Shape:
 
Bound
 
Bound
[node,node,...]
+
[Node,Node,...] (6)
 
contacts: {otherId1: Contact*, otherId2: Contact*, ...}
 
contacts: {otherId1: Contact*, otherId2: Contact*, ...}
 
Contact:
 
Contact:
particleA*, particleB*
+
particleA, particleB
CGeom*, CPhys*, CData* (3)
+
CGeom, CPhys, CData (7)
 
CGeom:
 
CGeom:
node
+
node (8)
 
CPhys:
 
CPhys:
force, torque (4)
+
force, torque (9)
 
CData: /* arbitrary */
 
CData: /* arbitrary */
  +
  +
(5) Linear array gathering all contacts stored in Particles:contacts for all particles
  +
(6) Note that each Shape can have multiple nodes - think of facets defined by 3 corners, or brick elements and such.
  +
(7) CData is used by the Law2 functor to store any additional data it needs; this avoids abusing IPhys (CPhys) as it is done now.
  +
(8) Each contact defines local coordinate system; it could be coincident with the global system as well
  +
(9) force and torque on contact node is in contact-local coordinates.
  +
  +
= Dem logic =

Revision as of 21:53, 4 May 2011

Object overview

Scene
 [field, field, ...]
 engines (1)
Field:
 [Node, Node, ...] (2)
 [NodeData, NodeData, ...] (3)
Node:
 position, orientation
 Constraint
 DynState (4)

(1) Each engine chooses to which field it applies, and is run only for them (serially or in parallel, if desired); it is also possible to restrict engine to only some fields by hand.

(2) All objects in sequences or objects encapsulated in other objects are shared_ptr's are are shared as much as meaningful. Nodes in fields are shared, aobjects store pointers rather than ids, which necessitate stable storage. (Care must be taken to avoid ownership loops, which would lead to stale objects).

(3) Each field should be able to attach its own data to nodes, independently of other fields. The association is not straightforward, as nodes cannot contain to node data, as they are shared over fields. Perhaps nodeData could contain Node*, and there would be no [node, ...] in the Field itself.

(4) I thought other fields than DEM could be interested about velocity etc of the node.

DemField: Field
 [Particle, Particle, ...]
 [Contact, Contact, ...] (5)
Particle:
 Material
 Shape:
  Bound
  [Node,Node,...] (6)
 contacts: {otherId1: Contact*, otherId2: Contact*, ...}
Contact:
 particleA, particleB 
 CGeom, CPhys, CData (7)
CGeom:
 node (8)
CPhys:
 force, torque (9)
CData: /* arbitrary */

(5) Linear array gathering all contacts stored in Particles:contacts for all particles (6) Note that each Shape can have multiple nodes - think of facets defined by 3 corners, or brick elements and such. (7) CData is used by the Law2 functor to store any additional data it needs; this avoids abusing IPhys (CPhys) as it is done now. (8) Each contact defines local coordinate system; it could be coincident with the global system as well (9) force and torque on contact node is in contact-local coordinates.

Dem logic