GranOO  3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
CriticalTimeStep.hpp
Go to the documentation of this file.
1 // This file is part of GranOO, a workbench for Physic simulation.
2 //
3 // Author(s) : - Jean-luc CHARLES I2M-DuMAS/ENSAM Talence France
4 // <jean-luc.charles@ensam.eu>
5 // - Damien ANDRE SPCTS/ENS Ceramique industrielle, Limoges France
6 // <damien.andre@unilim.fr>
7 // - Jeremie GIRARDOT I2M-DuMAS/ENSAM Talence France
8 // <jeremie.girardot@ensam.eu>
9 // - Cedric Hubert LAMIH/UVHC Valenciennes France
10 // <cedric.hubert@univ-valenciennes.fr>
11 // - Ivan IORDANOFF I2M-DuMAS-MPI/ENSAM Talence France
12 // <ivan.iordanoff@ensam.eu>
13 //
14 // Copyright (C) 2008-2016 JL. CHARLES, D. ANDRE, I. IORDANOFF, J. GIRARDOT
15 //
16 //
17 //
18 //
19 //
20 // This program is free software: you can redistribute it and/or modify
21 // it under the terms of the GNU General Public License as published by
22 // the Free Software Foundation, either version 3 of the License, or
23 // (at your option) any later version.
24 //
25 // This program is distributed in the hope that it will be useful,
26 // but WITHOUT ANY WARRANTY; without_even the implied warranty of
27 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 // GNU General Public License for more details.
29 //
30 // You should have received a copy of the GNU General Public License
31 // along with this program. If not, see <http://www.gnu.org/licenses/>.
32 
33 
34 #ifndef _LibPhysic_CriticalTimeStep_HPP
35 #define _LibPhysic_CriticalTimeStep_HPP
36 
37 #include <set>
38 
39 namespace GranOO3
40 {
41  namespace Physic
42  {
43 
44 
45  // Main Base class for critical time computation
46  // All classes that able to compute critical time
47  // (interaction between bodies) must inherit from this
48  // class
50  {
51 
52  private:
53  static std::set<CriticalTimeStep*> _all;
54 
55  public:
56  static const std::set<CriticalTimeStep*>& get_all();
57 
58  protected:
60  virtual ~CriticalTimeStep();
61 
62  public:
63  virtual double compute_critical_time_step() const = 0;
64  };
65 
66 
67  }
68 }
69 
70 #endif
pure virtual class for modeling classes able to compute a critical time step
Definition: CriticalTimeStep.hpp:50
static const std::set< CriticalTimeStep * > & get_all()
Definition: CriticalTimeStep.cpp:42
static std::set< CriticalTimeStep * > _all
Definition: CriticalTimeStep.hpp:53
virtual double compute_critical_time_step() const =0
a pure virtual method able to return the critical time step value
virtual ~CriticalTimeStep()
destructor
Definition: CriticalTimeStep.cpp:50
CriticalTimeStep()
constructor
Definition: CriticalTimeStep.cpp:46
Definition: Common.hpp:198