OGS
ProcessLib/LIE/Common/Utils.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#pragma once
5
6
#include <Eigen/Core>
7
8
#include "
MeshLib/Elements/Element.h
"
9
#include "
MeshLib/Node.h
"
10
11
namespace
ProcessLib
12
{
13
namespace
LIE
14
{
17
template
<
typename
Derived>
18
Eigen::Vector3d
computePhysicalCoordinates
(
19
MeshLib::Element
const
& e, Eigen::MatrixBase<Derived>
const
& shape)
20
{
21
Eigen::Vector3d pt = Eigen::Vector3d::Zero();
22
for
(
unsigned
i = 0; i < e.
getNumberOfNodes
(); i++)
23
{
24
MeshLib::Node
const
& node = *e.
getNode
(i);
25
for
(
unsigned
j = 0; j < 3; j++)
26
{
27
pt[j] += shape[i] * node[j];
28
}
29
}
30
return
pt;
31
}
32
33
}
// namespace LIE
34
}
// namespace ProcessLib
Element.h
Node.h
MeshLib::Element
Definition
Element.h:25
MeshLib::Element::getNumberOfNodes
virtual unsigned getNumberOfNodes() const =0
MeshLib::Element::getNode
virtual const Node * getNode(unsigned idx) const =0
MeshLib::Node
Definition
Node.h:21
ProcessLib::LIE
Definition
BranchProperty.h:13
ProcessLib::LIE::computePhysicalCoordinates
Eigen::Vector3d computePhysicalCoordinates(MeshLib::Element const &e, Eigen::MatrixBase< Derived > const &shape)
Definition
ProcessLib/LIE/Common/Utils.h:18
ProcessLib
Definition
ProjectData.h:40
ProcessLib
LIE
Common
Utils.h
Generated by
1.14.0