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