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.
node_search_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 // This file is partly copied from "DEMApplication/custom_utilities/omp_dem_search.h" and modified
12 
13 #pragma once
14 
15 // System includes
16 #include <string>
17 #include <iostream>
18 
19 // Include kratos definitions
20 #include "includes/define.h"
21 
22 // Project includes
24 
25 // Configures
27 
28 // External includes
29 
30 namespace Kratos {
33 
36 
46 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) NodeSearchUtility
47 {
48  public:
51 
54 
55  //Node Types
57  //Configure Types
60  //Bin Types
62 
64 
68 
71  KRATOS_TRY;
72  NodesContainerType::ContainerType& nodes_model_part = rStructureNodes.GetContainer();
73  mpBins = Kratos::make_unique<NodeBinsType>(nodes_model_part.begin(), nodes_model_part.end());
74  mMaxNumberOfNodes = rStructureNodes.size();
75  KRATOS_CATCH("");
76  }
77 
80  }
81 
85 
94  void SearchNodesInRadius(
95  NodeType::Pointer pNode,
96  double const Radius,
97  ResultNodesContainerType& rResults );
98 
102 
104  virtual std::string Info() const
105  {
106  std::stringstream buffer;
107  buffer << "NodeSearchUtility" ;
108 
109  return buffer.str();
110  }
111 
113  virtual void PrintInfo(std::ostream& rOStream) const {rOStream << "NodeSearchUtility";}
114 
116  virtual void PrintData(std::ostream& rOStream) const {}
117 
119 
120  private:
124 
125  int mMaxNumberOfNodes;
126 
130 
133  {
134  return *this;
135  }
136 
138  NodeSearchUtility(NodeSearchUtility const& rOther)
139  {
140  *this = rOther;
141  }
142 
144 
145  }; // Class NodeSearchUtility
146 
148 
150 
151 } // namespace Kratos.
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: bins_dynamic_objects.h:57
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
Configuration file for nodes.
Definition: node_configure_for_node_search.h:38
This class defines the node.
Definition: node.h:65
Node Search.
Definition: node_search_utility.h:47
~NodeSearchUtility()
Destructor.
Definition: node_search_utility.h:79
KRATOS_CLASS_POINTER_DEFINITION(NodeSearchUtility)
Pointer definition of NodeSearchUtility.
virtual std::string Info() const
Turn back information as a string.
Definition: node_search_utility.h:104
NodesContainerType::ContainerType ResultNodesContainerType
Definition: node_search_utility.h:63
NodeConfigureForNodeSearch NodeConfigureType
Definition: node_search_utility.h:58
NodeSearchUtility(NodesContainerType &rStructureNodes)
Default constructor.
Definition: node_search_utility.h:70
BinsObjectDynamic< NodeConfigureType > NodeBinsType
Definition: node_search_utility.h:61
ModelPart::NodesContainerType NodesContainerType
Definition: node_search_utility.h:59
ModelPart::NodeType NodeType
Definition: node_search_utility.h:56
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: node_search_utility.h:113
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: node_search_utility.h:116
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::unique_ptr< T > unique_ptr
Definition: smart_pointers.h:33
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247