VTK
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 <vtksys/RegularExpression.hxx> // for integration point names
7#include <string> // STL Header for Start/StartInternal/Add
8#include <vector> // STL Header for glommed array names
9#include <set> // STL Header for integration point names
10
18{
19public:
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(
30 std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr,
31 int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp );
32
33protected:
39 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 virtual bool StartInternal( std::string name, const int*, int );
56 virtual bool Add( std::string, const int* );
57};
58
61{
62public:
63 vtkExodusIIReaderVectorCheck( const char* seq, int n );
64 virtual bool StartInternal( std::string name, const int*, int );
65 virtual bool Add( std::string name, const int* truth );
66 virtual std::vector<std::string>::size_type Length();
67protected:
70};
71
79{
80public:
81 vtkExodusIIReaderTensorCheck( const char* seq, int n, int rank, int dim );
82 virtual bool StartInternal( std::string name, const int*, int );
83 virtual bool Add( std::string name, const int* truth );
84 virtual std::vector<std::string>::size_type Length();
85protected:
87 vtkTypeUInt64 NumEndings;
89 int Rank;
91};
92
95{
96public:
98 virtual bool StartInternal( std::string name, const int*, int );
99 virtual bool Add( std::string name, const int* );
100 virtual std::vector<std::string>::size_type Length();
101 /*
102 virtual int Accept(
103 std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp )
104 {
105 }
106 */
107protected:
110
111 vtksys::RegularExpression RegExp;
114 std::vector<int> IntPtMin;
115 std::vector<int> IntPtMax;
116 std::set<std::string> IntPtNames;
117 vtkTypeUInt64 Rank;
119};
120
121#endif // vtkExodusIIReaderVariableCheck_h
122// VTK-HeaderTest-Exclude: vtkExodusIIReaderVariableCheck.h
This looks for integration-point variables whose names contain an element shape and digits specifying...
virtual bool StartInternal(std::string name, const int *, int)
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).
virtual bool Add(std::string name, const int *)
Add a name to the sequence. Returns true if any more names may be added.
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.
virtual bool StartInternal(std::string name, const int *, int)
Subclasses implement this and returns true if any more names are acceptable.
virtual bool Add(std::string, const int *)
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.
virtual bool Add(std::string name, const int *truth)
Add a name to the sequence. Returns true if any more names may be added.
virtual std::vector< std::string >::size_type Length()
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)
virtual bool StartInternal(std::string name, const int *, int)
Subclasses implement this and returns true if any more names are acceptable.
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.
virtual std::vector< std::string >::size_type Length()
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
virtual bool Add(std::string name, const int *truth)
Add a name to the sequence. Returns true if any more names may be added.
virtual bool StartInternal(std::string name, const int *, int)
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderVectorCheck(const char *seq, int n)
CellTypeInDataSet cellType(vtkDataSet *input)
@ name
Definition: vtkX3D.h:219
@ string
Definition: vtkX3D.h:490
A struct to hold information about time-varying arrays.