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:
41  CollocatedNodes( string const & faceBlockName,
42  vtkSmartPointer< vtkDataSet > faceMesh,
43  bool performGlobalCheck = true );
44 
51  {
52  return m_collocatedNodes[i];
53  }
54 
60  [[nodiscard]] std::size_t size() const
61  {
62  return m_collocatedNodes.size();
63  }
64 
65 private:
66 
72  void init( vtkIdTypeArray const * collocatedNodes );
73 
75  stdVector< stdVector< vtkIdType > > m_collocatedNodes;
76 };
77 
78 } // geos::vtk
79 
80 #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, bool performGlobalCheck=true)
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
internal::StdVectorWrapper< T, Allocator, USE_STD_CONTAINER_BOUNDS_CHECKING > stdVector