GranOO  3.0
A robust and versatile workbench to build 3D dynamic simulations based on the Discrete Element Method
BondStrain.hpp
Go to the documentation of this file.
1 // This file is part of GranOO, a workbench for DEM 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 
35 #ifndef _LibDEM_Prop_BondStrain_HPP
36 #define _LibDEM_Prop_BondStrain_HPP
37 
38 
39 #include "GranOO3/Core/Prop.hpp"
40 #include "GranOO3/DEM/Bond.hpp"
42 
43 
44 
45 namespace GranOO3
46 {
47  namespace DEM
48  {
49 
50  class BondStrain : public Core::Prop<Bond>,
51  public Core::Register<BondStrain>
52  {
53 
54  GRANOO_CLASS(DEM::BondStrain, Core::Prop<Bond>);
55 
56  public:
57  //CONSTRUCTORS & DESTRUCTORS
59  virtual ~BondStrain();
60 
61  //USEFULL
62  virtual std::string info() const;
63 
64  //ACCESSORS
65  GRANOO_ACCESS(local_strain_tensor , Geom::SymTensor, _local_strain_tensor );
66  GRANOO_ACCESS(global_strain_tensor, Geom::SymTensor, _global_strain_tensor);
67 
68  //METHOD
69  void init();
70  void update();
71 
72  private:
73  //Serialization
75  template<class Archive> void serialize(Archive& ar, const unsigned int );
76 
77  private:
80  };
81 
82 
83  inline std::string
84  BondStrain::info() const {
85  std::ostringstream os;
86  return os.str();
87  }
88 
89  template<class Archive> void
90  BondStrain::serialize(Archive& ar, const unsigned int version) {
91  ar & boost::serialization::base_object<Core::Prop<Bond>>(*this);
94  }
95 
96  }
97 }
98 
99 
100 #include <boost/serialization/version.hpp>
102 
103 
104 namespace GranOO3{
105  GRANOO_CLASS_DECLARE_TPL(DEM::BondStrain);}
106 
107 
108 #endif
109 
BOOST_CLASS_VERSION(GranOO3::DEM::BondStrain, 0) namespace GranOO3
Definition: BondStrain.hpp:101
Definition: Prop.hpp:48
Definition: SetOf.hpp:346
a bond property able to associate and compute a full strain tensor to DEM::Bond
Definition: BondStrain.hpp:52
void serialize(Archive &ar, const unsigned int)
complete serializing of the instance in the *.gdd format
Definition: BondStrain.hpp:90
void init()
initialize the current value of the strain tensors
Definition: BondStrain.cpp:69
Geom::SymTensor _global_strain_tensor
the strain tensor expressed in the global frame
Definition: BondStrain.hpp:79
virtual std::string info() const
Definition: BondStrain.hpp:84
Geom::SymTensor _local_strain_tensor
the strain tensor expressed in the local bond frame
Definition: BondStrain.hpp:78
virtual ~BondStrain()
destructor
Definition: BondStrain.cpp:64
void update()
compute the current values of the strain tensors
Definition: BondStrain.cpp:76
friend class boost::serialization::access
Definition: BondStrain.hpp:74
Definition: SymTensor.hpp:68
Definition: Common.hpp:198
static char_cptr version
Definition: Exprtk.hpp:44221