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_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_PARTICLE_H_INCLUDED )
6 #define KRATOS_CYLINDER_PARTICLE_H_INCLUDED
7 
8 
9 
10 // System includes
11 #include <string>
12 #include <iostream>
13 
14 // Project includes
15 #include "includes/define.h"
16 #include "discrete_element.h"
17 #include "spheric_particle.h"
19 #include "custom_utilities/AuxiliaryFunctions.h"
20 
21 
22 namespace Kratos
23 {
24 
25  class KRATOS_API(DEM_APPLICATION) CylinderParticle : public SphericParticle
26  {
27  public:
28 
30 
31  typedef GlobalPointersVector<Element> ParticleWeakVectorType; //M: l'he afegit jo.. esta be aquesta?
34 
35 
36  CylinderParticle( IndexType NewId, GeometryType::Pointer pGeometry );
37  CylinderParticle( IndexType NewId, NodesArrayType const& ThisNodes);
38  CylinderParticle( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties );
39 
40  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
41 
43  virtual ~CylinderParticle();
44 
45  double CalculateVolume() override;
46  double CalculateMomentOfInertia() override;
47 
48  void Calculate(const Variable<double>& rVariable, double& Output, const ProcessInfo& r_process_info) override;
49  void Calculate(const Variable<array_1d<double, 3 > >& rVariable, array_1d<double, 3 > & Output, const ProcessInfo& r_process_info) override;
50  void Calculate(const Variable<Vector >& rVariable, Vector& Output, const ProcessInfo& r_process_info) override;
51  void Calculate(const Variable<Matrix >& rVariable, Matrix& Output, const ProcessInfo& r_process_info) override;
52 
53 
54 
56  virtual std::string Info() const override
57  {
58  std::stringstream buffer;
59  buffer << "CylinderParticle" ;
60  return buffer.str();
61  }
62 
64  virtual void PrintInfo(std::ostream& rOStream) const override {rOStream << "CylinderParticle";}
65 
67  virtual void PrintData(std::ostream& rOStream) const override {}
68 
69 
70  protected:
71 
73 
74  private:
75 
76 
77  friend class Serializer;
78 
79  virtual void save(Serializer& rSerializer) const override
80  {
82  }
83 
84  virtual void load(Serializer& rSerializer) override
85  {
87  }
88 
89 
90 
91  }; // Class SphericParticle
92 
93 
95  inline std::istream& operator >> (std::istream& rIStream,
96  CylinderParticle& rThis){ return rIStream;}
97 
99  inline std::ostream& operator << (std::ostream& rOStream,
100  const CylinderParticle& rThis)
101  {
102  rThis.PrintInfo(rOStream);
103  rOStream << std::endl;
104  rThis.PrintData(rOStream);
105 
106  return rOStream;
107  }
109 
111 
112 } // namespace Kratos.
113 
114 #endif // KRATOS_SPHERIC_PARTICLE_H_INCLUDED defined
115 
116 
Definition: cylinder_particle.h:26
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: cylinder_particle.h:64
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: cylinder_particle.h:67
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: cylinder_particle.h:32
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(CylinderParticle)
virtual std::string Info() const override
Turn back information as a string.
Definition: cylinder_particle.h:56
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: cylinder_particle.h:33
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: cylinder_particle.h:31
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_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
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
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