Question #681016 on Yade changed:
https://answers.launchpad.net/yade/+question/681016

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

there is no really example, but the existing code should be instructive
and inspirative enough.

In the most general case:
Shape - describes a geometry of a **Body**, e.g. Sphere, Polyhedra
Material - describes material properties of a **Body**, e.g. FrictMat, 
PolyhedraMat
IGeom - describes a geometry of an **Interaction**, e.g. ScGeom, PolyhedraGeom
IPhys - describes physics/material properties/physical history of an 
**Interaction**, e.g. FrictPhys, PolyhedraPhys
Ig2 - takes two Shapes and creates/updates IGeom
Ip2 - takes two Materials and creates/updates IPhys
Law2 - takes IGeom and IPhys and calculates forces, possibly updates IPhys

For new staff (in most general case):
- new law needs new Law2 functor 
- new IGeom needs new IGeom subclass and new Ig2 functor(s)
- new Shape needs new Bo1 functor, new Ig2 functor(s) and possibly new IGeom
- new IPhys needs new IPhys subclass and new Ip2 functor(s)
- new Material would need new Ip2 functor(s), possibly new IPhys

Look at the most basic/used existing cases:
IGeom: ScGeom [1,2]
Ig2: Ig2_Sphere_Sphere_ScGeom [3,4], Ig2_Wall_Sphere_ScGeom [5,6]
Law2: Law2_ScGeom_FrictPhys_CundallStrack [7,8]

cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/ScGeom.hpp#L18
[2] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/ScGeom.cpp
[3] 
https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Ig2_Sphere_Sphere_ScGeom.hpp#L10
[4] 
https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp
[5] 
https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Ig2_Facet_Sphere_ScGeom.hpp#L67
[6] 
https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/Ig2_Facet_Sphere_ScGeom.cpp
[7] 
https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/ElasticContactLaw.hpp#L16
[8] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/ElasticContactLaw.cpp

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to