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.
perturb_geometry_base_utility.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Manuel Messmer
10 //
11 
12 #pragma once
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
19 #include "includes/model_part.h"
20 #include "spaces/ublas_space.h"
21 
22 
23 namespace Kratos {
26 
29 
36 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) PerturbGeometryBaseUtility
37 {
38 public:
39 
42 
45 
47 
49 
51 
54 
58 
60  PerturbGeometryBaseUtility( ModelPart& rInitialModelPart, Parameters Settings);
61 
64 
68 
69  virtual int CreateRandomFieldVectors() = 0;
70 
76  void ApplyRandomFieldVectorsToGeometry(ModelPart& rThisModelPart, const std::vector<double>& variables );
77 
81 
83  virtual std::string Info() const
84  {
85  return "PerturbGeometryBaseUtility";
86  }
87 
89  virtual void PrintInfo(std::ostream& rOStream) const
90  {
91  rOStream << "PerturbGeometryBaseUtility";
92  }
93 
95  virtual void PrintData(std::ostream& rOStream) const
96  {
97  }
98 
100 
101 protected:
102 
105 
107 
109 
111 
113 
115 
119 
124  double CorrelationFunction( ModelPart::NodeType& itNode1, ModelPart::NodeType& itNode2, double CorrelationLenth);
125 
127 
128 private:
129 
132 
133  double mMaximalDisplacement;
134 
137 
140 
142 
143  }; // Class PerturbGeometryBaseUtility
144 
146 
148 }
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
Base class for geometry perturbation utilities.
Definition: perturb_geometry_base_utility.h:37
double mTruncationError
Definition: perturb_geometry_base_utility.h:112
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: perturb_geometry_base_utility.h:89
int mEchoLevel
Definition: perturb_geometry_base_utility.h:114
TUblasDenseSpace< double > TDenseSpaceType
Definition: perturb_geometry_base_utility.h:44
TUblasSparseSpace< double > TSparseSpaceType
Definition: perturb_geometry_base_utility.h:43
TDenseSpaceType::VectorType DenseVectorType
Definition: perturb_geometry_base_utility.h:48
double mCorrelationLength
Definition: perturb_geometry_base_utility.h:110
virtual ~PerturbGeometryBaseUtility()
Destructor.
Definition: perturb_geometry_base_utility.h:63
virtual std::string Info() const
Turn back information as a string.
Definition: perturb_geometry_base_utility.h:83
DenseMatrixPointerType mpPerturbationMatrix
Definition: perturb_geometry_base_utility.h:106
TDenseSpaceType::MatrixType DenseMatrixType
Definition: perturb_geometry_base_utility.h:50
ModelPart & mrInitialModelPart
Definition: perturb_geometry_base_utility.h:108
TDenseSpaceType::MatrixPointerType DenseMatrixPointerType
Definition: perturb_geometry_base_utility.h:46
KRATOS_CLASS_POINTER_DEFINITION(PerturbGeometryBaseUtility)
Pointer definition of PerturbGeometryBaseUtility.
virtual int CreateRandomFieldVectors()=0
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: perturb_geometry_base_utility.h:95
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
typename Kratos::shared_ptr< TMatrixType > MatrixPointerType
The pointer to the matrix type.
Definition: ublas_space.h:145
TMatrixType MatrixType
The matrix type considered.
Definition: ublas_space.h:133
TVectorType VectorType
The vector type considered.
Definition: ublas_space.h:136
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21