41 #ifndef vtkDataArray_h
42 #define vtkDataArray_h
45 #include "vtkCommonCoreModule.h"
46 #include "vtkVTK_USE_SCALED_SOA_ARRAYS.h"
103 double* weights)
override;
112 virtual double* GetTuple(
vtkIdType tupleIdx)
120 virtual void GetTuple(
vtkIdType tupleIdx,
double* tuple)
132 double* GetTuple3(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
134 double* GetTuple4(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
136 double* GetTuple6(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
138 double* GetTuple9(
vtkIdType tupleIdx)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
148 virtual
void SetTuple(
vtkIdType tupleIdx, const
float* tuple)
149 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
150 virtual
void SetTuple(
vtkIdType tupleIdx, const
double* tuple)
151 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
161 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
162 void SetTuple2(
vtkIdType tupleIdx,
double val0,
double val1)
163 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
164 void SetTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
165 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
166 void SetTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
167 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
168 void SetTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
169 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
170 void SetTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
171 double val4,
double val5,
double val6,
double val7,
double val8)
172 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples());
180 virtual
void InsertTuple(
vtkIdType tupleIdx, const
float* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
181 virtual
void InsertTuple(
vtkIdType tupleIdx, const
double* tuple)
VTK_EXPECTS(0 <= tupleIdx) = 0;
192 void InsertTuple3(
vtkIdType tupleIdx,
double val0,
double val1,
double val2)
194 void InsertTuple4(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3)
196 void InsertTuple6(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
197 double val4,
double val5)
VTK_EXPECTS(0 <= tupleIdx);
198 void InsertTuple9(
vtkIdType tupleIdx,
double val0,
double val1,
double val2,
double val3,
199 double val4,
double val5,
double val6,
double val7,
double val8)
VTK_EXPECTS(0 <= tupleIdx);
208 virtual
vtkIdType InsertNextTuple(const
float* tuple) = 0;
209 virtual
vtkIdType InsertNextTuple(const
double* tuple) = 0;
218 void InsertNextTuple1(
double value);
219 void InsertNextTuple2(
double val0,
double val1);
220 void InsertNextTuple3(
double val0,
double val1,
double val2);
221 void InsertNextTuple4(
double val0,
double val1,
double val2,
double val3);
222 void InsertNextTuple6(
223 double val0,
double val1,
double val2,
double val3,
double val4,
double val5);
224 void InsertNextTuple9(
double val0,
double val1,
double val2,
double val3,
double val4,
225 double val5,
double val6,
double val7,
double val8);
234 virtual
void RemoveTuple(
vtkIdType tupleIdx)
235 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples()) = 0;
236 virtual
void RemoveFirstTuple() { this->RemoveTuple(0); }
237 virtual void RemoveLastTuple();
254 virtual
void SetComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
255 VTK_EXPECTS(0 <= tupleIdx && tupleIdx < GetNumberOfTuples())
256 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
262 virtual
void InsertComponent(
vtkIdType tupleIdx,
int compIdx,
double value)
302 virtual
void FillComponent(
int compIdx,
double value)
303 VTK_EXPECTS(0 <= compIdx && compIdx < GetNumberOfComponents());
308 virtual
void Fill(
double value);
318 virtual
void CopyComponent(
int dstComponent,
vtkDataArray* src,
int srcComponent);
335 unsigned long GetActualMemorySize() const override;
341 void CreateDefaultLookupTable();
369 void GetRange(
double range[2],
int comp) { this->ComputeRange(range, comp); }
370 void GetRange(
double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip)
372 this->ComputeRange(range, comp, ghosts, ghostsToSkip);
387 this->GetRange(this->
Range, comp);
432 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip)
434 this->ComputeFiniteRange(range, comp, ghosts, ghostsToSkip);
449 this->GetFiniteRange(this->FiniteRange, comp);
450 return this->FiniteRange;
479 void GetDataTypeRange(
double range[2]);
480 double GetDataTypeMin();
481 double GetDataTypeMax();
482 static void GetDataTypeRange(
int type,
double range[2]);
483 static double GetDataTypeMin(
int type);
484 static double GetDataTypeMax(
int type);
491 virtual double GetMaxNorm();
576 virtual void ComputeRange(
double range[2],
int comp);
577 virtual void ComputeRange(
578 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
598 virtual void ComputeFiniteRange(
double range[2],
int comp);
599 virtual void ComputeFiniteRange(
600 double range[2],
int comp,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
619 virtual bool ComputeScalarRange(
double* ranges);
620 virtual bool ComputeScalarRange(
621 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
637 virtual bool ComputeVectorRange(
double range[2]);
638 virtual bool ComputeVectorRange(
639 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
657 virtual bool ComputeFiniteScalarRange(
double* ranges);
658 virtual bool ComputeFiniteScalarRange(
659 double* ranges,
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
675 virtual bool ComputeFiniteVectorRange(
double range[2]);
676 virtual bool ComputeFiniteVectorRange(
677 double range[2],
const unsigned char* ghosts,
unsigned char ghostsToSkip = 0xff);
686 double FiniteRange[2];
void Modified() override
Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values.
void GetRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
void GetFiniteRange(double range[2], int comp)
The range of the data array values for the given component will be returned in the provided range arr...
virtual void InsertTuplesStartingAt(vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source)=0
Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstS...
int GetArrayType() const override
Method for type-checking in FastDownCast implementations.
virtual void GetTuples(vtkIdList *tupleIds, vtkAbstractArray *output)
Given a list of tuple ids, return an array of tuples.
Abstract superclass for all arrays.
map scalar values into colors via a lookup table
void GetFiniteRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
The range of the data array values for the given component will be returned in the provided range arr...
void GetRange(double range[2], int comp, const unsigned char *ghosts, unsigned char ghostsToSkip)
The range of the data array values for the given component will be returned in the provided range arr...
virtual void InterpolateTuple(vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in th...
int GetElementComponentSize() const override
Return the size, in bytes, of the lowest-level element of an array.
void GetFiniteRange(double range[2])
The range of the data array values will be returned in the provided range array argument.
double * GetFiniteRange(int comp)
Return the range of the data array values for the given component.
virtual int CopyInformation(vtkInformation *infoFrom, int deep=1)
Copy information instance.
dynamic, self-adjusting array of double
double * GetRange(int comp)
Return the range of the data array values for the given component.
auto Range(IterablePtr iterable, Options &&...opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
virtual int GetDataTypeSize() const =0
Return the size of the underlying data type.
double * GetFiniteRange()
Return the range of the data array.
a simple class to control print indentation
double * GetRange()
Return the range of the data array.
list of point or cell ids
abstract superclass for arrays of numeric data
vtkLookupTable * LookupTable
vtkIdType GetNumberOfTuples() const
Get the number of complete tuples (a component group) in the array.
#define VTK_SIZEHINT(...)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual int GetArrayType() const
Method for type-checking in FastDownCast implementations.
vtkSmartPointer< vtkDataArray > GetData(const Ioss::GroupingEntity *entity, const std::string &fieldname, Ioss::Transform *transform=nullptr, Cache *cache=nullptr, const std::string &cachekey=std::string())
Returns a VTK array for a given field (fieldname) on the chosen block (or set) entity.
virtual void InsertTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx.
int IsNumeric() const override
This method is here to make backward compatibility easier.
virtual vtkIdType InsertNextTuple(vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Insert the tuple from srcTupleIdx in the source array at the end of this array.
static vtkDataArray * FastDownCast(vtkAbstractArray *source)
Perform a fast, safe cast from a vtkAbstractArray to a vtkDataArray.
virtual void SetTuple(vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0
Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array...
vtkArrayDownCast_FastCastMacro(vtkDataArray)
virtual void InsertTuples(vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in t...
represent and manipulate 3D points
represent and manipulate fields of data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.