VTK  9.1.0
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 "vtkIOExodusModule.h" // For export macro
31#include "vtkMappedDataArray.h"
32
33#include "vtkObjectFactory.h" // for vtkStandardNewMacro
34
35template <class Scalar>
37{
38public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
45 typedef typename Superclass::ValueType ValueType;
46
51 void SetExodusScalarArrays(Scalar* x, Scalar* y, Scalar* z, vtkIdType numPoints);
52
53 // Reimplemented virtuals -- see superclasses for descriptions:
54 void Initialize() override;
55 void GetTuples(vtkIdList* ptIds, vtkAbstractArray* output) override;
56 void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray* output) override;
57 void Squeeze() override;
60 void LookupValue(vtkVariant value, vtkIdList* ids) override;
62 void ClearLookup() override;
63 double* GetTuple(vtkIdType i) override;
64 void GetTuple(vtkIdType i, double* tuple) override;
65 vtkIdType LookupTypedValue(Scalar value) override;
66 void LookupTypedValue(Scalar value, vtkIdList* ids) override;
67 ValueType GetValue(vtkIdType idx) const override;
69 void GetTypedTuple(vtkIdType idx, Scalar* t) const override;
70
72
77 vtkTypeBool Resize(vtkIdType numTuples) override;
78 void SetNumberOfTuples(vtkIdType number) override;
80 void SetTuple(vtkIdType i, const float* source) override;
81 void SetTuple(vtkIdType i, const double* source) override;
83 void InsertTuple(vtkIdType i, const float* source) override;
84 void InsertTuple(vtkIdType i, const double* source) override;
85 void InsertTuples(vtkIdList* dstIds, vtkIdList* srcIds, vtkAbstractArray* source) override;
87 vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray* source) override;
89 vtkIdType InsertNextTuple(const float* source) override;
90 vtkIdType InsertNextTuple(const double* source) override;
91 void DeepCopy(vtkAbstractArray* aa) override;
92 void DeepCopy(vtkDataArray* da) override;
94 vtkIdType i, vtkIdList* ptIndices, vtkAbstractArray* source, double* weights) override;
96 vtkAbstractArray* source2, double t) override;
97 void SetVariantValue(vtkIdType idx, vtkVariant value) override;
98 void InsertVariantValue(vtkIdType idx, vtkVariant value) override;
99 void RemoveTuple(vtkIdType id) override;
100 void RemoveFirstTuple() override;
101 void RemoveLastTuple() override;
102 void SetTypedTuple(vtkIdType i, const Scalar* t) override;
103 void InsertTypedTuple(vtkIdType i, const Scalar* t) override;
104 vtkIdType InsertNextTypedTuple(const Scalar* t) override;
105 void SetValue(vtkIdType idx, Scalar value) override;
106 vtkIdType InsertNextValue(Scalar v) override;
107 void InsertValue(vtkIdType idx, Scalar v) override;
109
110protected:
113
114 Scalar* XArray;
115 Scalar* YArray;
116 Scalar* ZArray;
117
118private:
120 void operator=(const vtkCPExodusIINodalCoordinatesTemplate&) = delete;
121
122 vtkIdType Lookup(const Scalar& val, vtkIdType startIndex);
123 double* TempDoubleArray;
124};
125
126#include "vtkCPExodusIINodalCoordinatesTemplate.txx"
127
128#endif // vtkCPExodusIINodalCoordinatesTemplate_h
129
130// 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.
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.
vtkArrayIterator * NewIterator() override
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
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.
double * GetTuple(vtkIdType i) override
Get the data tuple at tupleIdx.
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.
ValueType & GetValueReference(vtkIdType idx) override
Get a reference to the scalar value at a particular index.
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.
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.
vtkIdType LookupValue(vtkVariant value) override
Return the value indices where a specific value appears.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
vtkGenericDataArrayLookupHelper< SelfType > Lookup
list of point or cell ids
Definition: vtkIdList.h:140
a simple class to control print indentation
Definition: vtkIndent.h:113
Map non-contiguous data structures into the vtkDataArray API.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
A atomic type representing the union of many types.
Definition: vtkVariant.h:145
int vtkTypeBool
Definition: vtkABI.h:69
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define vtkMappedDataArrayNewInstanceMacro(thisClass)
int vtkIdType
Definition: vtkType.h:332
#define VTK_NEWINSTANCE