155 #ifndef vtkFieldData_h
156 #define vtkFieldData_h
158 #include "vtkCommonDataModelModule.h"
167 VTK_ABI_NAMESPACE_BEGIN
279 return this->GetArray(arrayName, i);
307 return this->GetAbstractArray(arrayName, i);
319 return array ? 1 : 0;
332 return da ? da->
GetName() :
nullptr;
521 vtkGetMacro(GhostsToSkip,
unsigned char);
594 std::vector<std::array<CachedGhostRangeType, 2>>
Ranges;
613 int GetListSize()
const {
return static_cast<int>(this->List.size()); }
618 return this->NextIndex();
620 int End()
const {
return (this->
Position >=
static_cast<int>(this->List.size())); }
624 return (this->End() ? -1 : this->List[this->
Position]);
629 std::vector<int>::const_iterator
begin() {
return this->List.begin(); }
630 std::vector<int>::const_iterator
end() {
return this->List.end(); }
663 return (cur ? cur : this->Next());
674 VTK_ABI_NAMESPACE_END
Abstract superclass for all arrays.
virtual char * GetName()
Set/get array's name.
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of double
BasicIterator(const BasicIterator &source)
std::vector< int >::const_iterator begin()
BasicIterator(const int *list, unsigned int listSize)
BasicIterator & operator=(const BasicIterator &source)
virtual ~BasicIterator()=default
void PrintSelf(ostream &os, vtkIndent indent)
std::vector< int >::const_iterator end()
Iterator(vtkFieldData *dsa, const int *list=nullptr, unsigned int listSize=0)
Iterator(const Iterator &source)
Iterator & operator=(const Iterator &source)
represent and manipulate fields of data
vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000)
Allocate data for each array.
int GetFlag(const char *field)
static vtkFieldData * ExtendedNew()
int GetNumberOfArrays()
Get the number of arrays of data available.
virtual void DeepCopy(vtkFieldData *da)
Copy a field by creating new data arrays (i.e., duplicate storage).
int AddArray(vtkAbstractArray *array)
Add an array to the array list.
void CopyFlags(const vtkFieldData *source)
static vtkFieldData * New()
void Reset()
Resets each data array in the field (Reset() does not release memory but it makes the arrays look lik...
bool GetFiniteRange(const char *name, double range[2], int comp=0)
Computes the range of the input data array (specified through its name or the index in this field dat...
bool HasAnyGhostBitSet(int bitFlag)
Helper function that tests if any of the values in ghost array has been set.
std::vector< std::array< CachedGhostRangeType, 2 > > FiniteRanges
Ranges and FiniteRanges store cached ranges for arrays stored in this field data.
void SetTuple(const vtkIdType i, const vtkIdType j, vtkFieldData *source)
Set the jth tuple in source field data at the ith location.
virtual void SetGhostsToSkip(unsigned char)
Set / Get the binary mask filtering out certain types of ghosts when calling GetRange.
void AllocateArrays(int num)
AllocateArrays actually sets the number of vtkAbstractArray pointers in the vtkFieldData object,...
virtual void RemoveArray(int index)
Remove an array (with the given index) from the list of arrays.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void InitializeFields()
Release all data but do not delete object.
bool GetRange(const char *name, double range[2], int comp=0)
Computes the range of the input data array (specified through its name or the index in this field dat...
int GetNumberOfComponents()
Get the number of components in the field.
vtkMTimeType GetMTime() override
Check object's components for modified times.
std::vector< std::array< CachedGhostRangeType, 2 > > Ranges
Ranges and FiniteRanges store cached ranges for arrays stored in this field data.
std::tuple< vtkMTimeType, vtkMTimeType, std::vector< double > > CachedGhostRangeType
virtual void RemoveArray(const char *name)
Remove an array (with the given name) from the list of arrays.
unsigned char GhostsToSkip
const char * GetArrayName(int i)
Get the name of ith array.
virtual void CopyAllOn(int unused=0)
Turn on copying of all data.
void SetNumberOfTuples(const vtkIdType number)
Set the number of tuples for each data array in the field.
CopyFieldFlag * CopyFieldFlags
vtkDataArray * GetArray(int i)
Not recommended for use.
vtkAbstractArray * GetAbstractArray(const char *arrayName)
Return the array with the name given.
virtual unsigned long GetActualMemorySize()
Return the memory in kibibytes (1024 bytes) consumed by this field data.
int GetArrayContainingComponent(int i, int &arrayComp)
Return the array containing the ith component of the field.
int FindFlag(const char *field)
vtkDataArray * GetArray(const char *arrayName)
Not recommended for use.
virtual void Initialize()
Release all data but do not delete object.
virtual void CopyAllOff(int unused=0)
Turn off copying of all data.
bool GetRange(int index, double range[2], int comp=0)
Computes the range of the input data array (specified through its name or the index in this field dat...
virtual void ShallowCopy(vtkFieldData *da)
Copy a field by reference counting the data arrays.
void CopyFieldOn(const char *name)
Turn on/off the copying of the field specified by name.
bool GetFiniteRange(int index, double range[2], int comp=0)
Computes the range of the input data array (specified through its name or the index in this field dat...
vtkUnsignedCharArray * GhostArray
vtkIdType InsertNextTuple(const vtkIdType j, vtkFieldData *source)
Insert the jth tuple in source field data at the end of the tuple matrix.
void CopyFieldOff(const char *name)
vtkAbstractArray * GetAbstractArray(int i)
Returns the ith array in the field.
vtkIdType GetNumberOfTuples()
Get the number of tuples in the field.
void Squeeze()
Squeezes each data array in the field (Squeeze() reclaims unused memory.)
void NullData(vtkIdType id)
Sets every vtkDataArray at index id to a null tuple.
void GetField(vtkIdList *ptId, vtkFieldData *f)
Get a field from a list of ids.
void CopyFieldOnOff(const char *name, int onOff)
virtual void PassData(vtkFieldData *fd)
Pass entire arrays of input data through to output.
void CopyStructure(vtkFieldData *)
Copy data array structure from a given field.
vtkDataArray * GetArray(const char *arrayName, int &index)
Not recommended for use.
void InsertTuple(const vtkIdType i, const vtkIdType j, vtkFieldData *source)
Insert the jth tuple in source field data at the ith location.
void SetArray(int i, vtkAbstractArray *array)
Set an array to define the field.
int HasArray(const char *name)
Return 1 if an array with the given name could be found.
vtkAbstractArray * GetAbstractArray(const char *arrayName, int &index)
Return the array with the name given.
list of point or cell ids
a simple class to control print indentation
abstract base class for most VTK objects
dynamic, self-adjusting array of unsigned char
struct Position_t Position
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
vtkTypeUInt32 vtkMTimeType