Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkCGNSSubsetInclusionLattice Class Reference

extends vtkSubsetInclusionLattice to CGNS friendly API. More...

#include <vtkCGNSSubsetInclusionLattice.h>

Inheritance diagram for vtkCGNSSubsetInclusionLattice:
Inheritance graph
[legend]
Collaboration diagram for vtkCGNSSubsetInclusionLattice:
Collaboration graph
[legend]

Public Types

typedef vtkSubsetInclusionLattice Superclass
 
- Public Types inherited from vtkSubsetInclusionLattice
enum  SelectionStates { NotSelected = 0, Selected, PartiallySelected }
 
typedef vtkObject Superclass
 
using SelectionType = std::map< std::string, bool >
 This defines the type for selection states for nodes exposed by API. More...
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
SelectionStates GetBaseState (const char *basename) const
 Returns the status for a base with the given name. More...
 
SelectionStates GetFamilyState (const char *familyname) const
 Returns the status for a family. More...
 
SelectionStates GetZoneState (const char *basename, const char *zonename) const
 Returns the state for a zone under a given base. More...
 
bool ReadGridForZone (const char *basename, const char *zonename) const
 Returns true if the grid/mesh for the given zone is selected. More...
 
bool ReadPatchesForZone (const char *basename, const char *zonename) const
 Returns true if any of the patches for a given zone are enabled. More...
 
bool ReadPatchesForBase (const char *basename) const
 Returns true if any of the patches for a given base are enabled. More...
 
bool ReadPatch (const char *basename, const char *zonename, const char *patchname) const
 Returns true of a patch identified by basename, zonename and patchname is enabled. More...
 
void SelectBase (const char *basename)
 Select/deselect the base state. More...
 
void DeselectBase (const char *basename)
 Select/deselect the base state. More...
 
void SelectAllBases ()
 Select/deselect the base state. More...
 
void DeselectAllBases ()
 Select/deselect the base state. More...
 
int GetNumberOfBases () const
 API to query information about bases. More...
 
const char * GetBaseName (int index) const
 API to query information about bases. More...
 
void SelectFamily (const char *familyname)
 Select/deselect a family. More...
 
void DeselectFamily (const char *familyname)
 Select/deselect a family. More...
 
void SelectAllFamilies ()
 Select/deselect a family. More...
 
void DeselectAllFamilies ()
 Select/deselect a family. More...
 
int GetNumberOfFamilies () const
 API to query information about families. More...
 
const char * GetFamilyName (int index) const
 API to query information about families. More...
 
int AddZoneNode (const char *basename, int parentnode)
 Convenience API to add nodes. More...
 
- Public Member Functions inherited from vtkSubsetInclusionLattice
void PrintSelf (ostream &os, vtkIndent indent) override
 
void Initialize ()
 Initializes the SIL. More...
 
std::string Serialize () const
 Saves the SIL state to a string. More...
 
void DeepCopy (const vtkSubsetInclusionLattice *other)
 Copies the contents from other. More...
 
void Merge (const std::string &state)
 Merges with state from another instance. More...
 
void Merge (const vtkSubsetInclusionLattice *other)
 Merges with another instance of vtkSubsetInclusionLattice. More...
 
int AddNode (const char *name, int parent=0)
 Add a node to the SIL. More...
 
int AddNodeAtPath (const char *path)
 Add a node to the SIL at the given path. More...
 
bool AddCrossLink (int src, int dst)
 A cross link is directed link between nodes in two sub-trees. More...
 
int FindNode (const char *path) const
 Find the id for a node given a path expression to locate it. More...
 
SelectionStates GetSelectionState (int node) const
 Get the current state for a specific node. More...
 
SelectionStates GetSelectionState (const char *path) const
 Get the current state for a node given its path. More...
 
bool Select (const char *path)
 Select a node. More...
 
bool Deselect (const char *path)
 Deselect a node. More...
 
void ClearSelections ()
 Clears all selection statuses. More...
 
bool Deserialize (const std::string &data)
 Deserializes the SIL state from a string. More...
 
bool Deserialize (const char *data)
 Deserializes the SIL state from a string. More...
 
bool Select (int node)
 Select/deselect nodes using their node id's. More...
 
