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.
RigidFace.h
Go to the documentation of this file.
1 // Authors: Miquel Santasusana msantasusana@cimne.upc.edu,
2 // Guillermo Casas (gcasas@cimne.upc.edu)
3 
4 #if !defined(KRATOS_RIGIDFACE3D_H_INCLUDED)
5 #define KRATOS_RIGIDFACE3D_H_INCLUDED
6 
7 // Project includes
8 #include "includes/define.h"
9 #include "includes/element.h"
10 #include "includes/serializer.h"
11 #include "includes/condition.h"
12 #include "includes/variables.h"
13 #include "dem_wall.h"
15 
16 namespace Kratos
17 
18 {
19 
20 class KRATOS_API(DEM_APPLICATION) RigidFace3D : public DEMWall
21 {
22 public:
23 
24  // Counted pointer of RigidFace3D
26 
27 
31 
34 
35 
36  // Constructor void
37  RigidFace3D();
38 
39  // Constructor using an array of nodes
40  RigidFace3D( IndexType NewId, GeometryType::Pointer pGeometry );
41 
42  // Constructor using an array of nodes with properties
43  RigidFace3D( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
44 
45  // Destructor
46  virtual ~RigidFace3D();
47 
49  {
50  public:
51  FaceDataBuffer(RigidFace3D* p_this_condition): mpThisCondition(p_this_condition)
52  {}
53 
54  virtual ~FaceDataBuffer(){}
55 
57  {
58  mpNeighbourParticle = p_neighbour;
59  }
60 
61  double mIndentation;
62  double mLocalRelVel[3];
65  };
66 
67  Condition::Pointer Create( IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties ) const override;
68 
69  void Initialize(const ProcessInfo& rCurrentProcessInfo) override;
70  void CalculateNormal(array_1d<double, 3>& rnormal) override;
71  void Calculate(const Variable<Vector >& rVariable, Vector& Output, const ProcessInfo& r_process_info) override;
72  void FinalizeSolutionStep(const ProcessInfo& r_process_info) override;
73  int CheckSide(SphericParticle* p_particle) override;
74  virtual bool CheckProjectionFallsInside(SphericParticle *p_particle);
75  void ComputeConditionRelativeData(int rigid_neighbour_index,
76  SphericParticle* const particle,
77  double LocalCoordSystem[3][3],
78  double& DistPToB,
79  array_1d<double, 4>& Weight,
80  array_1d<double, 3>& wall_delta_disp_at_contact_point,
81  array_1d<double, 3>& wall_velocity_at_contact_point,
82  int& ContactType) override;
83 
84  array_1d<double, 3> GetVelocity();
85 
86 protected:
87 
88 private:
89  void AddForcesDueToTorque(VectorType& rRightHandSideVector, Vector& r_shape_functions_values, std::vector<double>& weights_vector, array_1d<double, 3>& force, SphericParticle* p_particle);
90 
91  friend class Serializer;
92 
93  template<typename T>
94  inline int Sign(T x)
95  {
96  return (T(0) < x) - (x < T(0));
97  }
98 
99  virtual void save( Serializer& rSerializer ) const override
100  {
102  }
103 
104  virtual void load( Serializer& rSerializer ) override
105  {
106  KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, DEMWall );
107  }
108 
109 }; // class RigidFace3D.
110 
111 } // namespace Kratos.
112 
113 #endif // KRATOS_RIGIDFACE3D_H_INCLUDED defined
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:49
double mIndentation
Definition: RigidFace.h:61
FaceDataBuffer(RigidFace3D *p_this_condition)
Definition: RigidFace.h:51
void SetCurrentNeighbour(SphericParticle *p_neighbour)
Definition: RigidFace.h:56
RigidFace3D * mpThisCondition
Definition: RigidFace.h:63
virtual ~FaceDataBuffer()
Definition: RigidFace.h:54
SphericParticle * mpNeighbourParticle
Definition: RigidFace.h:64
Definition: RigidFace.h:21
GlobalPointersVector< Condition > ConditionWeakVectorType
Definition: RigidFace.h:32
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: RigidFace.h:30
GlobalPointersVector< Condition >::iterator ConditionWeakIteratorType
Definition: RigidFace.h:33
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: RigidFace.h:28
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: RigidFace.h:29
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(RigidFace3D)
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
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
TDataType Calculate(GeometryType &dummy, const Variable< TDataType > &rVariable)
Definition: add_geometries_to_python.cpp:103
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
x
Definition: sensitivityMatrix.py:49