GEOS
VTKHierarchicalDataSource.hpp
Go to the documentation of this file.
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 Total, S.A
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 
20 #ifndef GEOS_MESH_GENERATORS_VTKHIERARCHICALDATASOURCE_HPP
21 #define GEOS_MESH_GENERATORS_VTKHIERARCHICALDATASOURCE_HPP
22 
23 #include "dataRepository/Group.hpp"
25 
26 #include <vtkSmartPointer.h>
27 #include <vtkDataSet.h>
28 #include <vtkDataAssembly.h>
29 #include <vtkPartitionedDataSet.h>
30 #include <vtkPartitionedDataSetCollection.h>
31 
32 namespace geos
33 {
34 
40 {
41 public:
42 
48  VTKHierarchicalDataSource( string const & name, Group * const parent );
49 
50  virtual ~VTKHierarchicalDataSource() override = default;
51 
56  static string catalogName() { return "VTKHierarchicalDataSource"; }
57 
62  void open() override;
63 
70  vtkSmartPointer< vtkPartitionedDataSet > search( string const & path );
71 
72 private:
73 
75  struct viewKeyStruct
76  {
77  constexpr static char const * filePathString() { return "file"; }
78  };
80 
82  Path m_filePath;
83 
85  vtkSmartPointer< vtkDataAssembly > m_dataAssembly;
86 
88  vtkSmartPointer< vtkPartitionedDataSetCollection > m_collection;
89 };
90 
91 }
92 
93 #endif
The ExternalDataSourceBase class provides an abstract base class implementation for different mesh ty...
This class provides an API to access VTKPartitionedDataSetCollection through a vtkDataAssembly.
void open() override
Opens a vtkPartitionedDataSetCollection and gets the colletion and the associated dataAssembly.
VTKHierarchicalDataSource(string const &name, Group *const parent)
Main constructor for VTKHierarchicalDataSource base class.
static string catalogName()
Return the name of the MeshGenerator in object catalog.
vtkSmartPointer< vtkPartitionedDataSet > search(string const &path)
Performs a search in the dataAssembly to find a node of PartitionedDataSets.
constexpr char const filePathString[]
constexpr variable to hold name for inserting the file path into the xml file.
Definition: xmlWrapper.hpp:276
Structure to hold scoped key names.
Definition: Group.hpp:1442