VTK  9.1.0
vtkExodusIIReaderVariableCheck.h
Go to the documentation of this file.
1#ifndef vtkExodusIIReaderVariableCheck_h
2#define vtkExodusIIReaderVariableCheck_h
3#ifndef __VTK_WRAP__
4#ifndef VTK_WRAPPING_CXX
5
6#include "vtkExodusIIReaderPrivate.h" // for ArrayInfoType
7
8#include <set> // STL Header for integration point names
9#include <string> // STL Header for Start/StartInternal/Add
10#include <vector> // STL Header for glommed array names
11#include <vtksys/RegularExpression.hxx> // for integration point names
12
20{
21public:
23 virtual bool Start(std::string name, const int* truth, int numTruth);
25 virtual bool StartInternal(std::string name, const int* truth, int numTruth) = 0;
27 virtual bool Add(std::string name, const int* truth) = 0;
29 virtual std::vector<std::string>::size_type Length();
31 virtual int Accept(std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex,
32 vtkExodusIIReaderPrivate* priv, int objtyp);
33
34protected:
40 bool CheckTruth(const int* truth);
42 std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arrays);
43
45 std::vector<int> SeqTruth;
47 std::vector<std::string> OriginalNames;
48};
49
52{
53public:
55 bool StartInternal(std::string name, const int*, int) override;
56 bool Add(std::string, const int*) override;
57};
58
61{
62public:
63 vtkExodusIIReaderVectorCheck(const char* seq, int n);
64 bool StartInternal(std::string name, const int*, int) override;
65 bool Add(std::string name, const int* truth) override;
66 std::vector<std::string>::size_type Length() override;
67
68protected:
71};
72
80{
81public:
82 vtkExodusIIReaderTensorCheck(const char* seq, int n, int rank, int dim);
83 bool StartInternal(std::string name, const int*, int) override;
84 bool Add(std::string name, const int* truth) override;
85 std::vector<std::string>::size_type Length() override;
86
87protected:
89 vtkTypeUInt64 NumEndings;
91 int Rank;
93};
94
98{
99public:
101 bool StartInternal(std::string name, const int*, int) override;
102 bool Add(std::string name, const int*) override;
103 std::vector<std::string>::size_type Length() override;
104 /*
105 virtual int Accept(
106 std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex,
107 vtkExodusIIReaderPrivate* priv, int objtyp )
108 {
109 }
110 */
111protected:
114
115 vtksys::RegularExpression RegExp;
118 std::vector<int> IntPtMin;
119 std::vector<int> IntPtMax;
120 std::set<std::string> IntPtNames;
121 vtkTypeUInt64 Rank;
123};
124
125#endif
126#endif
127#endif // vtkExodusIIReaderVariableCheck_h
128// VTK-HeaderTest-Exclude: vtkExodusIIReaderVariableCheck.h
This looks for integration-point variables whose names contain an element shape and digits specifying...
bool Add(std::string name, const int *) override
Add a name to the sequence. Returns true if any more names may be added.
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
bool AddIntegrationPoint(std::string iptName)
bool StartIntegrationPoints(std::string cellType, std::string iptName)
This class holds metadata for an Exodus file.
This always accepts a single array name as a scalar. It is the fallback for all other checkers.
bool Add(std::string, const int *) override
Add a name to the sequence. Returns true if any more names may be added.
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
This looks for symmetric tensors of a given rank and dimension.
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderTensorCheck(const char *seq, int n, int rank, int dim)
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
bool Add(std::string name, const int *truth) override
Add a name to the sequence. Returns true if any more names may be added.
Abstract base class for glomming arrays of variable names.
bool CheckTruth(const int *truth)
Utility that subclasses may call from within Add() to verify that the new variable is defined on the ...
bool UniquifyName(vtkExodusIIReaderPrivate::ArrayInfoType &ainfo, std::vector< vtkExodusIIReaderPrivate::ArrayInfoType > &arrays)
virtual int Accept(std::vector< vtkExodusIIReaderPrivate::ArrayInfoType > &arr, int startIndex, vtkExodusIIReaderPrivate *priv, int objtyp)
Accept this sequence. (Add an entry to the end of arr.) Must return Length().
virtual bool Add(std::string name, const int *truth)=0
Add a name to the sequence. Returns true if any more names may be added.
virtual bool StartInternal(std::string name, const int *truth, int numTruth)=0
Subclasses implement this and returns true if any more names are acceptable.
virtual bool Start(std::string name, const int *truth, int numTruth)
Initialize a sequence of names. Returns true if any more names are acceptable.
virtual std::vector< std::string >::size_type Length()
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
This looks for n-D vectors whose names are identical except for a single final character.
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
bool Add(std::string name, const int *truth) override
Add a name to the sequence. Returns true if any more names may be added.
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderVectorCheck(const char *seq, int n)
@ name
Definition: vtkX3D.h:225
@ string
Definition: vtkX3D.h:496
A struct to hold information about time-varying arrays.