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.
analytic_RigidFace.h
Go to the documentation of this file.
1 // Author: Guillermo Casas (gcasas@cimne.upc.edu)
2 
3 #if !defined(KRATOS_ANALYTIC_AnalyticRigidFace3D_H_INCLUDED )
4 #define KRATOS_ANALYTIC_AnalyticRigidFace3D_H_INCLUDED
5 
6 // External includes
7 
8 // Project includes
9 #include "RigidFace.h"
10 
11 namespace Kratos
12 {
13 
14 class KRATOS_API(DEM_APPLICATION) AnalyticRigidFace3D : public RigidFace3D
15 {
16 public:
17 
18  // Counted pointer of AnalyticRigidFace3D
20 
25 
28 
29 
30  // Constructor void
32 
33  // Constructor using an array of nodes
34  AnalyticRigidFace3D( IndexType NewId, GeometryType::Pointer pGeometry );
35 
36  // Constructor using an array of nodes with properties
37  AnalyticRigidFace3D( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
38 
39  // Destructor
40  virtual ~AnalyticRigidFace3D();
41 
42  Condition::Pointer Create( IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties ) const override;
43 
44  void InitializeSolutionStep(const ProcessInfo& r_process_info) override;
45 
46  int CheckSide(SphericParticle* p_particle) override;
47  bool IsPhantom() override {return true;}
48 
49  int GetNumberThroughput();
50  std::vector<int> GetSignedCollidingIds();
51  int AreThereNewCrossings();
52  std::vector<double> GetCollidingNormalRelativeVelocity();
53  std::vector<double> GetCollidingTangentialRelativeVelocity();
54  std::vector<double> GetMasses();
55  std::string Info() const override
56  {
57  std::stringstream buffer;
58  buffer << "Analytic" << RigidFace3D::Info();
59  return buffer.str();
60  }
61 
62 
63 private:
64 
65  unsigned int mNumberOfCrossingSpheres;
66  int mNumberThroughput;
67  std::vector<int> mContactingNeighbourSignedIds;
68  std::vector<int> mOldContactingNeighbourSignedIds;
69  std::vector<int> mCrossers;
70  std::vector<double> mCollidingNormalVelocities;
71  std::vector<double> mCollidingTangentialVelocities;
72  std::vector<double> mMasses;
73 
74  template<class Tvalue>
75  bool IsInside(const Tvalue& value, const std::vector<Tvalue>& my_vector)
76  {
77  auto beginning = std::begin(my_vector);
78  auto end = std::end(my_vector);
79  const bool is_inside = (end != std::find(beginning, end, value));
80  return is_inside;
81  }
82 
83  void TestForNewCrosserAndPushBack(SphericParticle* p_particle);
84 
85  friend class Serializer;
86 
87  virtual void save( Serializer& rSerializer ) const override
88  {
90  }
91 
92  virtual void load( Serializer& rSerializer ) override
93  {
95  }
96 
97 }; // class AnalyticRigidFace3D.
98 
99 } // namespace Kratos.
100 
101 #endif // KRATOS_ANALYTIC_AnalyticRigidFace3D_H_INCLUDED defined
Definition: analytic_RigidFace.h:15
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: analytic_RigidFace.h:24
GlobalPointersVector< Condition >::iterator ConditionWeakIteratorType
Definition: analytic_RigidFace.h:27
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: analytic_RigidFace.h:22
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(AnalyticRigidFace3D)
std::string Info() const override
Turn back information as a string.
Definition: analytic_RigidFace.h:55
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: analytic_RigidFace.h:23
bool IsPhantom() override
Definition: analytic_RigidFace.h:47
RigidFace3D BaseType
Definition: analytic_RigidFace.h:21
GlobalPointersVector< Condition > ConditionWeakVectorType
Definition: analytic_RigidFace.h:26
std::string Info() const override
Turn back information as a string.
Definition: condition.h:1069
Definition: dem_wall.h:29
std::size_t IndexType
Definition: flags.h:74
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
typename TContainerType::iterator ptr_iterator
Definition: global_pointers_vector.h:85
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: RigidFace.h:21
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
end
Definition: DEM_benchmarks.py:180
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307