VTK  9.3.20240419
vtkCPExodusIINodalCoordinatesTemplate.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
15 #ifndef vtkCPExodusIINodalCoordinatesTemplate_h
16 #define vtkCPExodusIINodalCoordinatesTemplate_h
17 
18 #include "vtkIOExodusModule.h" // For export macro
19 #include "vtkMappedDataArray.h"
20 
21 #include "vtkObjectFactory.h" // for vtkStandardNewMacro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 template <class Scalar>
26 {
27 public:
31  Scalar>) static vtkCPExodusIINodalCoordinatesTemplate* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  typedef typename Superclass::ValueType ValueType;
35 
40  void SetExodusScalarArrays(Scalar* x, Scalar* y, Scalar* z, vtkIdType numPoints);
41 
42  // Reimplemented virtuals -- see superclasses for descriptions:
43  void Initialize() override;
44  void GetTuples(vtkIdList* ptIds, vtkAbstractArray* output) override;
45  void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* output) override;
46  void Squeeze() override;
49  void LookupValue(vtkVariant value, vtkIdList* ids) override;
51  void ClearLookup() override;
52  double* GetTuple(vtkIdType i) override;
53  void GetTuple(vtkIdType i, double* tuple) override;
54  vtkIdType LookupTypedValue(Scalar value) override;
55  void LookupTypedValue(Scalar value, vtkIdList* ids) override;
56  ValueType GetValue(vtkIdType idx) const override;
58  void GetTypedTuple(vtkIdType idx, Scalar* t) const override;
59 
61 
66  vtkTypeBool Resize(vtkIdType numTuples) override;
67  void SetNumberOfTuples(vtkIdType number) override;
69  void SetTuple(vtkIdType i, const float* source) override;
70  void SetTuple(vtkIdType i, const double* source) override;
72  void InsertTuple(vtkIdType i, const float* source) override;
73  void InsertTuple(vtkIdType i, const double* source) override;
74  void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override;
76  vtkIdType dstStart, vtkIdList* srcIds, vtkAbstractArray* source) override;
78  vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
80  vtkIdType InsertNextTuple(const float* source) override;
81  vtkIdType InsertNextTuple(const double* source) override;
82  void DeepCopy(vtkAbstractArray* aa) override;
83  void DeepCopy(vtkDataArray* da) override;
85  vtkIdType i, vtkIdList* ptIndices, vtkAbstractArray* source, double* weights) override;
87  vtkAbstractArray* source2, double t) override;
90  void RemoveTuple(vtkIdType id) override;
91  void RemoveFirstTuple() override;
92  void RemoveLastTuple() override;
93  void SetTypedTuple(vtkIdType i, const Scalar* t) override;
94  void InsertTypedTuple(vtkIdType i, const Scalar* t) override;
95  vtkIdType InsertNextTypedTuple(const Scalar* t) override;
96  void SetValue(vtkIdType idx, Scalar value) override;
97  vtkIdType InsertNextValue(Scalar v) override;
98  void InsertValue(vtkIdType idx, Scalar v) override;
100 
101 protected:
104 
105  Scalar* XArray;
106  Scalar* YArray;
107  Scalar* ZArray;
108 
109 private:
111  void operator=(const vtkCPExodusIINodalCoordinatesTemplate&) = delete;
112 
113  vtkIdType Lookup(const Scalar& val, vtkIdType startIndex);
114  double* TempDoubleArray;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #include "vtkCPExodusIINodalCoordinatesTemplate.txx"
119 
120 #endif // vtkCPExodusIINodalCoordinatesTemplate_h
121 
122 // VTK-HeaderTest-Exclude: vtkCPExodusIINodalCoordinatesTemplate.h
Abstract superclass for all arrays.
Abstract superclass to iterate over elements in an vtkAbstractArray.
Map native Exodus II coordinate arrays into the vtkDataArray interface.
vtkArrayIterator * NewIterator() override
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source) override
This container is read only – this method does nothing but print a warning.
vtkIdType InsertNextTypedTuple(const Scalar *t) override
This container is read only – this method does nothing but print a warning.
void SetValue(vtkIdType idx, Scalar value) override
This container is read only – this method does nothing but print a warning.
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source) 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 DeepCopy(vtkAbstractArray *aa) 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.
void InsertTuplesStartingAt(vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) 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.
vtkAbstractTemplateTypeMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >, vtkMappedDataArray< Scalar >) vtkMappedDataArrayNewInstanceMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >) static vtkCPExodusIINodalCoordinatesTemplate *New()
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, 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.
void RemoveLastTuple() 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.
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) 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 Squeeze() override
Free any unnecessary memory.
void SetExodusScalarArrays(Scalar *x, Scalar *y, Scalar *z, vtkIdType numPoints)
Set the raw scalar arrays for the coordinate set.
void RemoveFirstTuple() override
This container is read only – this method does nothing but print a warning.
void InsertVariantValue(vtkIdType idx, vtkVariant value) override
This container is read only – this method does nothing but print a warning.
void ClearLookup() override
Delete the associated fast lookup data structure on this array, if it exists.
double * GetTuple(vtkIdType i) override
Get the data tuple at tupleIdx.
vtkIdType LookupTypedValue(Scalar value) override
void GetTypedTuple(vtkIdType idx, Scalar *t) const override
void InsertValue(vtkIdType idx, Scalar v) override
This container is read only – this method does nothing but print a warning.
void SetNumberOfTuples(vtkIdType number) override
This container is read only – this method does nothing but print a warning.
vtkIdType InsertNextValue(Scalar v) override
This container is read only – this method does nothing but print a warning.
void InsertTypedTuple(vtkIdType i, const Scalar *t) override
This container is read only – this method does nothing but print a warning.
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext) override
This container is read only – this method does nothing but print a warning.
void SetVariantValue(vtkIdType idx, vtkVariant value) override
This container is read only – this method does nothing but print a warning.
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output) override
Given a list of tuple ids, return an array of tuples.
void Initialize() override
Release storage and reset array to initial state.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
ValueType & GetValueReference(vtkIdType idx) override
Get a reference to the scalar value at a particular index.
vtkIdType LookupValue(vtkVariant value) override
Return the value indices where a specific value appears.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:155
vtkGenericDataArrayLookupHelper< SelfType > Lookup
list of point or cell ids
Definition: vtkIdList.h:133
a simple class to control print indentation
Definition: vtkIndent.h:108
Map non-contiguous data structures into the vtkDataArray API.
Superclass::ValueType ValueType
abstract base class for most VTK objects
Definition: vtkObject.h:162
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
A type representing the union of many types.
Definition: vtkVariant.h:162
@ value
Definition: vtkX3D.h:220
int vtkTypeBool
Definition: vtkABI.h:64
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define vtkMappedDataArrayNewInstanceMacro(thisClass)
int vtkIdType
Definition: vtkType.h:315
#define VTK_NEWINSTANCE