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.
contact_info_spheric_particle.h
Go to the documentation of this file.
1 //
2 // Author: Joaquín Irazábal jirazabal@cimne.upc.edu
3 //
4 
5 
6 #if !defined(KRATOS_CONTACT_INFO_SPHERIC_PARTICLE_H_INCLUDED)
7 #define KRATOS_CONTACT_INFO_SPHERIC_PARTICLE_H_INCLUDED
8 
9 // System includes
10 #include <string>
11 #include <iostream>
12 #include "spheric_particle.h"
13 
14 
15 namespace Kratos
16 {
17 
18 class KRATOS_API(DEM_APPLICATION) ContactInfoSphericParticle : public SphericParticle
19 {
20 public:
21 
24 
25 // typedef GlobalPointersVector<Condition> ConditionWeakVectorType;
26 // typedef GlobalPointersVector<Condition >::iterator ConditionWeakIteratorType;
27 
28 // typedef GlobalPointersVector<Element> ParticleWeakVectorType;
29 // typedef ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr;
30 // typedef GlobalPointersVector<Element >::iterator ParticleWeakIteratorType;
32 typedef BaseType::ParticleDataBuffer BaseBufferType;
33 typedef std::unique_ptr<BaseType::ParticleDataBuffer> BaseBufferPointerType;
34 
37 ContactInfoSphericParticle( IndexType NewId, GeometryType::Pointer pGeometry);
38 ContactInfoSphericParticle( IndexType NewId, NodesArrayType const& ThisNodes);
39 ContactInfoSphericParticle( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
40 ContactInfoSphericParticle(Element::Pointer p_spheric_particle);
41 
42 Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
43 
46 
48 
50 std::string Info() const override
51 {
52 std::stringstream buffer;
53 buffer << "ContactInfoSphericParticle" ;
54 return buffer.str();
55 }
56 
58 void PrintInfo(std::ostream& rOStream) const override {rOStream << "ContactInfoSphericParticle";}
59 
61 void PrintData(std::ostream& rOStream) const override {}
62 
63 std::vector<double> mNeighbourContactRadius;
64 std::vector<double> mNeighbourRigidContactRadius;
65 std::vector<double> mNeighbourIndentation;
66 std::vector<double> mNeighbourRigidIndentation;
67 std::vector<double> mNeighbourTgOfStatFriAng;
68 std::vector<double> mNeighbourTgOfDynFriAng;
69 std::vector<double> mNeighbourRigidTgOfStatFriAng;
70 std::vector<double> mNeighbourRigidTgOfDynFriAng;
71 std::vector<double> mNeighbourContactStress;
72 std::vector<double> mNeighbourRigidContactStress;
73 std::vector<double> mNeighbourCohesion;
74 std::vector<double> mNeighbourRigidCohesion;
75 
76 protected:
77 
79 {
80 public:
81 
83 
85 
86 };
87 
88 std::unique_ptr<SphericParticle::ParticleDataBuffer> CreateParticleDataBuffer(SphericParticle* p_this_particle) override
89 {
90  return std::unique_ptr<SphericParticle::ParticleDataBuffer>(new ParticleDataBuffer(p_this_particle));
91 }
92 
93 void ComputeNewNeighboursHistoricalData(DenseVector<int>& temp_neighbours_ids,
94  std::vector<array_1d<double, 3> >& temp_neighbour_elastic_contact_forces) override;
95 
96 void ComputeNewRigidFaceNeighboursHistoricalData() override;
97 
98 private:
99 
100 void save(Serializer& rSerializer) const override
101 {
103 }
104 
105 void load(Serializer& rSerializer) override
106 {
107  KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, SphericParticle);
108 }
109 
110 }; // Class ContactInfoSphericParticle
111 
113 inline std::istream& operator >> (std::istream& rIStream,
114  ContactInfoSphericParticle& rThis){ return rIStream;}
115 
117 inline std::ostream& operator << (std::ostream& rOStream,
118  const ContactInfoSphericParticle& rThis)
119 {
120 rThis.PrintInfo(rOStream);
121 rOStream << std::endl;
122 rThis.PrintData(rOStream);
123 
124 return rOStream;
125 }
126 
127 } // namespace Kratos.
128 
129 #endif // KRATOS_CONTACT_INFO_SPHERIC_PARTICLE_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: contact_info_spheric_particle.h:79
ParticleDataBuffer(SphericParticle *p_this_particle)
Definition: contact_info_spheric_particle.h:82
virtual ~ParticleDataBuffer()
Definition: contact_info_spheric_particle.h:84
Definition: contact_info_spheric_particle.h:19
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: contact_info_spheric_particle.h:61
std::vector< double > mNeighbourContactStress
Definition: contact_info_spheric_particle.h:71
std::vector< double > mNeighbourRigidContactStress
Definition: contact_info_spheric_particle.h:72
std::string Info() const override
Turn back information as a string.
Definition: contact_info_spheric_particle.h:50
std::vector< double > mNeighbourRigidTgOfDynFriAng
Definition: contact_info_spheric_particle.h:70
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: contact_info_spheric_particle.h:58
std::unique_ptr< BaseType::ParticleDataBuffer > BaseBufferPointerType
Definition: contact_info_spheric_particle.h:33
std::vector< double > mNeighbourTgOfDynFriAng
Definition: contact_info_spheric_particle.h:68
virtual ~ContactInfoSphericParticle()
Destructor.
Definition: contact_info_spheric_particle.h:45
BaseType::ParticleDataBuffer BaseBufferType
Definition: contact_info_spheric_particle.h:32
SphericParticle BaseType
Definition: contact_info_spheric_particle.h:31
std::vector< double > mNeighbourIndentation
Definition: contact_info_spheric_particle.h:65
std::vector< double > mNeighbourTgOfStatFriAng
Definition: contact_info_spheric_particle.h:67
std::vector< double > mNeighbourRigidContactRadius
Definition: contact_info_spheric_particle.h:64
std::vector< double > mNeighbourContactRadius
Definition: contact_info_spheric_particle.h:63
std::vector< double > mNeighbourRigidCohesion
Definition: contact_info_spheric_particle.h:74
std::vector< double > mNeighbourRigidIndentation
Definition: contact_info_spheric_particle.h:66
std::unique_ptr< SphericParticle::ParticleDataBuffer > CreateParticleDataBuffer(SphericParticle *p_this_particle) override
Definition: contact_info_spheric_particle.h:88
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(ContactInfoSphericParticle)
Pointer definition of ContactInfoSphericParticle.
std::vector< double > mNeighbourRigidTgOfStatFriAng
Definition: contact_info_spheric_particle.h:69
std::vector< double > mNeighbourCohesion
Definition: contact_info_spheric_particle.h:73
std::size_t IndexType
Definition: flags.h:74
Definition: amatrix_interface.h:41
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
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:59
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
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307