bool Deselect (int node)
 Select/deselect nodes using their node id's. More...
 
bool SelectAll (const char *path)
 Select/Deselect all nodes that match the path. More...
 
bool DeselectAll (const char *path)
 This defines the type for selection states for nodes exposed by API. More...
 
virtual vtkMTimeType GetSelectionChangeTime ()
 Returns the time stamp for the most recent selection state change. More...
 
std::vector< intGetChildren (int node) const
 Returns a vector of node ids for child nodes of a node. More...
 
int GetParent (int node, int *childIndex=nullptr) const
 Returns the id for the parent of a node. More...
 
const char * GetNodeName (int node) const
 Returns a node's name. More...
 
SelectionType GetSelection () const
 Get the paths for currently selected/deselected nodes. More...
 
void SetSelection (const SelectionType &selection)
 Set the paths for nodes to select. More...
 
void Modified () override
 Overridden to modify SelectionChangeTime, since any time the SIL structure is modified, it's akin to selection states being modified. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkCGNSSubsetInclusionLatticeNew ()
 
static int IsTypeOf (const char *type)
 
static vtkCGNSSubsetInclusionLatticeSafeDownCast (vtkObject *o)
 
static std::string SanitizeZoneName (const char *zonename)
 Sanitizes zonenames by removed any _proc-[0-9]+ suffix. More...
 
- Static Public Member Functions inherited from vtkSubsetInclusionLattice
static vtkSubsetInclusionLatticeNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSubsetInclusionLatticeSafeDownCast (vtkObject *o)
 
static vtkSmartPointer< vtkSubsetInclusionLatticeClone (const vtkSubsetInclusionLattice *other)
 Creates a new clone of other. More...
 
static vtkInformationObjectBaseKeySUBSET_INCLUSION_LATTICE ()
 Key used to provide an instance of vtkSubsetInclusionLattice in the output information during vtkAlgorithm's RequestInformation pass. More...
 
static vtkSubsetInclusionLatticeGetSIL (vtkInformation *info)
 Retrieve an instance of this class from an information object. More...
 
static vtkSubsetInclusionLatticeGetSIL (vtkInformationVector *v, int i=0)
 This defines the type for selection states for nodes exposed by API. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkCGNSSubsetInclusionLattice ()
 
 ~vtkCGNSSubsetInclusionLattice ()
 
- Protected Member Functions inherited from vtkSubsetInclusionLattice
 vtkSubsetInclusionLattice ()
 
 ~vtkSubsetInclusionLattice ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

extends vtkSubsetInclusionLattice to CGNS friendly API.

vtkCGNSSubsetInclusionLattice simply makes it easier for users (and the vtkCGNSReader) to query vtkSubsetInclusionLattice using CGNS terminology.

Zone names and partitioned files

vtkCGNSFileSeriesReader supports reading of a partitioned file series where each file has all timesteps but only the data from the rank the file was written out on. In those cases, some sims use suffixes for zone names to identify proc number e.g. blk-1_proc-0, blk-1_proc-1, etc. Since this has a tendency to make the SIL unwieldy, we sanitize zonenames by default to remove the _proc-.* suffix. All API on vtkCGNSFileSeriesReader that takes a zonename sanitizes it. If you use API on vtkSubsetInclusionLattice you may need to sanitize zonenames manually by calling SanitizeZoneName.

Definition at line 40 of file vtkCGNSSubsetInclusionLattice.h.

Member Typedef Documentation

◆ Superclass

Definition at line 45 of file vtkCGNSSubsetInclusionLattice.h.

Constructor & Destructor Documentation

◆ vtkCGNSSubsetInclusionLattice()

vtkCGNSSubsetInclusionLattice::vtkCGNSSubsetInclusionLattice ( )
protected

◆ ~vtkCGNSSubsetInclusionLattice()

vtkCGNSSubsetInclusionLattice::~vtkCGNSSubsetInclusionLattice ( )
protected

Member Function Documentation

◆ New()

static vtkCGNSSubsetInclusionLattice* vtkCGNSSubsetInclusionLattice::New ( )
static

◆ GetClassName()

virtual const char* vtkCGNSSubsetInclusionLattice::GetClassName ( )
virtual

Reimplemented from vtkSubsetInclusionLattice.

