VTK  9.2.6
vtkExodusIIReaderVariableCheck.h
Go to the documentation of this file.
1 #ifndef vtkExodusIIReaderVariableCheck_h
2 #define vtkExodusIIReaderVariableCheck_h
3 
4 #include "vtkExodusIIReaderPrivate.h" // for ArrayInfoType
5 
6 #include <set> // STL Header for integration point names
7 #include <string> // STL Header for Start/StartInternal/Add
8 #include <vector> // STL Header for glommed array names
9 #include <vtksys/RegularExpression.hxx> // for integration point names
10 
18 {
19 public:
21  virtual bool Start(std::string name, const int* truth, int numTruth);
23  virtual bool StartInternal(std::string name, const int* truth, int numTruth) = 0;
25  virtual bool Add(std::string name, const int* truth) = 0;
27  virtual std::vector<std::string>::size_type Length();
29  virtual int Accept(std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex,
30  vtkExodusIIReaderPrivate* priv, int objtyp);
31 
32 protected:
38  bool CheckTruth(const int* truth);
40  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arrays);
41 
42  int GlomType;
43  std::vector<int> SeqTruth;
45  std::vector<std::string> OriginalNames;
46 };
47 
50 {
51 public:
53  bool StartInternal(std::string name, const int*, int) override;
54  bool Add(std::string, const int*) override;
55 };
56 
59 {
60 public:
61  vtkExodusIIReaderVectorCheck(const char* seq, int n);
62  bool StartInternal(std::string name, const int*, int) override;
63  bool Add(std::string name, const int* truth) override;
64  std::vector<std::string>::size_type Length() override;
65 
66 protected:
69 };
70 
78 {
79 public:
80  vtkExodusIIReaderTensorCheck(const char* seq, int n, int rank, int dim);
81  bool StartInternal(std::string name, const int*, int) override;
82  bool Add(std::string name, const int* truth) override;
83  std::vector<std::string>::size_type Length() override;
84 
85 protected:
87  vtkTypeUInt64 NumEndings;
88  int Dimension;
89  int Rank;
91 };
92 
96 {
97 public:
99  bool StartInternal(std::string name, const int*, int) override;
100  bool Add(std::string name, const int*) override;
101  std::vector<std::string>::size_type Length() override;
102  /*
103  virtual int Accept(
104  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex,
105  vtkExodusIIReaderPrivate* priv, int objtyp )
106  {
107  }
108  */
109 protected:
110  bool StartIntegrationPoints(std::string cellType, std::string iptName);
111  bool AddIntegrationPoint(std::string iptName);
112 
113  vtksys::RegularExpression RegExp;
116  std::vector<int> IntPtMin;
117  std::vector<int> IntPtMax;
118  std::set<std::string> IntPtNames;
119  vtkTypeUInt64 Rank;
121 };
122 
123 #endif // vtkExodusIIReaderVariableCheck_h
124 // VTK-HeaderTest-Exclude: vtkExodusIIReaderVariableCheck.h
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).
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().
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, const int *) override
Add a name to the sequence. Returns true if any more names may be added.
This looks for symmetric tensors of a given rank and dimension.
This always accepts a single array name as a scalar. It is the fallback for all other checkers...
This class holds metadata for an Exodus file.
vtkExodusIIReaderTensorCheck(const char *seq, int n, int rank, int dim)
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderVectorCheck(const char *seq, int n)
bool CheckTruth(const int *truth)
Utility that subclasses may call from within Add() to verify that the new variable is defined on the ...
bool Add(std::string name, const int *) override
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.
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).
Abstract base class for glomming arrays of variable names.
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 Start(std::string name, const int *truth, int numTruth)
Initialize a sequence of names. 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.
This looks for integration-point variables whose names contain an element shape and digits specifying...
bool StartIntegrationPoints(std::string cellType, std::string iptName)
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
bool AddIntegrationPoint(std::string iptName)
virtual std::vector< std::string >::size_type Length()
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
bool UniquifyName(vtkExodusIIReaderPrivate::ArrayInfoType &ainfo, std::vector< vtkExodusIIReaderPrivate::ArrayInfoType > &arrays)
bool Add(std::string name, const int *truth) override
Add a name to the sequence. Returns true if any more names may be added.
A struct to hold information about time-varying arrays.