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.
mpm_particle_base_dirichlet_condition.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Bodhinanda Chandra
11 //
12 
13 
14 #if !defined(KRATOS_MPM_PARTICLE_BASE_DIRICHLET_CONDITION_3D_H_INCLUDED )
15 #define KRATOS_MPM_PARTICLE_BASE_DIRICHLET_CONDITION_3D_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/define.h"
25 
26 namespace Kratos
27 {
28 
31 
35 
39 
43 
47 
50 {
51 
52 public:
53 
55  typedef std::size_t SizeType;
57 
58  // Counted pointer of MPMParticleBaseDirichletCondition
60 
63 
67 
68  // Constructor void
70  {};
71 
72  // Constructor using an array of nodes
73  MPMParticleBaseDirichletCondition( IndexType NewId, GeometryType::Pointer pGeometry )
74  : MPMParticleBaseCondition(NewId,pGeometry)
75  {};
76 
77  // Constructor using an array of nodes with properties
78  MPMParticleBaseDirichletCondition( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties )
79  : MPMParticleBaseCondition(NewId,pGeometry,pProperties)
80  {};
81 
82  // Destructor
84  {};
85 
89 
90 
98  int Check( const ProcessInfo& rCurrentProcessInfo ) const override;
99 
104  void InitializeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
105 
110  void FinalizeSolutionStep(const ProcessInfo& rCurrentProcessInfo) override;
111 
115 
117  const Variable<array_1d<double, 3 > >& rVariable,
118  std::vector<array_1d<double, 3 > >& rValues,
119  const ProcessInfo& rCurrentProcessInfo) override;
120 
124 
126  const Variable<array_1d<double, 3 > >& rVariable,
127  const std::vector<array_1d<double, 3 > >& rValues,
128  const ProcessInfo& rCurrentProcessInfo) override;
129 
131 
132 protected:
135 
136 
141 
145 
147  virtual void MPMShapeFunctionPointValues(Vector& rResult) const override;
148 
150 
151 private:
154 
155  friend class Serializer;
156 
157  void save( Serializer& rSerializer ) const override
158  {
160  rSerializer.save("imposed_displacement",m_imposed_displacement);
161  rSerializer.save("imposed_velocity",m_imposed_velocity);
162  rSerializer.save("imposed_acceleration",m_imposed_acceleration);
163  rSerializer.save("contact_force",m_contact_force);
164 
165  }
166 
167  void load( Serializer& rSerializer ) override
168  {
170  rSerializer.load("imposed_displacement",m_imposed_displacement);
171  rSerializer.load("imposed_velocity",m_imposed_velocity);
172  rSerializer.load("imposed_acceleration",m_imposed_acceleration);
173  rSerializer.load("contact_force",m_contact_force);
174  }
175 
177 
178 }; // class MPMParticleBaseDirichletCondition.
179 
181 
182 } // namespace Kratos.
183 
184 #endif // KRATOS_MPM_PARTICLE_BASE_DIRICHLET_CONDITION_3D_H_INCLUDED defined
std::size_t IndexType
Definition: flags.h:74
Definition: mpm_particle_base_condition.h:50
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_condition.cpp:303
void SetValuesOnIntegrationPoints(const Variable< double > &rVariable, const std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_condition.cpp:346
Definition: mpm_particle_base_dirichlet_condition.h:50
void FinalizeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_dirichlet_condition.cpp:58
int Check(const ProcessInfo &rCurrentProcessInfo) const override
Definition: mpm_particle_base_dirichlet_condition.cpp:146
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_condition.cpp:303
array_1d< double, 3 > m_imposed_displacement
Definition: mpm_particle_base_dirichlet_condition.h:137
array_1d< double, 3 > m_imposed_acceleration
Definition: mpm_particle_base_dirichlet_condition.h:139
MPMParticleBaseDirichletCondition()
Definition: mpm_particle_base_dirichlet_condition.h:69
void SetValuesOnIntegrationPoints(const Variable< double > &rVariable, const std::vector< double > &rValues, const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_condition.cpp:346
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(MPMParticleBaseDirichletCondition)
array_1d< double, 3 > m_contact_force
Definition: mpm_particle_base_dirichlet_condition.h:140
virtual void MPMShapeFunctionPointValues(Vector &rResult) const override
Calculate Shape Function Values as a vector.
Definition: mpm_particle_base_dirichlet_condition.cpp:122
MPMParticleBaseDirichletCondition(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: mpm_particle_base_dirichlet_condition.h:73
array_1d< double, 3 > m_imposed_velocity
Definition: mpm_particle_base_dirichlet_condition.h:138
~MPMParticleBaseDirichletCondition() override
Definition: mpm_particle_base_dirichlet_condition.h:83
void InitializeSolutionStep(const ProcessInfo &rCurrentProcessInfo) override
Definition: mpm_particle_base_dirichlet_condition.cpp:25
MPMParticleBaseDirichletCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: mpm_particle_base_dirichlet_condition.h:78
std::size_t SizeType
Definition: mpm_particle_base_dirichlet_condition.h:55
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307