KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
DEM_compound_constitutive_law.h
Go to the documentation of this file.
1 #ifndef KRATOS_DEM_COMPOUND_CONSTITUTIVE_LAW_H
2 #define KRATOS_DEM_COMPOUND_CONSTITUTIVE_LAW_H
3 
4 #include "includes/define.h"
5 #include "includes/serializer.h"
6 //#include "DEM_D_JKR_cohesive_law.h"
7 //#include "DEM_D_Hertz_viscous_Coulomb_CL.h"
8 
9 namespace Kratos {
10 
11 template <class MainCL, class CohesionCL>
12 
13 class KRATOS_API(DEM_APPLICATION) DEM_compound_constitutive_law : public MainCL {
14 
15 public:
16 
17  // Pointer types for DEM_compound_constitutive_law
19 
20  DEMDiscontinuumConstitutiveLaw::Pointer Clone() const override {
21  DEMDiscontinuumConstitutiveLaw::Pointer p_clone(new DEM_compound_constitutive_law<MainCL, CohesionCL>(*this));
22  return p_clone;
23  }
24 
25  std::unique_ptr<DEMDiscontinuumConstitutiveLaw> CloneUnique() override {
26  return std::unique_ptr<DEMDiscontinuumConstitutiveLaw>{new DEM_compound_constitutive_law<MainCL, CohesionCL>(*this)};
27  }
28 
31 
32  double CalculateCohesiveNormalForce(SphericParticle* const element1, SphericParticle* const element2, const double indentation) override {
33  return mCCL.CalculateCohesiveNormalForce(element1, element2, indentation);
34  };
35 
36  double CalculateCohesiveNormalForceWithFEM(SphericParticle* const element, Condition* const wall, const double indentation) override {
37  return mCCL.CalculateCohesiveNormalForceWithFEM(element, wall, indentation);
38  };
39 
40 private:
41 
42  CohesionCL mCCL;
43 
44  friend class Serializer;
45 
46  virtual void save(Serializer& rSerializer) const override
47  {
48  KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, MainCL);
49  }
50 
51  virtual void load(Serializer& rSerializer) override
52  {
53  KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, MainCL);
54  }
55 
56 }; // Class DEM_compound_constitutive_law : public MainCL
57 
58 } // Namespace Kratos
59 
60 #endif // KRATOS_DEM_COMPOUND_CONSTITUTIVE_LAW_H
Base class for all Conditions.
Definition: condition.h:59
Definition: DEM_compound_constitutive_law.h:13
double CalculateCohesiveNormalForceWithFEM(SphericParticle *const element, Condition *const wall, const double indentation) override
Definition: DEM_compound_constitutive_law.h:36
KRATOS_CLASS_POINTER_DEFINITION(DEM_compound_constitutive_law)
DEMDiscontinuumConstitutiveLaw::Pointer Clone() const override
Definition: DEM_compound_constitutive_law.h:20
double CalculateCohesiveNormalForce(SphericParticle *const element1, SphericParticle *const element2, const double indentation) override
Definition: DEM_compound_constitutive_law.h:32
std::unique_ptr< DEMDiscontinuumConstitutiveLaw > CloneUnique() override
Definition: DEM_compound_constitutive_law.h:25
virtual ~DEM_compound_constitutive_law()
Destructor.
Definition: DEM_compound_constitutive_law.h:30
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_particle.h:31
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
Definition: mesh_converter.cpp:33