◆ IsTypeOf()

static int vtkCGNSSubsetInclusionLattice::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkCGNSSubsetInclusionLattice::IsA ( const char *  type)
virtual

Reimplemented from vtkSubsetInclusionLattice.

◆ SafeDownCast()

static vtkCGNSSubsetInclusionLattice* vtkCGNSSubsetInclusionLattice::SafeDownCast ( vtkObject o)
static

◆ PrintSelf()

void vtkCGNSSubsetInclusionLattice::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Reimplemented from vtkObject.

◆ SelectBase()

void vtkCGNSSubsetInclusionLattice::SelectBase ( const char *  basename)

Select/deselect the base state.

◆ DeselectBase()

void vtkCGNSSubsetInclusionLattice::DeselectBase ( const char *  basename)

Select/deselect the base state.

◆ SelectAllBases()

void vtkCGNSSubsetInclusionLattice::SelectAllBases ( )

Select/deselect the base state.

◆ DeselectAllBases()

void vtkCGNSSubsetInclusionLattice::DeselectAllBases ( )

Select/deselect the base state.

◆ GetBaseState()

SelectionStates vtkCGNSSubsetInclusionLattice::GetBaseState ( const char *  basename) const

Returns the status for a base with the given name.

◆ GetNumberOfBases()

int vtkCGNSSubsetInclusionLattice::GetNumberOfBases ( ) const

API to query information about bases.

◆ GetBaseName()

const char* vtkCGNSSubsetInclusionLattice::GetBaseName ( int  index) const

API to query information about bases.

◆ SelectFamily()

void vtkCGNSSubsetInclusionLattice::SelectFamily ( const char *  familyname)

Select/deselect a family.

◆ DeselectFamily()

void vtkCGNSSubsetInclusionLattice::DeselectFamily ( const char *  familyname)

Select/deselect a family.

◆ SelectAllFamilies()

void vtkCGNSSubsetInclusionLattice::SelectAllFamilies ( )

Select/deselect a family.

◆ DeselectAllFamilies()

void vtkCGNSSubsetInclusionLattice::DeselectAllFamilies ( )

Select/deselect a family.

◆ GetNumberOfFamilies()

int vtkCGNSSubsetInclusionLattice::GetNumberOfFamilies ( ) const

API to query information about families.

◆ GetFamilyName()

const char* vtkCGNSSubsetInclusionLattice::GetFamilyName ( int  index) const

API to query information about families.

◆ GetFamilyState()

SelectionStates vtkCGNSSubsetInclusionLattice::GetFamilyState ( const char *  familyname) const

Returns the status for a family.

◆ GetZoneState()

SelectionStates vtkCGNSSubsetInclusionLattice::GetZoneState ( const char *  basename,
const char *  zonename 
) const

Returns the state for a zone under a given base.

Note this indicates either the zone-grid and/or the zone-bcs are selected.

◆ ReadGridForZone()

bool vtkCGNSSubsetInclusionLattice::ReadGridForZone ( const char *  basename,
const char *  zonename 
) const

Returns true if the grid/mesh for the given zone is selected.

◆ ReadPatchesForZone()

bool vtkCGNSSubsetInclusionLattice::ReadPatchesForZone ( const char *  basename,
const char *  zonename 
) const

Returns true if any of the patches for a given zone are enabled.

◆ ReadPatchesForBase()

bool vtkCGNSSubsetInclusionLattice::ReadPatchesForBase ( const char *  basename) const

Returns true if any of the patches for a given base are enabled.

◆ ReadPatch()

bool vtkCGNSSubsetInclusionLattice::ReadPatch ( const char *  basename,
const char *  zonename,
const char *  patchname 
) const

Returns true of a patch identified by basename, zonename and patchname is enabled.

TODO: wonder if these should be called 'IsEnabled...` instead.

◆ AddZoneNode()

int vtkCGNSSubsetInclusionLattice::AddZoneNode ( const char *  basename,
int  parentnode 
)

Convenience API to add nodes.

◆ SanitizeZoneName()

static std::string vtkCGNSSubsetInclusionLattice::SanitizeZoneName ( const char *  zonename)
static

Sanitizes zonenames by removed any _proc-[0-9]+ suffix.


The documentation for this class was generated from the following file: