~ubuntu-branches/debian/jessie/yade/jessie

« back to all changes in this revision

Viewing changes to pkg/dem/KinemCNSEngine.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-08-04 19:34:58 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20140804193458-cw8qhnujxe9wzi15
Tags: 1.11.0-1
* [a0600ae] Imported Upstream version 1.11.0
* [a3055e0] Do not use parallel build on kfreebsd-amd64 and s390x.
* [f86b405] Remove applied patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*************************************************************************
2
 
*  Copyright (C) 2008 by Jerome Duriez                                   *
3
 
*  jerome.duriez@hmg.inpg.fr                                             *
4
 
*                                                                        *
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
 
*************************************************************************/
8
 
 
9
 
 
10
 
 
11
 
#include<yade/pkg/dem/KinemCNSEngine.hpp>
12
 
 
13
 
 
14
 
YADE_PLUGIN((KinemCNSEngine));
15
 
 
16
 
 
17
 
void KinemCNSEngine::action()
18
 
{
19
 
        if(LOG) cerr << "debut applyCondi !!" << endl;
20
 
        KinemSimpleShearBox::getBoxes_Dt();
21
 
        
22
 
        if(gamma<=gammalim)
23
 
        {
24
 
                computeDY(KnC);
25
 
                letMove(shearSpeed * dt,deltaH);
26
 
                gamma+=shearSpeed * dt;
27
 
                if(temoin==0)
28
 
                {
29
 
                        temoin=1;
30
 
                }
31
 
        }
32
 
        else if (temoin<2)
33
 
        {
34
 
                stopMovement();         // INDISPENSABLE !
35
 
                it_stop=scene->iter;
36
 
                cout << "Cisaillement arrete : gammaLim atteint a l'iteration "<< it_stop << endl;
37
 
                temoin=2;
38
 
        }
39
 
        else if (temoin==2 && (scene->iter==(it_stop+5000)) )
40
 
        {
41
 
                Omega::instance().saveSimulation(Key + "finCis" +boost::lexical_cast<string> (scene->iter ) + ".xml");
42
 
                Omega::instance().pause();
43
 
        }
44
 
 
45
 
}
46
 
 
47
 
 
48
 
 
49
 
 
50
 
 
51