34 #ifndef vtkFieldData_h
35 #define vtkFieldData_h
37 #include "vtkCommonDataModelModule.h"
46 VTK_ABI_NAMESPACE_BEGIN
64 virtual void Initialize();
88 void AllocateArrays(
int num);
115 virtual void RemoveArray(
const char*
name);
120 virtual void RemoveArray(
int index);
158 return this->GetArray(arrayName, i);
186 return this->GetAbstractArray(arrayName, i);
198 return array ? 1 : 0;
211 return da ? da->
GetName() :
nullptr;
242 virtual void CopyAllOn(
int unused = 0);
253 virtual void CopyAllOff(
int unused = 0);
282 virtual unsigned long GetActualMemorySize();
307 int GetArrayContainingComponent(
int i,
int& arrayComp);
318 int GetNumberOfComponents();
340 void SetNumberOfTuples(
vtkIdType number);
382 bool GetRange(
const char*
name,
double range[2],
int comp = 0);
383 bool GetRange(
int index,
double range[2],
int comp = 0);
384 bool GetFiniteRange(
const char*
name,
double range[2],
int comp = 0);
385 bool GetFiniteRange(
int index,
double range[2],
int comp = 0);
400 vtkGetMacro(GhostsToSkip,
unsigned char);
401 virtual void SetGhostsToSkip(
unsigned char);
408 bool HasAnyGhostBitSet(
int bitFlag);
436 virtual void InitializeFields();
446 void CopyFieldOnOff(
const char*
name,
int onOff);
447 void ClearFieldFlags();
448 int FindFlag(
const char*
field);
449 int GetFlag(
const char*
field);
473 std::vector<std::array<CachedGhostRangeType, 2>>
Ranges;
490 void PrintSelf(ostream& os,
vtkIndent indent);
492 int GetListSize()
const {
return static_cast<int>(this->List.size()); }
497 return this->NextIndex();
499 int End()
const {
return (this->
Position >= static_cast<int>(this->List.size())); }
503 return (this->End() ? -1 : this->List[this->
Position]);
508 std::vector<int>::const_iterator
begin() {
return this->List.begin(); }
509 std::vector<int>::const_iterator
end() {
return this->List.end(); }
542 return (cur ? cur : this->Next());
545 void DetachFieldData();
553 VTK_ABI_NAMESPACE_END
vtkUnsignedCharArray * GhostArray
vtkDataArray * GetArray(const char *arrayName)
Not recommended for use.
std::tuple< vtkMTimeType, vtkMTimeType, std::vector< double >> CachedGhostRangeType
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Abstract superclass for all arrays.
struct Position_t Position
CopyFieldFlag * CopyFieldFlags
std::vector< std::array< CachedGhostRangeType, 2 > > Ranges
Ranges and FiniteRanges store cached ranges for arrays stored in this field data. ...
void CopyFieldOn(const char *name)
Turn on/off the copying of the field specified by name.
dynamic, self-adjusting array of double
BasicIterator & operator=(const BasicIterator &source)
std::vector< std::array< CachedGhostRangeType, 2 > > FiniteRanges
Ranges and FiniteRanges store cached ranges for arrays stored in this field data. ...
unsigned char GhostsToSkip
a simple class to control print indentation
vtkAbstractArray * GetAbstractArray(const char *arrayName)
Return the array with the name given.
list of point or cell ids
std::vector< int >::const_iterator begin()
abstract superclass for arrays of numeric data
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual char * GetName()
Set/get array's name.
const char * GetArrayName(int i)
Get the name of ith array.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
dynamic, self-adjusting array of unsigned char
void CopyFieldOff(const char *name)
std::vector< int >::const_iterator end()
vtkTypeBool HasArray(const char *name)
Return 1 if an array with the given name could be found.
int GetNumberOfArrays()
Get the number of arrays of data available.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate fields of data