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.
beam_particle.h
Go to the documentation of this file.
1 //
2 // Author: Joaquín Irazábal jirazabal@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_BEAM_PARTICLE_H_INCLUDED)
6 #define KRATOS_BEAM_PARTICLE_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
14 
15 namespace Kratos {
16 
17  class KRATOS_API(DEM_APPLICATION) BeamParticle : public SphericContinuumParticle {
18 
19  public:
20 
23 
25  typedef BaseType::ParticleDataBuffer BaseBufferType;
26  typedef std::unique_ptr<BaseType::ParticleDataBuffer> BaseBufferPointerType;
27 
29  BeamParticle();
30  BeamParticle( IndexType NewId, GeometryType::Pointer pGeometry);
31  BeamParticle( IndexType NewId, NodesArrayType const& ThisNodes);
32  BeamParticle( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties);
33  BeamParticle(Element::Pointer p_continuum_spheric_particle);
34 
35  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override;
36 
38  virtual ~BeamParticle(){}
39 
41  std::string Info() const override
42  {
43  std::stringstream buffer;
44  buffer << "BeamParticle" ;
45  return buffer.str();
46  }
47 
49  void PrintInfo(std::ostream& rOStream) const override {rOStream << "BeamParticle";}
50 
52  void PrintData(std::ostream& rOStream) const override {}
53 
54  void CreateContinuumConstitutiveLaws() override;
55  void ContactAreaWeighting() override;
56  void CalculateMeanContactArea(const bool has_mpi, const ProcessInfo& r_process_info) override;
57  double CalculateMaxSearchDistance(const bool has_mpi, const ProcessInfo& r_process_info) override;
58 
59  virtual void Initialize(const ProcessInfo& r_process_info) override;
60 
61  virtual void InitializeSolutionStep(const ProcessInfo& r_process_info) override;
62 
63  virtual void ComputeBallToBallContactForceAndMoment(SphericParticle::ParticleDataBuffer &,
64  const ProcessInfo& r_process_info,
65  array_1d<double, 3>& rElasticForce,
66  array_1d<double, 3>& rContactForce) override;
67 
68  void Move(const double delta_t, const bool rotation_option, const double force_reduction_factor, const int StepFlag) override;
69 
70  void FinalizeSolutionStep(const ProcessInfo& r_process_info) override;
71 
73 
74  std::vector<Kratos::DEMBeamConstitutiveLaw::Pointer> mBeamConstitutiveLawArray;
75 
76  private:
77 
78  void save(Serializer& rSerializer) const override
79  {
81  }
82 
83  void load(Serializer& rSerializer) override
84  {
86  }
87 
88 }; // Class BeamParticle
89 
91  inline std::istream& operator >> (std::istream& rIStream, BeamParticle& rThis) {return rIStream;}
92 
94  inline std::ostream& operator << (std::ostream& rOStream, const BeamParticle& rThis) {
95  rThis.PrintInfo(rOStream);
96  rOStream << std::endl;
97  rThis.PrintData(rOStream);
98 
99  return rOStream;
100  }
101 
102 } // namespace Kratos
103 
104 #endif // KRATOS_BEAM_PARTICLE_H_INCLUDED defined
Definition: beam_particle.h:17
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: beam_particle.h:49
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: beam_particle.h:52
BaseType::ParticleDataBuffer BaseBufferType
Definition: beam_particle.h:25
std::unique_ptr< BaseType::ParticleDataBuffer > BaseBufferPointerType
Definition: beam_particle.h:26
std::string Info() const override
Turn back information as a string.
Definition: beam_particle.h:41
SphericContinuumParticle BaseType
Definition: beam_particle.h:24
virtual ~BeamParticle()
Destructor.
Definition: beam_particle.h:38
std::vector< Kratos::DEMBeamConstitutiveLaw::Pointer > mBeamConstitutiveLawArray
Definition: beam_particle.h:74
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(BeamParticle)
Pointer definition of BeamParticle.
std::size_t IndexType
Definition: flags.h:74
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
virtual void CalculateOnContinuumContactElements(size_t i_neighbour_count, double LocalElasticContactForce[3], double ElasticLocalRotationalMoment[3], double contact_sigma, double contact_tau, double failure_criterion_state, double acumulated_damage, int time_steps, double calculation_area)
Definition: spheric_continuum_particle.cpp:844
Definition: spheric_particle.h:59
#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
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
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
float delta_t
Definition: rotatingcone_PureConvectionBenchmarking.py:129