GEOS
CollocatedNodes.hpp
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
16 #ifndef GEOS_COLLOCATEDNODES_HPP
17 #define GEOS_COLLOCATEDNODES_HPP
18 
19 #include "common/DataTypes.hpp"
20 
21 #include <vtkDataSet.h>
22 #include <vtkIdTypeArray.h>
23 #include <vtkSmartPointer.h>
24 
25 namespace geos::vtk
26 {
27 
32 {
33 public:
39  CollocatedNodes( string const & faceBlockName,
40  vtkSmartPointer< vtkDataSet > faceMesh );
41 
48  {
49  return m_collocatedNodes[i];
50  }
51 
57  [[nodiscard]] std::size_t size() const
58  {
59  return m_collocatedNodes.size();
60  }
61 
62 private:
63 
69  void init( vtkIdTypeArray const * collocatedNodes );
70 
72  stdVector< stdVector< vtkIdType > > m_collocatedNodes;
73 };
74 
75 } // geos::vtk
76 
77 #endif //GEOS_COLLOCATEDNODES_HPP
Convenience wrapper around the raw vtk information.
stdVector< vtkIdType > const & operator[](std::size_t i) const
For node i of the face block, returns all the duplicated global node indices in the main 3d mesh.
CollocatedNodes(string const &faceBlockName, vtkSmartPointer< vtkDataSet > faceMesh)
Build a convenience wrapper around the raw vtk collocated nodes information.
std::size_t size() const
Number of duplicated nodes buckets. Multiple nodes that are considered to be duplicated one of each o...
std::size_t size_t
Unsigned size type.
Definition: DataTypes.hpp:78
std::vector< T, Allocator > stdVector