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 {
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(
30  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr,
31  int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp );
32 
33 protected:
39  bool CheckTruth( const int* truth );
40  bool UniquifyName(
42  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arrays );
43 
44  int GlomType;
45  std::vector<int> SeqTruth;
47  std::vector<std::string> OriginalNames;
48 };
49 
52 {
53 public:
55  bool StartInternal( std::string name, const int*, int ) override;
56  bool Add( std::string, const int* ) override;
57 };
58 
61 {
62 public:
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 protected:
70 };
71 
79 {
80 public:
81  vtkExodusIIReaderTensorCheck( const char* seq, int n, int rank, int dim );
82  bool StartInternal( std::string name, const int*, int ) override;
83  bool Add( std::string name, const int* truth ) override;
84  std::vector<std::string>::size_type Length() override;
85 protected:
87  vtkTypeUInt64 NumEndings;
88  int Dimension;
89  int Rank;
91 };
92 
95 {
96 public:
98  bool StartInternal( std::string name, const int*, int ) override;
99  bool Add( std::string name, const int* ) override;
100  std::vector<std::string>::size_type Length() override;
101  /*
102  virtual int Accept(
103  std::vector<vtkExodusIIReaderPrivate::ArrayInfoType>& arr, int startIndex, vtkExodusIIReaderPrivate* priv, int objtyp )
104  {
105  }
106  */
107 protected:
108  bool StartIntegrationPoints( std::string cellType, std::string iptName );
109  bool AddIntegrationPoint( std::string iptName );
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
vtkExodusIIReaderIntPointCheck::vtkExodusIIReaderIntPointCheck
vtkExodusIIReaderIntPointCheck()
vtkExodusIIReaderTensorCheck::StillAdding
bool StillAdding
Definition: vtkExodusIIReaderVariableCheck.h:90
vtkExodusIIReaderTensorCheck::Rank
int Rank
Definition: vtkExodusIIReaderVariableCheck.h:89
vtkExodusIIReaderTensorCheck::Add
bool Add(std::string name, const int *truth) override
Add a name to the sequence. Returns true if any more names may be added.
vtkExodusIIReaderTensorCheck
This looks for symmetric tensors of a given rank and dimension.
Definition: vtkExodusIIReaderVariableCheck.h:78
vtkExodusIIReaderIntPointCheck::IntPtNames
std::set< std::string > IntPtNames
Definition: vtkExodusIIReaderVariableCheck.h:116
vtkExodusIIReaderVariableCheck::Accept
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().
vtkExodusIIReaderIntPointCheck::Length
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderVariableCheck::Length
virtual std::vector< std::string >::size_type Length()
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderIntPointCheck::StartIntegrationPoints
bool StartIntegrationPoints(std::string cellType, std::string iptName)
vtkExodusIIReaderTensorCheck::StartInternal
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderTensorCheck::Dimension
int Dimension
Definition: vtkExodusIIReaderVariableCheck.h:88
vtkExodusIIReaderIntPointCheck::IntPtMax
std::vector< int > IntPtMax
Definition: vtkExodusIIReaderVariableCheck.h:115
vtkExodusIIReaderVectorCheck::StillAdding
bool StillAdding
Definition: vtkExodusIIReaderVariableCheck.h:69
vtkExodusIIReaderIntPointCheck::StillAdding
bool StillAdding
Definition: vtkExodusIIReaderVariableCheck.h:118
vtkExodusIIReaderVariableCheck::SeqTruth
std::vector< int > SeqTruth
Definition: vtkExodusIIReaderVariableCheck.h:45
vtkExodusIIReaderVariableCheck::CheckTruth
bool CheckTruth(const int *truth)
Utility that subclasses may call from within Add() to verify that the new variable is defined on the ...
vtkExodusIIReaderScalarCheck::StartInternal
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderVariableCheck::GlomType
int GlomType
Definition: vtkExodusIIReaderVariableCheck.h:44
vtkExodusIIReaderScalarCheck::Add
bool Add(std::string, const int *) override
Add a name to the sequence. Returns true if any more names may be added.
vtkExodusIIReaderVariableCheck::Add
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.
vtkExodusIIReaderTensorCheck::NumEndings
vtkTypeUInt64 NumEndings
Definition: vtkExodusIIReaderVariableCheck.h:87
vtkExodusIIReaderTensorCheck::Endings
std::string Endings
Definition: vtkExodusIIReaderVariableCheck.h:86
vtkExodusIIReaderVectorCheck::Endings
std::string Endings
Definition: vtkExodusIIReaderVariableCheck.h:68
vtkExodusIIReaderVariableCheck::Start
virtual bool Start(std::string name, const int *truth, int numTruth)
Initialize a sequence of names. Returns true if any more names are acceptable.
vtkExodusIIReaderScalarCheck::vtkExodusIIReaderScalarCheck
vtkExodusIIReaderScalarCheck()
vtkExodusIIReaderVectorCheck::Add
bool Add(std::string name, const int *truth) override
Add a name to the sequence. Returns true if any more names may be added.
vtkExodusIIReaderTensorCheck::Length
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderIntPointCheck
This looks for integration-point variables whose names contain an element shape and digits specifying...
Definition: vtkExodusIIReaderVariableCheck.h:94
vtkExodusIIReaderPrivate.h
vtkExodusIIReaderVariableCheck::~vtkExodusIIReaderVariableCheck
virtual ~vtkExodusIIReaderVariableCheck()
vtkExodusIIReaderVariableCheck::OriginalNames
std::vector< std::string > OriginalNames
Definition: vtkExodusIIReaderVariableCheck.h:47
vtkExodusIIReaderIntPointCheck::Rank
vtkTypeUInt64 Rank
Definition: vtkExodusIIReaderVariableCheck.h:117
vtkExodusIIReaderPrivate
This class holds metadata for an Exodus file.
Definition: vtkExodusIIReaderPrivate.h:23
vtkExodusIIReaderIntPointCheck::IntPtMin
std::vector< int > IntPtMin
Definition: vtkExodusIIReaderVariableCheck.h:114
vtkExodusIIReaderVariableCheck::UniquifyName
bool UniquifyName(vtkExodusIIReaderPrivate::ArrayInfoType &ainfo, std::vector< vtkExodusIIReaderPrivate::ArrayInfoType > &arrays)
vtkX3D::name
Definition: vtkX3D.h:219
vtkExodusIIReaderVectorCheck::StartInternal
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderVectorCheck
This looks for n-D vectors whose names are identical except for a single final character.
Definition: vtkExodusIIReaderVariableCheck.h:60
vtkExodusIIReaderIntPointCheck::StartInternal
bool StartInternal(std::string name, const int *, int) override
Subclasses implement this and returns true if any more names are acceptable.
vtkX3D::string
Definition: vtkX3D.h:490
vtkExodusIIReaderPrivate::ArrayInfoType
A struct to hold information about time-varying arrays.
Definition: vtkExodusIIReaderPrivate.h:272
vtkExodusIIReaderVariableCheck
Abstract base class for glomming arrays of variable names.
Definition: vtkExodusIIReaderVariableCheck.h:17
vtkExodusIIReaderScalarCheck
This always accepts a single array name as a scalar. It is the fallback for all other checkers.
Definition: vtkExodusIIReaderVariableCheck.h:51
vtkExodusIIReaderIntPointCheck::CellType
std::string CellType
Definition: vtkExodusIIReaderVariableCheck.h:113
vtkExodusIIReaderTensorCheck::vtkExodusIIReaderTensorCheck
vtkExodusIIReaderTensorCheck(const char *seq, int n, int rank, int dim)
vtkExodusIIReaderIntPointCheck::RegExp
vtksys::RegularExpression RegExp
Definition: vtkExodusIIReaderVariableCheck.h:111
vtkExodusIIReaderVariableCheck::vtkExodusIIReaderVariableCheck
vtkExodusIIReaderVariableCheck()
vtkExodusIIReaderIntPointCheck::Add
bool Add(std::string name, const int *) override
Add a name to the sequence. Returns true if any more names may be added.
vtkExodusIIReaderVariableCheck::Prefix
std::string Prefix
Definition: vtkExodusIIReaderVariableCheck.h:46
vtkExodusIIReaderIntPointCheck::AddIntegrationPoint
bool AddIntegrationPoint(std::string iptName)
vtkExodusIIReaderIntPointCheck::VarName
std::string VarName
Definition: vtkExodusIIReaderVariableCheck.h:112
vtkExodusIIReaderVariableCheck::StartInternal
virtual bool StartInternal(std::string name, const int *truth, int numTruth)=0
Subclasses implement this and returns true if any more names are acceptable.
vtkExodusIIReaderVectorCheck::Length
std::vector< std::string >::size_type Length() override
Returns the length of the sequence (or 0 if the match is incorrect or incomplete).
vtkExodusIIReaderVectorCheck::vtkExodusIIReaderVectorCheck
vtkExodusIIReaderVectorCheck(const char *seq, int n)