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.
properties_proxies.h
Go to the documentation of this file.
1 //
2 // Authors:
3 // Miguel Angel Celigueta maceli@cimne.upc.edu
4 //
5 
6 #if !defined(PROPERTIES_PROXIES_H_INCLUDED)
7 #define PROPERTIES_PROXIES_H_INCLUDED
8 
9 // System includes
10 #include <string>
11 #include <iostream>
12 
13 // Project includes
14 #include "includes/model_part.h"
15 
16 namespace Kratos {
17 
18  class KRATOS_API(DEM_APPLICATION) PropertiesProxy {
19 
20  public:
21 
23 
24  PropertiesProxy(); //only used by serializer!
25 
26  unsigned int GetId();
27  void SetId(int id);
28 
29  double GetYoung();
30  double* pGetYoung();
31  void SetYoungFromProperties(double* young);
32 
33  double GetPoisson();
34  double* pGetPoisson();
35  void SetPoissonFromProperties(double* poisson);
36 
37  double GetDensity();
38  double* pGetDensity();
39  void SetDensityFromProperties(double* density);
40 
41  int GetParticleMaterial();
42  int* pGetParticleMaterial();
43  void SetParticleMaterialFromProperties(int* particle_material);
44 
46 
47  private:
48 
49  unsigned int mId;
50  double* mYoung;
51  double* mPoisson;
52  double* mDensity;
53  int* mParticleMaterial;
54 
55  friend class Serializer;
56 
57  void save(Serializer& rSerializer) const;
58 
59  void load(Serializer& rSerializer);
60  }; // class PropertiesProxy
61 
62 
63  inline std::ostream & operator<<( std::ostream& rOut, const PropertiesProxy& rTheProxies){
64  rOut << "";
65  return rOut;
66  }
67 
68 
69  class KRATOS_API(DEM_APPLICATION) PropertiesProxiesManager {
70 
71  public:
73 
74  void AddPropertiesProxiesFromModelPartProperties(std::vector<PropertiesProxy>& vector_of_proxies,
75  ModelPart& rModelPart,
76  int& properties_counter);
77 
78  void CreatePropertiesProxies(ModelPart& balls_mp,
79  ModelPart& inlet_mp,
80  ModelPart& clusters_mp);
81 
82  void CreatePropertiesProxies(ModelPart& r_model_part);
83 
84  std::vector<PropertiesProxy>& GetPropertiesProxies(ModelPart& r_model_part);
85  }; // class PropertiesProxiesManager
86 
87 
88 } // namespace Kratos
89 
90 #endif // PROPERTIES_PROXIES_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Definition: properties_proxies.h:69
KRATOS_CLASS_POINTER_DEFINITION(PropertiesProxiesManager)
Definition: properties_proxies.h:18
KRATOS_CLASS_POINTER_DEFINITION(PropertiesProxy)
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
double GetDensity(const Properties &rProps, const IndexType Index)
Definition: shell_utilities.cpp:223
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float density
Definition: face_heat.py:56
def load(f)
Definition: ode_solve.py:307