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.
set_identity_function.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: Pooyan Dadvand
11 //
12 //
13 
14 #pragma once
15 
16 // System includes
17 #include <functional>
18 
19 // External includes
20 
21 // Project includes
22 
23 namespace Kratos
24 {
27 
41 template<class TDataType>
43 {
44 public:
50  TDataType& operator()(TDataType& data)
51  {
52  return data;
53  }
54 
60  const TDataType& operator()(const TDataType& data) const
61  {
62  return data;
63  }
64 };
65 
67 
68 } // namespace Kratos.
A functor that serves as the identity function.
Definition: set_identity_function.h:43
TDataType & operator()(TDataType &data)
Operator that returns a non-const reference to the input object.
Definition: set_identity_function.h:50
const TDataType & operator()(const TDataType &data) const
Operator that returns a const reference to the input object.
Definition: set_identity_function.h:60
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
data
Definition: mesh_to_mdpa_converter.py:59