OGS
Utils.h
Go to the documentation of this file.
1
10#pragma once
11
12#include <Eigen/Core>
13
15#include "MeshLib/Node.h"
16
17namespace ProcessLib
18{
19namespace LIE
20{
23template <typename Derived>
25 MeshLib::Element const& e, Eigen::MatrixBase<Derived> const& shape)
26{
27 Eigen::Vector3d pt = Eigen::Vector3d::Zero();
28 for (unsigned i = 0; i < e.getNumberOfNodes(); i++)
29 {
30 MeshLib::Node const& node = *e.getNode(i);
31 for (unsigned j = 0; j < 3; j++)
32 {
33 pt[j] += shape[i] * node[j];
34 }
35 }
36 return pt;
37}
38
39} // namespace LIE
40} // namespace ProcessLib
Definition of the Element class.
Definition of the Node class.
virtual unsigned getNumberOfNodes() const =0
virtual const Node * getNode(unsigned idx) const =0
Eigen::Vector3d computePhysicalCoordinates(MeshLib::Element const &e, Eigen::MatrixBase< Derived > const &shape)
Definition Utils.h:24