A question about better understanding the principles of YADE calculation

Asked by Xue

Hello everyone,

I would like to ask an introductory question.
1)If I want to understand the specific calculation process and calculation principle of a certain function in yade (for example, contact detection and contact force calculation between polyhedra), is the best way to check the "https://gitlab.com/yade-dev/trunk/..." in the corresponding cpp?
2)But some of the commands mentioned in the manual, such as "class yade.wrapper.FrictMatCDM", are not easy to find in gitlab. Is there any method to quickly search for the coding of the command I'm looking for?

Thanks,
xue

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

Hello,

> to understand the specific calculation process ... of a certain function ...
> is the best way to check ... the corresponding cpp?

Yes, to see the source code is in this case the best approach (IMO).

> is the best way to check the "https://gitlab.com/yade-dev/trunk/..." in the corresponding cpp?

Check **source code** is the best way.
How, it is very opinion dependent.
Not only "corresponding cpp", but also .hpp files may be useful (if cpp is used as file extension and not C++ in general)
Personally I prefer investigating source code locally using IDE / editor / command line, not gitlab.

> But some of the commands mentioned in the manual, such as "class yade.wrapper.FrictMatCDM", are not easy to find in gitlab. Is there any method to quickly search for the coding of the command I'm looking for?

In gitlab.com, you have "Seaech GitLab" text field, if you write FrictMatCDM and click "in trunk", it lists you all the occurrences.

On local computer, you can e.g.:
- use IDE to "jump" to declaration / definition (although I have no experience in the context of Yade)
- use linux grep command line tool (or similar) to search the location

E.g.
grep -R -l FrictMatCDM
gives me this output (basically same as gitlab search):

scripts/checks-and-tests/checks/checkHertzExtended.py
pkg/dem/HertzMindlinExtended.cpp
pkg/dem/HertzMindlinExtended.hpp
examples/test/HertzMindlinExtended/HertzMindlinExtended_singleContact.py
examples/test/HertzMindlinExtended/HertzMindlinExtended_periodicSimpleShear.py

so the definitions are in pkg/dem/HertzMindlinExtended files

Cheers
Jan

Revision history for this message
Xue (1q12) said :
#2

Thanks Jan Stránský, that solved my question.