1
/*************************************************************************
2
* Copyright (C) 2008 by Jerome Duriez *
3
* jerome.duriez@hmg.inpg.fr *
5
* This program is free software; it is licensed under the terms of the *
6
* GNU General Public License v2 or later. See file LICENSE for details. *
7
*************************************************************************/
10
#include<yade/pkg/dem/KinemCNDEngine.hpp>
13
YADE_PLUGIN((KinemCNDEngine));
15
void KinemCNDEngine::action()
17
KinemSimpleShearBox::getBoxes_Dt();
19
if( ((shearSpeed > 0) && (gamma<=gammalim)) || ((shearSpeed < 0) /*&& (gamma>=gammalim)*/ ) )
23
letMove(shearSpeed * dt,0);
24
gamma+=shearSpeed * dt;
31
Omega::instance().saveSimulation(Key + "endShear.xml");
36
for(unsigned int j=0;j<gamma_save.size();j++)
38
if ( ( ( (shearSpeed>0)&&(gamma > gamma_save[j]) ) || ((shearSpeed<0)&&(gamma < gamma_save[j])) ) && (temoin_save[j]==0) )
40
stopMovement(); // reset of all the speeds before the save
41
Omega::instance().saveSimulation(Key+"_"+boost::lexical_cast<string> (floor(gamma*1000)) + "mmsheared.xml");