VTK
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 <vtksys/RegularExpression.hxx> // for integration point names
9 #include <string> // STL Header for Start/StartInternal/Add
10 #include <vector> // STL Header for glommed array names
11 #include <set> // STL Header for integration point names
12 
20 {
21 public:
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(
32  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr,
33  int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp );
34 
35 protected:
41  bool CheckTruth( const int* truth );
42  bool UniquifyName(
44  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arrays );
45 
46  int GlomType;
47  std::vector<int> SeqTruth;
49  std::vector<std::string> OriginalNames;
50 };
51 
54 {
55 public:
57  bool StartInternal( std::string name, const int*, int ) override;
58  bool Add( std::string, const int* ) override;
59 };
60 
63 {
64 public:
65  vtkExodusIIReaderVectorCheck( const char* seq, int n );
66  bool StartInternal( std::string name, const int*, int ) override;
67  bool Add( std::string name, const int* truth ) override;
68  std::vector<std::string>::size_type Length() override;
69 protected:
72 };
73 
81 {
82 public:
83  vtkExodusIIReaderTensorCheck( const char* seq, int n, int rank, int dim );
84  bool StartInternal( std::string name, const int*, int ) override;
85  bool Add( std::string name, const int* truth ) override;
86  std::vector<std::string>::size_type Length() override;
87 protected:
89  vtkTypeUInt64 NumEndings;
90  int Dimension;
91  int Rank;
93 };
94 
97 {
98 public:
100  bool StartInternal( std::string name, const int*, int ) override;
101  bool Add( std::string name, const int* ) override;
102  std::vector<std::string>::size_type Length() override;
103  /*
104  virtual int Accept(
105  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex, 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
124 #endif
125 #endif // vtkExodusIIReaderVariableCheck_h
126 // VTK-HeaderTest-Exclude: vtkExodusIIReaderVariableCheck.h
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().
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.
bool CheckTruth(const int *truth)
Utility that subclasses may call from within Add() to verify that the new variable is defined on the ...
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.
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.
This looks for integration-point variables whose names contain an element shape and digits specifying...
virtual std::vector< std::string >::size_type Length()
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
bool UniquifyName(vtkExodusIIReaderPrivate::ArrayInfoType &ainfo, std::vector< vtkExodusIIReaderPrivate::ArrayInfoType > &arrays)
A struct to hold information about time-varying arrays.