Revision b3324a3d59c75129437b5e2ab80655887d882124 authored by Christoph Lehmann on 02 November 2023, 10:23:56 UTC, committed by Christoph Lehmann on 02 November 2023, 10:23:56 UTC
Draft: Remove coupled solutions

Closes #3432

See merge request ogs/ogs!4784
2 parent s 29e4abf + 0a9611d
Raw File
ReferenceElementUtils.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

#include <span>

#include "MeshLib/Elements/Element.h"
#include "NumLib/Fem/CoordinatesMapping/NaturalNodeCoordinates.h"

namespace ReferenceElementUtils
{

// Returns the coordinates as a span of known extent.
template <typename MeshElementType>
auto getNodeCoordsOfReferenceElement()
{
    return std::span{NumLib::NaturalCoordinates<MeshElementType>::coordinates};
}

// Returns the coordinates as a span of dynamic size.
std::span<const std::array<double, 3>> getNodeCoordsOfReferenceElement(
    MeshLib::CellType const cell_type);

std::shared_ptr<MeshLib::Element const> getReferenceElement(
    MeshLib::CellType const cell_type);

std::vector<std::array<double, 3>> getCoordsInReferenceElementForTest(
    MeshLib::Element const& element);

}  // namespace ReferenceElementUtils
back to top