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.
variables_utilities.hpp
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 //
11 // Main authors: Anne van de Graaf
12 //
13 
14 #pragma once
15 
16 #include <algorithm>
17 
18 #include "containers/variable.h"
19 
20 namespace Kratos
21 {
22 
24 {
25 public:
26  template <typename GeometryType, typename OutputIt>
27  static OutputIt GetNodalValues(const GeometryType& rGeometry,
28  const Variable<double>& rNodalVariable,
29  OutputIt FirstOut)
30  {
31  return std::transform(rGeometry.begin(), rGeometry.end(), FirstOut,
32  [&rNodalVariable](const auto& node) {
33  return node.FastGetSolutionStepValue(rNodalVariable);
34  });
35  }
36 };
37 
38 }
Geometry base class.
Definition: geometry.h:71
iterator begin()
Definition: geometry.h:465
iterator end()
Definition: geometry.h:473
Definition: variables_utilities.hpp:24
static OutputIt GetNodalValues(const GeometryType &rGeometry, const Variable< double > &rNodalVariable, OutputIt FirstOut)
Definition: variables_utilities.hpp:27
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Definition: mesh_converter.cpp:38