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.
assign_master_slave_constraints_to_neighbours_utility.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: Sebastian Ares de Parga Regalado
11 //
12 
13 #pragma once
14 
15 // System includes
16 #include <string>
17 #include <iostream>
18 
19 // External includes
20 
21 // Include kratos definitions
22 #include "includes/define.h"
23 
24 // Application includes
27 
28 // Project includes
32 
33 namespace Kratos {
36 
39 
56 {
57  public:
60 
61  //Node Types
63 
64  //Dof types
66 
67  //Configure Types
69 
70  //Bin
72 
76  using VectorResultNodesContainerType = std::vector<ResultNodesContainerType>;
77  using RadiusArrayType = std::vector<double>;
78 
79  using DofPointerVectorType = std::vector< Dof<double>::Pointer >;
80 
83 
87 
90 
92 
96 
105  void SearchNodesInRadiusForNode(
106  NodeType::Pointer pSlaveNode,
107  double const Radius,
108  ResultNodesContainerType& rCloudOfNodes,
109  ResultNodesContainerType& rLocalResults);
110 
119  void GetDofsAndCoordinatesForSlaveNode(
120  NodeType::Pointer pSlaveNode,
121  const std::vector<std::reference_wrapper<const Kratos::Variable<double>>>& rVariableList,
122  std::vector<DofPointerVectorType>& rSlaveDofs,
123  array_1d<double, 3>& rSlaveCoordinates
124  );
125 
133  void GetDofsAndCoordinatesForCloudOfNodes(
134  const ResultNodesContainerType& CloudOfNodesArray,
135  const std::vector<std::reference_wrapper<const Kratos::Variable<double>>>& rVariableList,
136  std::vector<DofPointerVectorType>& rCloudOfDofs,
137  Matrix& rCloudOfNodesCoordinates
138  );
139 
150  void AssignMasterSlaveConstraintsToNodes(
151  NodesContainerType pSlaveNodes,
152  double const Radius,
153  ModelPart& rComputingModelPart,
154  const std::vector<std::reference_wrapper<const Kratos::Variable<double>>>& rVariableList,
155  double const MinNumOfNeighNodes
156  );
157 
161 
163  virtual std::string Info() const
164  {
165  std::stringstream buffer;
166  buffer << "AssignMasterSlaveConstraintsToNeighboursUtility" ;
167 
168  return buffer.str();
169  }
170 
172  virtual void PrintInfo(std::ostream& rOStream) const {rOStream << "AssignMasterSlaveConstraintsToNeighboursUtility";}
173 
175  virtual void PrintData(std::ostream& rOStream) const {}
176 
178 
179  private:
182  NodeBinsType::UniquePointer mpBins;
183  int mMaxNumberOfNodes;
184 
185 }; // Class AssignMasterSlaveConstraintsToNeighboursUtility
186 } // namespace Kratos.
Assing Master-Slave Constraints to Neighbouring Nodes.
Definition: assign_master_slave_constraints_to_neighbours_utility.h:56
A dynamic binning data structure template for organizing and querying points in multi-dimensional spa...
Definition: bins_dynamic.h:57
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::MasterSlaveConstraintContainerType MasterSlaveConstraintContainerType
Definition: model_part.h:219
Node NodeType
Definition: model_part.h:117
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
Dof< double > DofType
Dof type.
Definition: node.h:83
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
std::vector< Dof< double >::Pointer > DofPointerVectorType
Definition: assign_master_slave_constraints_to_neighbours_utility.h:79
std::vector< double > RadiusArrayType
Definition: assign_master_slave_constraints_to_neighbours_utility.h:77
KRATOS_CLASS_POINTER_DEFINITION(AssignMasterSlaveConstraintsToNeighboursUtility)
Pointer definition of AssignMasterSlaveConstraintsToNeighboursUtility.
NodesContainerType::ContainerType ResultNodesContainerType
Definition: assign_master_slave_constraints_to_neighbours_utility.h:75
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: assign_master_slave_constraints_to_neighbours_utility.h:172
virtual std::string Info() const
Turn back information as a string.
Definition: assign_master_slave_constraints_to_neighbours_utility.h:163
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: assign_master_slave_constraints_to_neighbours_utility.h:175
std::vector< ResultNodesContainerType > VectorResultNodesContainerType
Definition: assign_master_slave_constraints_to_neighbours_utility.h:76
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247