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.
constraint_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 authors: Vicente Mataix Ferrandiz
11 // Klaus B Sautter
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 #include "includes/model_part.h"
22 
23 namespace Kratos
24 {
27 
31 
35 
39 
43 
49 namespace ConstraintUtilities
50 {
57  void KRATOS_API(KRATOS_CORE) ComputeActiveDofs(
58  ModelPart& rModelPart,
59  std::vector<int>& rActiveDofs,
60  const ModelPart::DofsArrayType& rDofSet
61  );
62 
69  void KRATOS_API(KRATOS_CORE) DistributedComputeActiveDofs(
70  ModelPart& rModelPart,
71  std::vector<int>& rActiveDofs,
72  const ModelPart::DofsArrayType& rDofSet,
73  const std::size_t InitialDofId
74  );
75 
80  void KRATOS_API(KRATOS_CORE) ResetSlaveDofs(ModelPart& rModelPart);
81 
86  void KRATOS_API(KRATOS_CORE) ApplyConstraints(ModelPart& rModelPart);
87 
95  ModelPart& rModelPart,
96  const std::vector<std::string>& rDofVariableNames,
97  const std::vector<std::string>& rResidualDofVariableNames
98  );
99 
110  ModelPart& rModelPart,
111  const std::string& DofDisplacementVariableName = "DISPLACEMENT",
112  const std::string& MassVariableName = "NODAL_MASS",
113  const std::string& DofRotationVariableName = "ROTATION",
114  const std::string& InertiaVariableName = "NODAL_INERTIA_TENSOR"
115  );
116 
117 }; // namespace ConstraintUtilities
118 } // namespace Kratos
PointerVectorSet< DofType > DofsArrayType
Definition: model_part.h:115
#define KRATOS_API(...)
Definition: kratos_export_api.h:40
This namespace includes several utilities necessaries for the computation of the MPC.
void PreComputeExplicitConstraintMassAndInertia(ModelPart &rModelPart, const std::string &DofDisplacementVariableName, const std::string &MassVariableName, const std::string &DofRotationVariableName, const std::string &InertiaVariableName)
This method precomputes the contribution of the explicit MPC over nodal masses and inertias.
Definition: constraint_utilities.cpp:296
void ComputeActiveDofs(ModelPart &rModelPart, std::vector< int > &rActiveDofs, const ModelPart::DofsArrayType &rDofSet)
This method computes the active dofs.
Definition: constraint_utilities.cpp:26
void ApplyConstraints(ModelPart &rModelPart)
This method resets the values of the slave dofs.
Definition: constraint_utilities.cpp:159
void PreComputeExplicitConstraintConstribution(ModelPart &rModelPart, const std::vector< std::string > &rDofVariableNames, const std::vector< std::string > &rResidualDofVariableNames)
This method precomputes the contribution of the explicit MPC over nodal residual forces.
Definition: constraint_utilities.cpp:182
void DistributedComputeActiveDofs(ModelPart &rModelPart, std::vector< int > &rActiveDofs, const ModelPart::DofsArrayType &rDofSet, const std::size_t InitialDofId)
This method computes the active dofs.
Definition: constraint_utilities.cpp:70
void ResetSlaveDofs(ModelPart &rModelPart)
This method resets the values of the slave dofs.
Definition: constraint_utilities.cpp:136
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21