OGS
getMaxiumElementEdgeLengths.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
7#include "MeshLib/Node.h"
8
9namespace MeshLib
10{
11std::vector<double> getMaxiumElementEdgeLengths(
12 std::vector<Element*> const& elements)
13{
14 std::vector<double> element_edge_lengths(elements.size());
15 for (auto const element : elements)
16 {
17 assert(element->getGeomType() != MeshElemType::POINT);
18
19 auto const& [min_edge_length, max_edge_length] =
21 (void)min_edge_length;
22
23 element_edge_lengths[element->getID()] = std::sqrt(max_edge_length);
24 }
25
26 return element_edge_lengths;
27}
28} // namespace MeshLib
std::vector< double > getMaxiumElementEdgeLengths(std::vector< Element * > const &elements)
Returns the maximum lengths of the edges for each element.
std::pair< double, double > computeSqrEdgeLengthRange(Element const &element)
Compute the minimum and maximum squared edge length for this element.
Definition Element.cpp:163