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.
ice_continuum_particle.h
Go to the documentation of this file.
1 //
2 // Author: Salva Latorre, latorre@cimne.upc.edu
3 //
4 
5 #if !defined(KRATOS_ICECONTINUUMPARTICLE_H_INCLUDED)
6 #define KRATOS_ICECONTINUUMPARTICLE_H_INCLUDED
7 
8 // System includes
9 #include <string>
10 #include <iostream>
11 
12 // Project includes
13 #include "includes/define.h"
15 
16 namespace Kratos {
17 
18  class KRATOS_API(DEM_APPLICATION) IceContinuumParticle : public SphericContinuumParticle {
19 
20  public:
21 
24 
26  IceContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry) : SphericContinuumParticle(NewId, pGeometry) {}
27  IceContinuumParticle(IndexType NewId, NodesArrayType const& ThisNodes) : SphericContinuumParticle(NewId, ThisNodes) {}
28  IceContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties) : SphericContinuumParticle(NewId, pGeometry, pProperties) {}
29 
30  Element::Pointer Create(IndexType NewId, NodesArrayType const& ThisNodes, PropertiesType::Pointer pProperties) const override
31  {
32  return SphericContinuumParticle::Pointer(new IceContinuumParticle(NewId, GetGeometry().Create(ThisNodes), pProperties));
33  }
34 
36  virtual ~IceContinuumParticle() {};
37 
39  virtual std::string Info() const override
40  {
41  std::stringstream buffer;
42  buffer << "IceContinuumParticle" ;
43  return buffer.str();
44  }
45 
47  virtual void PrintInfo(std::ostream& rOStream) const override {rOStream << "IceContinuumParticle";}
48 
50  virtual void PrintData(std::ostream& rOStream) const override {}
51 
52  virtual array_1d<double,3> ComputeWeight(const array_1d<double,3>& gravity, const ProcessInfo& r_process_info) override;
53 
54  private:
55 
56  friend class Serializer;
57 
58  virtual void save(Serializer& rSerializer) const override
59  {
61  }
62 
63  virtual void load(Serializer& rSerializer) override
64  {
66  }
67 
68  /*
70  IceContinuumParticle& operator=(IceContinuumParticlev const& rOther)
71  {
72  return *this;
73  }
74 
76  IceContinuumParticle(IceContinuumParticle const& rOther)
77  {
78  *this = rOther;
79  }
80  */
81 
83 
84  }; // Class IceContinuumParticle
85 
87  inline std::istream& operator >> (std::istream& rIStream, IceContinuumParticle& rThis) {return rIStream;}
88 
90  inline std::ostream& operator << (std::ostream& rOStream, const IceContinuumParticle& rThis) {
91  rThis.PrintInfo(rOStream);
92  rOStream << std::endl;
93  rThis.PrintData(rOStream);
94  return rOStream;
95  }
96 
97 } // namespace Kratos
98 
99 #endif // KRATOS_ICECONTINUUMPARTICLE_H_INCLUDED defined
std::size_t IndexType
Definition: flags.h:74
Definition: ice_continuum_particle.h:18
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: ice_continuum_particle.h:47
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: ice_continuum_particle.h:30
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: ice_continuum_particle.h:50
IceContinuumParticle(IndexType NewId, NodesArrayType const &ThisNodes)
Definition: ice_continuum_particle.h:27
virtual std::string Info() const override
Turn back information as a string.
Definition: ice_continuum_particle.h:39
virtual ~IceContinuumParticle()
Destructor.
Definition: ice_continuum_particle.h:36
IceContinuumParticle()
Definition: ice_continuum_particle.h:25
IceContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: ice_continuum_particle.h:26
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(IceContinuumParticle)
Pointer definition of IceContinuumParticle.
IceContinuumParticle(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: ice_continuum_particle.h:28
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