about this beginPass and endPass function

Submitted by xiuhan on Fri, 10/09/2015 - 16:14

In contact_models.h and some other header files. I saw this beginPass and endPass functions , but Just don't get what they do and what they mean. They are inline functions with a void return type. BUT then? what they really do? they are not constructor or destructor. Can somebody tell me?

and also there is another function named checkSurfaceIntersect(). But this function doesn't check anything, it only gives a value true. Is it really necessary?

Thank you very much~!

Xiuhan

aaigner's picture

aaigner | Fri, 10/09/2015 - 17:41

Hi Xiuhan,

during the big changes from LIGGGHTS 2.x to 3.x we (or in particular Christoph Kloss and Richard Berger) prepared a general interface for contact models. Although currently no PUBLIC model uses thoes functions, they are there. One contact follows more or less the structure .... (compute force in pair_gran_base.h)

...
beginPass
Loop over particles {
Loop neighbors {
if contact {
surfacesIntersect
endSurfacesIntersect
} else {
surfacesClose
}
}
}
endPass

If a new model needs to do something before/after the particle-loop, you can implement it there.

The same is true for checkSurfaceIntersect(). It is a function for future development.

Bests
Andreas