1
#include"CohesiveStateRPMRecorder.hpp"
3
YADE_PLUGIN((CohesiveStateRPMRecorder));
4
CREATE_LOGGER(CohesiveStateRPMRecorder);
6
void CohesiveStateRPMRecorder::action() {
7
numberCohesiveContacts=0;
8
//Check all interactions
9
FOREACH(const shared_ptr<Interaction>& i, *scene->interactions){
10
if(!i->isReal()) continue; //Check whether they are real
11
const shared_ptr<RpmPhys>& contPhys = YADE_PTR_CAST<RpmPhys>(i->phys);
12
if (contPhys->isCohesive==true) { //Check whether they are cohesive
13
numberCohesiveContacts++; //If yes - calculate them
17
out<<scene->iter<<" "<<numberCohesiveContacts<<"\n";