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.
apply_function_to_nodes_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 authors: Riccardo Rossi
11 // Collaborator: Vicente Mataix Ferrandiz
12 //
13 
14 #if !defined(KRATOS_APPLY_FUNCTION_TO_NODES_UTILITY_H_INCLUDED)
15 #define KRATOS_APPLY_FUNCTION_TO_NODES_UTILITY_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/model_part.h"
24 
25 namespace Kratos
26 {
29 
33 
37 
41 
45 
53 class KRATOS_API(KRATOS_CORE) ApplyFunctionToNodesUtility
54 {
55 public:
58 
60  typedef std::size_t IndexType;
61 
64 
68 
77  GenericFunctionUtility::Pointer pFunction
78  ): mrNodes(rNodes),
79  mpFunction(pFunction)
80  {
81  };
82 
86 
92  void ApplyFunction(
93  const Variable<double>& rVariable,
94  const double t
95  );
96 
101  std::vector<double> ReturnFunction(const double t);
102 
103 private:
104 
107 
109  GenericFunctionUtility::Pointer mpFunction;
110 
112 };
113 
114 }
115 
116 #endif // KRATOS_APPLY_FUNCTION_TO_NODES_UTILITY_H_INCLUDED
This function applies a givn function to its nodes calling GenericFunctionUtility.
Definition: apply_function_to_nodes_utility.h:54
std::size_t IndexType
The index type definition.
Definition: apply_function_to_nodes_utility.h:60
ApplyFunctionToNodesUtility(ModelPart::NodesContainerType &rNodes, GenericFunctionUtility::Pointer pFunction)
Default constructor.
Definition: apply_function_to_nodes_utility.h:75
KRATOS_CLASS_POINTER_DEFINITION(ApplyFunctionToNodesUtility)
Counted pointer of ApplyFunctionToNodesUtility.
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int t
Definition: ode_solve.py:392