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.
non_local_plasticity_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosPfemSolidMechanicsApplication $
3 // Created by: $Author: LMonforte $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined ( KRATOS_NON_LOCAL_PLASTICITY_PROCESS_H_INCLUDED )
11 #define KRATOS_NON_LOCAL_PLASTICITY_PROCESS_H_INCLUDED
12 
13 
14 /* System includes */
15 
16 
17 /* External includes */
18 
19 
20 /* Project includes */
21 #include "processes/process.h"
22 #include "includes/model_part.h"
23 #include "includes/kratos_flags.h"
24 #include "utilities/math_utils.h"
26 
28 
29 
30 namespace Kratos
31 {
32 
33  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) NonLocalPlasticityProcess
34  : public Process
35  {
36 
37  protected:
38  struct GaussPoint
39  {
41 
42  GaussPoint( ConstitutiveLaw::Pointer & pConstLaw,
43  array_1d<double, 3> rCoord)
44  {
45  pConstitutiveLaw = pConstLaw;
46  Coordinates = rCoord;
47  }
48 
49  void AddNeighbour( const int & rID,
50  double weight)
51  {
52  NeighbourGP.push_back( rID);
53  NeighbourWeight.push_back(weight);
54  }
55 
56  ConstitutiveLaw::Pointer pConstitutiveLaw;
58 
59  std::vector< int > NeighbourGP;
60  std::vector<double> NeighbourWeight;
61 
62  };
63 
64  public:
65 
66 
70  // Pointer definition of Process
72 
73 
82  // Constructor.
83 
84 
85  NonLocalPlasticityProcess( ModelPart& rModelPart, Parameters rParameters);
86 
87 
91  virtual ~NonLocalPlasticityProcess();
92 
105  void operator()()
106  {
107  Execute();
108  }
109 
110  void Execute() override;
111 
112  protected:
113 
114 
115 
116 
117  void PerformGaussPointSearch( std::vector< GaussPoint > & rNeighbourGP,
118  const double CharacteristicLength);
119 
120  double& ComputeWeightFunction( const double& rDistance, const double & rCharacteristicLength, double & rAlpha);
121 
122  private:
123 
124  // member variables
125 
126  ModelPart& mrModelPart;
127 
128  double mCharacteristicLength;
129 
130  std::vector< Variable<double> > mLocalVariables;
131  std::vector< Variable<double> > mNonLocalVariables;
132 
133 
134  }; //end class NonLocalPlasticityProcess
135 
136  } // END namespace Kratos
137 
138 #endif //KRATOS_NON_LOCAL_PLASTICITY_PROCESS_H_INCLUDED
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
Definition: non_local_plasticity_process.hpp:35
ModelPart::ConditionsContainerType ConditionsContainerType
Definition: non_local_plasticity_process.hpp:75
ModelPart::MeshType MeshType
Definition: non_local_plasticity_process.hpp:76
ModelPart::NodesContainerType NodesArrayType
Definition: non_local_plasticity_process.hpp:74
KRATOS_CLASS_POINTER_DEFINITION(NonLocalPlasticityProcess)
void operator()()
Definition: non_local_plasticity_process.hpp:105
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
The base class for all processes in Kratos.
Definition: process.h:49
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Definition: non_local_plasticity_process.hpp:39
std::vector< int > NeighbourGP
Definition: non_local_plasticity_process.hpp:59
std::vector< double > NeighbourWeight
Definition: non_local_plasticity_process.hpp:60
GaussPoint()
Definition: non_local_plasticity_process.hpp:40
void AddNeighbour(const int &rID, double weight)
Definition: non_local_plasticity_process.hpp:49
array_1d< double, 3 > Coordinates
Definition: non_local_plasticity_process.hpp:57
GaussPoint(ConstitutiveLaw::Pointer &pConstLaw, array_1d< double, 3 > rCoord)
Definition: non_local_plasticity_process.hpp:42
ConstitutiveLaw::Pointer pConstitutiveLaw
Definition: non_local_plasticity_process.hpp:56