VTK
vtkCPExodusIINodalCoordinatesTemplate.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCPExodusIINodalCoordinatesTemplate.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef vtkCPExodusIINodalCoordinatesTemplate_h
28 #define vtkCPExodusIINodalCoordinatesTemplate_h
29 
30 #include "vtkMappedDataArray.h"
31 #include "vtkIOExodusModule.h" // For export macro
32 
33 #include "vtkObjectFactory.h" // for vtkStandardNewMacro
34 
35 template <class Scalar>
37 {
38 public:
44  void PrintSelf(ostream &os, vtkIndent indent) override;
45 
46  typedef typename Superclass::ValueType ValueType;
47 
52  void SetExodusScalarArrays(Scalar *x, Scalar *y, Scalar *z,
53  vtkIdType numPoints);
54 
55  // Reimplemented virtuals -- see superclasses for descriptions:
56  void Initialize() override;
57  void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) override;
58  void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override;
59  void Squeeze() override;
62  void LookupValue(vtkVariant value, vtkIdList *ids) override;
63  vtkVariant GetVariantValue(vtkIdType idx) override;
64  void ClearLookup() override;
65  double* GetTuple(vtkIdType i) override;
66  void GetTuple(vtkIdType i, double *tuple) override;
67  vtkIdType LookupTypedValue(Scalar value) override;
68  void LookupTypedValue(Scalar value, vtkIdList *ids) override;
69  ValueType GetValue(vtkIdType idx) const override;
70  ValueType& GetValueReference(vtkIdType idx) override;
71  void GetTypedTuple(vtkIdType idx, Scalar *t) const override;
72 
74 
78  vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override;
79  vtkTypeBool Resize(vtkIdType numTuples) override;
80  void SetNumberOfTuples(vtkIdType number) override;
81  void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override;
82  void SetTuple(vtkIdType i, const float *source) override;
83  void SetTuple(vtkIdType i, const double *source) override;
85  void InsertTuple(vtkIdType i, const float *source) override;
86  void InsertTuple(vtkIdType i, const double *source) override;
87  void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,
88  vtkAbstractArray *source) override;
89  void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart,
90  vtkAbstractArray* source) override;
92  vtkIdType InsertNextTuple(const float *source) override;
93  vtkIdType InsertNextTuple(const double *source) override;
94  void DeepCopy(vtkAbstractArray *aa) override;
95  void DeepCopy(vtkDataArray *da) override;
96  void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
97  vtkAbstractArray* source, double* weights) override;
99  vtkIdType id2, vtkAbstractArray *source2, double t) override;
100  void SetVariantValue(vtkIdType idx, vtkVariant value) override;
101  void InsertVariantValue(vtkIdType idx, vtkVariant value) override;
102  void RemoveTuple(vtkIdType id) override;
103  void RemoveFirstTuple() override;
104  void RemoveLastTuple() override;
105  void SetTypedTuple(vtkIdType i, const Scalar *t) override;
106  void InsertTypedTuple(vtkIdType i, const Scalar *t) override;
107  vtkIdType InsertNextTypedTuple(const Scalar *t) override;
108  void SetValue(vtkIdType idx, Scalar value) override;
109  vtkIdType InsertNextValue(Scalar v) override;
110  void InsertValue(vtkIdType idx, Scalar v) override;
112 
113 protected:
116 
117  Scalar *XArray;
118  Scalar *YArray;
119  Scalar *ZArray;
120 
121 private:
123  const vtkCPExodusIINodalCoordinatesTemplate &) = delete;
124  void operator=(
125  const vtkCPExodusIINodalCoordinatesTemplate &) = delete;
126 
127  vtkIdType Lookup(const Scalar &val, vtkIdType startIndex);
128  double *TempDoubleArray;
129 };
130 
131 #include "vtkCPExodusIINodalCoordinatesTemplate.txx"
132 
133 #endif //vtkCPExodusIINodalCoordinatesTemplate_h
134 
135 // VTK-HeaderTest-Exclude: vtkCPExodusIINodalCoordinatesTemplate.h
void SetExodusScalarArrays(Scalar *x, Scalar *y, Scalar *z, vtkIdType numPoints)
Set the raw scalar arrays for the coordinate set.
void GetTypedTuple(vtkIdType idx, Scalar *t) const override
Copy the tuple value into a user-provided array.
double * GetTuple(vtkIdType i) override
Get the data tuple at tupleIdx.
Map non-contiguous data structures into the vtkDataArray API.
Abstract superclass for all arrays.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkArrayIterator * NewIterator() override
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void InsertValue(vtkIdType idx, Scalar v) override
This container is read only – this method does nothing but print a warning.
vtkVariant GetVariantValue(vtkIdType idx) override
Retrieve value from the array as a variant.
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) override
Given a list of tuple ids, return an array of tuples.
int vtkIdType
Definition: vtkType.h:347
void SetVariantValue(vtkIdType idx, vtkVariant value) override
This container is read only – this method does nothing but print a warning.
#define vtkMappedDataArrayNewInstanceMacro(thisClass)
void Squeeze() override
Free any unnecessary memory.
vtkAbstractTemplateTypeMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >, vtkMappedDataArray< Scalar >) vtkMappedDataArrayNewInstanceMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >) static vtkCPExodusIINodalCoordinatesTemplate *New()
A atomic type representing the union of many types.
Definition: vtkVariant.h:71
int vtkTypeBool
Definition: vtkABI.h:69
Map native Exodus II coordinate arrays into the vtkDataArray interface.
void SetNumberOfTuples(vtkIdType number) override
This container is read only – this method does nothing but print a warning.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetValue(vtkIdType idx, Scalar value) override
This container is read only – this method does nothing but print a warning.
list of point or cell ids
Definition: vtkIdList.h:36
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) override
This container is read only – this method does nothing but print a warning.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void RemoveLastTuple() override
This container is read only – this method does nothing but print a warning.
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override
This container is read only – this method does nothing but print a warning.
void DeepCopy(vtkAbstractArray *aa) override
This container is read only – this method does nothing but print a warning.
ValueType & GetValueReference(vtkIdType idx) override
Get a reference to the scalar value at a particular index.
Abstract superclass to iterate over elements in an vtkAbstractArray.
void ClearLookup() override
Delete the associated fast lookup data structure on this array, if it exists.
#define VTK_NEWINSTANCE
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
This container is read only – this method does nothing but print a warning.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override
This container is read only – this method does nothing but print a warning.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override
This container is read only – this method does nothing but print a warning.
vtkIdType LookupValue(vtkVariant value) override
Return the value indices where a specific value appears.
void Initialize() override
Release storage and reset array to initial state.
vtkIdType InsertNextValue(Scalar v) override
This container is read only – this method does nothing but print a warning.
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
This container is read only – this method does nothing but print a warning.
ValueType GetValue(vtkIdType idx) const override
Get the data at a particular index.
vtkIdType InsertNextTypedTuple(const Scalar *t) override
This container is read only – this method does nothing but print a warning.
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
This container is read only – this method does nothing but print a warning.
void RemoveTuple(vtkIdType id) override
This container is read only – this method does nothing but print a warning.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void InsertTypedTuple(vtkIdType i, const Scalar *t) override
This container is read only – this method does nothing but print a warning.
void SetTypedTuple(vtkIdType i, const Scalar *t) override
This container is read only – this method does nothing but print a warning.
vtkIdType LookupTypedValue(Scalar value) override
void RemoveFirstTuple() override
This container is read only – this method does nothing but print a warning.
vtkTypeBool Resize(vtkIdType numTuples) override
This container is read only – this method does nothing but print a warning.