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  virtual void PrintSelf(ostream &os, vtkIndent indent);
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();
57  void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output);
58  void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output);
59  void Squeeze();
64  void ClearLookup();
65  double* GetTuple(vtkIdType i);
66  void GetTuple(vtkIdType i, double *tuple);
68  void LookupTypedValue(Scalar value, vtkIdList *ids);
69  ValueType GetValue(vtkIdType idx) const;
70  ValueType& GetValueReference(vtkIdType idx);
71  void GetTypedTuple(vtkIdType idx, Scalar *t) const;
72 
74 
78  int Allocate(vtkIdType sz, vtkIdType ext);
79  int Resize(vtkIdType numTuples);
80  void SetNumberOfTuples(vtkIdType number);
82  void SetTuple(vtkIdType i, const float *source);
83  void SetTuple(vtkIdType i, const double *source);
85  void InsertTuple(vtkIdType i, const float *source);
86  void InsertTuple(vtkIdType i, const double *source);
87  void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,
89  void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart,
92  vtkIdType InsertNextTuple(const float *source);
93  vtkIdType InsertNextTuple(const double *source);
94  void DeepCopy(vtkAbstractArray *aa);
95  void DeepCopy(vtkDataArray *da);
96  void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
97  vtkAbstractArray* source, double* weights);
99  vtkIdType id2, vtkAbstractArray *source2, double t);
102  void RemoveTuple(vtkIdType id);
103  void RemoveFirstTuple();
104  void RemoveLastTuple();
105  void SetTypedTuple(vtkIdType i, const Scalar *t);
106  void InsertTypedTuple(vtkIdType i, const Scalar *t);
107  vtkIdType InsertNextTypedTuple(const Scalar *t);
108  void SetValue(vtkIdType idx, Scalar value);
109  vtkIdType InsertNextValue(Scalar v);
110  void InsertValue(vtkIdType idx, Scalar v);
112 
113 protected:
116 
117  Scalar *XArray;
118  Scalar *YArray;
119  Scalar *ZArray;
120 
121 private:
123  const vtkCPExodusIINodalCoordinatesTemplate &) VTK_DELETE_FUNCTION;
124  void operator=(
125  const vtkCPExodusIINodalCoordinatesTemplate &) VTK_DELETE_FUNCTION;
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 Initialize()
Release storage and reset array to initial state.
vtkIdType InsertNextTypedTuple(const Scalar *t)
This container is read only – this method does nothing but print a warning.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)
This container is read only – this method does nothing but print a warning.
void GetTypedTuple(vtkIdType idx, Scalar *t) const
Copy the tuple value into a user-provided array.
Map non-contiguous data structures into the vtkDataArray API.
Abstract superclass for all arrays.
void RemoveTuple(vtkIdType id)
This container is read only – this method does nothing but print a warning.
void InsertValue(vtkIdType idx, Scalar v)
This container is read only – this method does nothing but print a warning.
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)
This container is read only – this method does nothing but print a warning.
VTK_NEWINSTANCE vtkArrayIterator * NewIterator()
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate...
void SetNumberOfTuples(vtkIdType number)
This container is read only – this method does nothing but print a warning.
void Squeeze()
Free any unnecessary memory.
int vtkIdType
Definition: vtkType.h:287
#define vtkMappedDataArrayNewInstanceMacro(thisClass)
void SetValue(vtkIdType idx, Scalar value)
This container is read only – this method does nothing but print a warning.
vtkAbstractTemplateTypeMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >, vtkMappedDataArray< Scalar >) vtkMappedDataArrayNewInstanceMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >) static vtkCPExodusIINodalCoordinatesTemplate *New()
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source)
This container is read only – this method does nothing but print a warning.
A atomic type representing the union of many types.
Definition: vtkVariant.h:75
Map native Exodus II coordinate arrays into the vtkDataArray interface.
void DeepCopy(vtkAbstractArray *aa)
This container is read only – this method does nothing but print a warning.
vtkIdType InsertNextValue(Scalar v)
This container is read only – this method does nothing but print a warning.
vtkVariant GetVariantValue(vtkIdType idx)
Retrieve value from the array as a variant.
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)
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 GetTuples(vtkIdList *ptIds, vtkAbstractArray *output)
Given a list of tuple ids, return an array of tuples.
list of point or cell ids
Definition: vtkIdList.h:36
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void RemoveFirstTuple()
This container is read only – this method does nothing but print a warning.
void ClearLookup()
Delete the associated fast lookup data structure on this array, if it exists.
vtkIdType LookupTypedValue(Scalar value)
Abstract superclass to iterate over elements in an vtkAbstractArray.
ValueType GetValue(vtkIdType idx) const
Get the data at a particular index.
#define VTK_NEWINSTANCE
void RemoveLastTuple()
This container is read only – this method does nothing but print a warning.
int Resize(vtkIdType numTuples)
This container is read only – this method does nothing but print a warning.
double * GetTuple(vtkIdType i)
Get the data tuple at tupleIdx.
void SetVariantValue(vtkIdType idx, vtkVariant value)
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 *)
vtkIdType LookupValue(vtkVariant value)
Return the value indices where a specific value appears.
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)
This container is read only – this method does nothing but print a warning.
void SetTypedTuple(vtkIdType i, const Scalar *t)
This container is read only – this method does nothing but print a warning.
void InsertTypedTuple(vtkIdType i, const Scalar *t)
This container is read only – this method does nothing but print a warning.
void InsertVariantValue(vtkIdType idx, vtkVariant value)
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...
int Allocate(vtkIdType sz, vtkIdType ext)
This container is read only – this method does nothing but print a warning.
ValueType & GetValueReference(vtkIdType idx)
Get a reference to the scalar value at a particular index.