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 
26 #ifndef vtkCPExodusIINodalCoordinatesTemplate_h
27 #define vtkCPExodusIINodalCoordinatesTemplate_h
28 
29 #include "vtkMappedDataArray.h"
30 #include "vtkIOExodusModule.h" // For export macro
31 
32 #include "vtkTypeTemplate.h" // For templated vtkObject API
33 #include "vtkObjectFactory.h" // for vtkStandardNewMacro
34 
35 template <class Scalar>
37  public vtkTypeTemplate<vtkCPExodusIINodalCoordinatesTemplate<Scalar>,
38  vtkMappedDataArray<Scalar> >
39 {
40 public:
44  virtual void PrintSelf(ostream &os, vtkIndent indent);
45 
47 
49  void SetExodusScalarArrays(Scalar *x, Scalar *y, Scalar *z,
50  vtkIdType numPoints);
52 
53  // Reimplemented virtuals -- see superclasses for descriptions:
54  void Initialize();
55  void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output);
56  void GetTuples(vtkIdType p1, vtkIdType p2, vtkAbstractArray *output);
57  void Squeeze();
60  void LookupValue(vtkVariant value, vtkIdList *ids);
62  void ClearLookup();
63  double* GetTuple(vtkIdType i);
64  void GetTuple(vtkIdType i, double *tuple);
65  vtkIdType LookupTypedValue(Scalar value);
66  void LookupTypedValue(Scalar value, vtkIdList *ids);
67  Scalar GetValue(vtkIdType idx);
68  Scalar& GetValueReference(vtkIdType idx);
69  void GetTupleValue(vtkIdType idx, Scalar *t);
70 
72 
74  int Allocate(vtkIdType sz, vtkIdType ext);
75  int Resize(vtkIdType numTuples);
76  void SetNumberOfTuples(vtkIdType number);
78  void SetTuple(vtkIdType i, const float *source);
79  void SetTuple(vtkIdType i, const double *source);
80  void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source);
81  void InsertTuple(vtkIdType i, const float *source);
82  void InsertTuple(vtkIdType i, const double *source);
83  void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds,
84  vtkAbstractArray *source);
85  void InsertTuples(vtkIdType dstStart, vtkIdType n, vtkIdType srcStart,
86  vtkAbstractArray* source);
88  vtkIdType InsertNextTuple(const float *source);
89  vtkIdType InsertNextTuple(const double *source);
90  void DeepCopy(vtkAbstractArray *aa);
91  void DeepCopy(vtkDataArray *da);
92  void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
93  vtkAbstractArray* source, double* weights);
95  vtkIdType id2, vtkAbstractArray *source2, double t);
96  void SetVariantValue(vtkIdType idx, vtkVariant value);
97  void InsertVariantValue(vtkIdType idx, vtkVariant value);
98  void RemoveTuple(vtkIdType id);
99  void RemoveFirstTuple();
100  void RemoveLastTuple();
101  void SetTupleValue(vtkIdType i, const Scalar *t);
102  void InsertTupleValue(vtkIdType i, const Scalar *t);
103  vtkIdType InsertNextTupleValue(const Scalar *t);
104  void SetValue(vtkIdType idx, Scalar value);
105  vtkIdType InsertNextValue(Scalar v);
106  void InsertValue(vtkIdType idx, Scalar v);
108 
109 protected:
112 
113  Scalar *XArray;
114  Scalar *YArray;
115  Scalar *ZArray;
116 
117 private:
119  const vtkCPExodusIINodalCoordinatesTemplate &); // Not implemented.
120  void operator=(
121  const vtkCPExodusIINodalCoordinatesTemplate &); // Not implemented.
122 
123  vtkIdType Lookup(const Scalar &val, vtkIdType startIndex);
124  double *TempDoubleArray;
125 };
126 
127 #include "vtkCPExodusIINodalCoordinatesTemplate.txx"
128 
129 #endif //vtkCPExodusIINodalCoordinatesTemplate_h
130 
131 // VTK-HeaderTest-Exclude: vtkCPExodusIINodalCoordinatesTemplate.h
void SetExodusScalarArrays(Scalar *x, Scalar *y, Scalar *z, vtkIdType numPoints)
vtkIdType InsertNextTupleValue(const Scalar *t)
Provides the equivalent of vtkTypeMacro for use with template classes.
virtual void PrintSelf(ostream &os, vtkIndent indent)
void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)
Abstract superclass for all arrays.
void InsertTupleValue(vtkIdType i, const Scalar *t)
void InsertValue(vtkIdType idx, Scalar v)
void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)
void SetNumberOfTuples(vtkIdType number)
int vtkIdType
Definition: vtkType.h:247
void SetValue(vtkIdType idx, Scalar value)
vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray *source)
A atomic type representing the union of many types.
Definition: vtkVariant.h:78
Map native Exodus II coordinate arrays into the vtkDataArray interface.
void DeepCopy(vtkAbstractArray *aa)
vtkVariant GetVariantValue(vtkIdType idx)
void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)
a simple class to control print indentation
Definition: vtkIndent.h:38
void GetTupleValue(vtkIdType idx, Scalar *t)
void GetTuples(vtkIdList *ptIds, vtkAbstractArray *output)
list of point or cell ids
Definition: vtkIdList.h:35
void SetTupleValue(vtkIdType i, const Scalar *t)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkIdType LookupTypedValue(Scalar value)
Abstract superclass to iterate over elements in an vtkAbstractArray.
int Resize(vtkIdType numTuples)
void SetVariantValue(vtkIdType idx, vtkVariant value)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkIdType LookupValue(vtkVariant value)
void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray *source)
void InsertVariantValue(vtkIdType idx, vtkVariant value)
static vtkObject * New()
Scalar & GetValueReference(vtkIdType idx)
int Allocate(vtkIdType sz, vtkIdType ext)
vtkMappedDataArrayNewInstanceMacro(vtkCPExodusIINodalCoordinatesTemplate< Scalar >) static vtkCPExodusIINodalCoordinatesTemplate *New()