Revision cf2d0d64d5653363ecc2cd0db6448770b9466313 authored by Thomas Fischer on 27 October 2021, 07:11:17 UTC, committed by Thomas Fischer on 02 November 2021, 12:34:39 UTC
1 parent 558db7c
TetRule10.cpp
/**
* \file
* \copyright
* Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
*/
#include "TetRule10.h"
#include <array>
#include "BaseLib/Logging.h"
#include "MeshLib/Node.h"
#include "Tri.h"
namespace MeshLib
{
const unsigned TetRule10::face_nodes[4][6] = {
{0, 2, 1, 6, 5, 4}, // Face 0
{0, 1, 3, 4, 8, 7}, // Face 1
{1, 2, 3, 5, 9, 8}, // Face 2
{2, 0, 3, 6, 7, 9} // Face 3
};
const unsigned TetRule10::edge_nodes[6][3] = {
{0, 1, 4}, // Edge 0
{1, 2, 5}, // Edge 1
{0, 2, 6}, // Edge 2
{0, 3, 7}, // Edge 3
{1, 3, 8}, // Edge 4
{2, 3, 9} // Edge 5
};
const Element* TetRule10::getFace(const Element* e, unsigned i)
{
if (i < n_faces)
{
std::array<Node*, 6> nodes{};
for (unsigned j = 0; j < 6; j++)
{
nodes[j] = const_cast<Node*>(e->getNode(face_nodes[i][j]));
}
return new Tri6(nodes, e->getID());
}
ERR("Error in MeshLib::Element::getFace() - Index {:d} does not exist.", i);
return nullptr;
}
} // end namespace MeshLib
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...