OGS
MeshNodalCoordinatesBackend.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
6#include <algorithm>
7
8#include "MeshLib/Node.h"
9
10namespace MeshLib
11{
13 std::vector<Node*> const& nodes)
14 : nodes_(nodes)
15{
16}
17
18double MeshNodalCoordinatesBackend::map(vtkIdType idx) const
19{
20 return nodes_[idx / 3]->operator[](idx % 3);
21}
22
24 double* tuple) const
25{
26 std::copy_n(nodes_[tupleId]->data(), 3, tuple);
27}
28} // namespace MeshLib
MeshNodalCoordinatesBackend(std::vector< Node * > const &nodes)
void mapTuple(vtkIdType tupleId, double *tuple) const