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.
cylinder_continuum_particle.h
Go to the documentation of this file.
1 //
2 // Author: Miquel Santasusana msantasusana@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_CYLINDER_CONTINUUM_PARTICLE_H_INCLUDED )
6 #define KRATOS_CYLINDER_CONTINUUM_PARTICLE_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 // Project includes
12 #include "includes/define.h"
15 #include "custom_utilities/AuxiliaryFunctions.h"
16 
17 namespace Kratos
18 {
19 
20  class KRATOS_API(DEM_APPLICATION) CylinderContinuumParticle: public SphericContinuumParticle
21  {
22  public:
23 
25 
26  typedef GlobalPointersVector<Element> ParticleWeakVectorType; //M: l'he afegit jo.. esta be aquesta?
29 
30  CylinderContinuumParticle( IndexType NewId, GeometryType::Pointer pGeometry );
31  CylinderContinuumParticle( IndexType NewId, NodesArrayType const& ThisNodes);
32  CylinderContinuumParticle( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
33 
34  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
35 
37  virtual ~CylinderContinuumParticle();
38 
39 
40  virtual std::string Info() const override
41  {
42  std::stringstream buffer;
43  buffer << "CylinderContinuumParticle" ;
44  return buffer.str();
45  }
46 
48  virtual void PrintInfo(std::ostream& rOStream) const override {rOStream << "CylinderContinuumParticle";}
49 
51  virtual void PrintData(std::ostream& rOStream) const override {}
52 
53  void ContactAreaWeighting() override;
54 
55  void FinalizeStressTensor(const ProcessInfo& r_process_info, double& rRepresentative_Volume) override;
56 
57  protected:
58 
60 
61  double CalculateVolume() override;
62  double CalculateMomentOfInertia() override;
63  void AddContributionToRepresentativeVolume(const double distance, const double radius_sum, const double contact_area) override ;
64 
65  private:
66 
67  friend class Serializer;
68 
69  virtual void save(Serializer& rSerializer) const override
70  {
72  }
73 
74  virtual void load(Serializer& rSerializer) override
75  {
77  }
78 
79  };
80 
81 
83  inline std::istream& operator >> (std::istream& rIStream,
84  CylinderContinuumParticle& rThis){ return rIStream;}
85 
87  inline std::ostream& operator << (std::ostream& rOStream,
88  const CylinderContinuumParticle& rThis)
89  {
90  rThis.PrintInfo(rOStream);
91  rOStream << std::endl;
92  rThis.PrintData(rOStream);
93 
94  return rOStream;
95  }
97 
98 } // namespace Kratos.
99 
100 #endif // KRATOS_SPHERIC_PARTICLE_H_INCLUDED defined
101 
102 
Definition: cylinder_continuum_particle.h:21
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: cylinder_continuum_particle.h:27
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(CylinderContinuumParticle)
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: cylinder_continuum_particle.h:28
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: cylinder_continuum_particle.h:51
virtual std::string Info() const override
Turn back information as a string.
Definition: cylinder_continuum_particle.h:40
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: cylinder_continuum_particle.h:26
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: cylinder_continuum_particle.h:48
Definition: discrete_element.h:38
std::size_t IndexType
Definition: flags.h:74
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
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Definition: spheric_continuum_particle.h:26
#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