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.
fixed_mesh_ale_utilities.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 author: Ruben Zorrilla
11 //
12 //
13 
14 #if !defined(KRATOS_FIXED_MESH_ALE_UTILITIES_H_INCLUDED )
15 #define KRATOS_FIXED_MESH_ALE_UTILITIES_H_INCLUDED
16 
17 // System includes
18 
19 
20 // External includes
21 
22 
23 // Project includes
24 #include "containers/model.h"
25 #include "includes/define.h"
33 #include "spaces/ublas_space.h"
34 
35 // Application includes
36 
37 
38 namespace Kratos
39 {
42 
45 
46 
50 
51 
55 
56 
60 
61 
65 
78 class KRATOS_API(MESH_MOVING_APPLICATION) FixedMeshALEUtilities
79 {
80 public:
83 
93 
94  typedef typename SchemeType::Pointer SchemePointerType;
95  typedef typename StrategyType::Pointer StrategyPointerType;
96  typedef typename BuilderAndSolverType::Pointer BuilderAndSolverPointerType;
97 
100 
104 
107  Model &rModel,
108  Parameters &rParameters);
109 
111  virtual ~FixedMeshALEUtilities() = default;
112 
116 
117 
121 
128  virtual void Initialize(ModelPart &rOriginModelPart);
129 
137  virtual void SetVirtualMeshValuesFromOriginMesh();
138 
146  virtual void ComputeMeshMovement(const double DeltaTime);
147 
154  virtual void UndoMeshMovement();
155 
165  template <unsigned int TDim>
166  void ProjectVirtualValues(
167  ModelPart &rOriginModelPart,
168  const unsigned int BufferSize = 3);
169 
173 
174 
178 
179 
183 
185  std::string Info() const;
186 
188  void PrintInfo(std::ostream& rOStream) const;
189 
191  void PrintData(std::ostream& rOStream) const;
192 
196 
197 
199 private:
202 
203 
207 
208  ModelPart &mrVirtualModelPart;
209  ModelPart &mrStructureModelPart;
210  ModelPart *mpOriginModelPart = nullptr;
211 
212  double mSearchTolerance;
213  unsigned int mSearchMaxResults;
214 
215  Parameters mEmbeddedNodalVariableSettings;
216 
217  std::vector<const Variable<double>*> mScalarVariablesList;
218  std::vector<const Variable<array_1d<double,3>>*> mArrayVariablesList;
219 
220  LinearSolverType::Pointer mpLinearSolver = nullptr;
221  StrategyPointerType mpMeshMovingStrategy = nullptr;
222 
226 
227 
231 
237  Parameters GetDefaultParameters();
238 
244  void SetLinearSolverPointer(const Parameters &rLinearSolverSettings);
245 
252  virtual void FillVirtualModelPart(ModelPart &rOriginModelPart);
253 
259  virtual void CreateVirtualModelPartElements(const ModelPart &rOriginModelPart);
260 
265  void SetMeshMovingStrategy();
266 
274  void InitializeVirtualMeshValues();
275 
281  void InitializeMeshDisplacementFixity();
282 
288  void SetMeshDisplacementFixityFromOriginModelPart();
289 
296  void SetEmbeddedNodalMeshDisplacement();
297 
305  void SolveMeshMovementStrategy(const double DeltaTime);
306 
314  void RevertMeshDisplacementFixity();
315 
319 
320 
324 
325 
329 
331  FixedMeshALEUtilities& operator=(FixedMeshALEUtilities const& rOther) = delete;
332 
334  FixedMeshALEUtilities(FixedMeshALEUtilities const& rOther) = delete;
335 
337 }; // Class FixedMeshALEUtilities
338 
342 
344 inline std::ostream& operator << (
345  std::ostream& rOStream,
346  const FixedMeshALEUtilities& rThis);
347 
350 } // namespace Kratos.
351 
352 #endif // KRATOS_FIXED_MESH_ALE_UTILITIES_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: calculate_embedded_nodal_variable_from_skin_process.h:160
Utility to perform the FM-ALE algorithm operations This utility implements the Fixed Mesh - Arbitrary...
Definition: fixed_mesh_ale_utilities.h:79
CalculateEmbeddedNodalVariableFromSkinProcess< array_1d< double, 3 >, SparseSpaceType, LocalSpaceType, LinearSolverType > EmbeddedNodalVariableProcessArrayType
Definition: fixed_mesh_ale_utilities.h:92
LinearSolver< SparseSpaceType, LocalSpaceType > LinearSolverType
Definition: fixed_mesh_ale_utilities.h:87
KRATOS_CLASS_POINTER_DEFINITION(FixedMeshALEUtilities)
Pointer definition of FixedMeshALEUtilities.
LinearSolverFactory< SparseSpaceType, LocalSpaceType > LinearSolverFactoryType
Definition: fixed_mesh_ale_utilities.h:88
Element::NodesArrayType NodesArrayType
Definition: fixed_mesh_ale_utilities.h:84
StrategyType::Pointer StrategyPointerType
Definition: fixed_mesh_ale_utilities.h:95
virtual ~FixedMeshALEUtilities()=default
Destructor.
BuilderAndSolverType::Pointer BuilderAndSolverPointerType
Definition: fixed_mesh_ale_utilities.h:96
void PrintInfo(std::ostream &rOStream) const
Print information about this object.
ResidualBasedBlockBuilderAndSolver< SparseSpaceType, LocalSpaceType, LinearSolverType > BuilderAndSolverType
Definition: fixed_mesh_ale_utilities.h:91
UblasSpace< double, Matrix, Vector > LocalSpaceType
Definition: fixed_mesh_ale_utilities.h:85
UblasSpace< double, CompressedMatrix, Vector > SparseSpaceType
Definition: fixed_mesh_ale_utilities.h:86
std::string Info() const
Turn back information as a string.
ResidualBasedIncrementalUpdateStaticScheme< SparseSpaceType, LocalSpaceType > SchemeType
Definition: fixed_mesh_ale_utilities.h:89
SchemeType::Pointer SchemePointerType
Definition: fixed_mesh_ale_utilities.h:94
void PrintData(std::ostream &rOStream) const
Print object's data.
ResidualBasedLinearStrategy< SparseSpaceType, LocalSpaceType, LinearSolverType > StrategyType
Definition: fixed_mesh_ale_utilities.h:90
Here we add the functions needed for the registration of linear solvers.
Definition: linear_solver_factory.h:62
Base class for all the linear solvers in Kratos.
Definition: linear_solver.h:65
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
Current class provides an implementation for standard builder and solving operations.
Definition: residualbased_block_builder_and_solver.h:82
This class provides the implementation of a static scheme.
Definition: residualbased_incrementalupdate_static_scheme.h:57
This is a very simple strategy to solve linearly the problem.
Definition: residualbased_linear_strategy.h:64
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TUblasSparseSpace< double > SparseSpaceType
Definition: linear_solver_factory.h:154
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
TUblasDenseSpace< double > LocalSpaceType
Definition: register_factories.h:33