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

There are 3 distinct phases for the operation of a co-processor. More...

#include <vtkCPProcessor.h>

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

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual int AddPipeline (vtkCPPipeline *pipeline)
 Add in a pipeline that is externally configured. More...
 
virtual int GetNumberOfPipelines ()
 Get the number of pipelines. More...
 
virtual vtkCPPipelineGetPipeline (int which)
 Return a specific pipeline. More...
 
virtual void RemovePipeline (vtkCPPipeline *pipeline)
 Remove pipelines. More...
 
virtual void RemoveAllPipelines ()
 
virtual void SetTemporalCacheSize (int)
 
virtual int GetTemporalCacheSize ()
 
virtual void MakeTemporalCache (const char *name)
 
virtual vtkSMSourceProxyGetTemporalCache (const char *name)
 
virtual int Initialize (const char *workingDirectory=nullptr)
 Initialize the co-processor. More...
 
virtual int Initialize (vtkMPICommunicatorOpaqueComm &comm, const char *workingDirectory=nullptr)
 
virtual int RequestDataDescription (vtkCPDataDescription *dataDescription)
 Configuration Step: The coprocessor first determines if any coprocessing needs to be done at this TimeStep/Time combination returning 1 if it does and 0 otherwise. More...
 
virtual int CoProcess (vtkCPDataDescription *dataDescription)
 Processing Step: Provides the grid and the field data for the co-procesor to process. More...
 
virtual int Finalize ()
 Called after all co-processing is complete giving the Co-Processor implementation an opportunity to clean up, before it is destroyed. More...
 
virtual char * GetWorkingDirectory ()
 Get the current working directory for outputting Catalyst files. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
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 vtkCPProcessorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkCPProcessorSafeDownCast (vtkObject *o)
 
static const char * GetInputArrayName ()
 The Catalyst input field data string array name. 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

 vtkCPProcessor ()
 
 ~vtkCPProcessor () override
 
virtual vtkObjectNewInitializationHelper ()
 Create a new instance of the InitializationHelper. More...
 
virtual void SetWorkingDirectory (const char *)
 Set the current working directory for outputting Catalyst files. More...
 
void FinalizeAndRemovePipelines ()
 Finalizes and remove all pipelines. More...
 
- 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

There are 3 distinct phases for the operation of a co-processor.


1) Initialization – set up for the run.
2) Processing – the run.
3) Finalization – clean up before exit.
The processing phase occurs repeatedly and is composed of two distinct steps, namely 1) Configuration (see vtkCPProcessor::ProcessDataDescription) and 2) Processing (see vtkCPProcessor::ProcessData).

Configuration step:
In the first step the Co-Processor implementation is called with a vtkDataDescription describing the data that the simulation can provide This gives the Co-Processor implementation a chance to identify what (if any) of the available data it will process during this pass. By default all of the available data is selected, so that if the Co-Processor implementation does nothing it will receive all data during the Processing step. The Co-Processor implementation should extract what ever meta-data it will need (or alternatively can save a reference to the DataDescription), during the Processing step.

Processing step:
In the second step the Co-Processor implementation is called with the actual data that it has been asked to provide, if any. If no data was selected during the Configuration Step than the provided vtkDataObject may be nullptr.

Definition at line 46 of file vtkCPProcessor.h.

Member Typedef Documentation

◆ Superclass

Definition at line 50 of file vtkCPProcessor.h.

Constructor & Destructor Documentation

◆ vtkCPProcessor()

vtkCPProcessor::vtkCPProcessor ( )
protected

◆ ~vtkCPProcessor()

vtkCPProcessor::~vtkCPProcessor ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkCPProcessor* vtkCPProcessor::New ( )
static

◆ GetClassName()

virtual const char* vtkCPProcessor::GetClassName ( )
virtual

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

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

◆ PrintSelf()

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

Reimplemented from vtkObject.

◆ AddPipeline()

virtual int vtkCPProcessor::AddPipeline ( vtkCPPipeline pipeline)
virtual

Add in a pipeline that is externally configured.

Returns 1 if successful and 0 otherwise.

◆ GetNumberOfPipelines()

virtual int vtkCPProcessor::GetNumberOfPipelines ( )
virtual

Get the number of pipelines.

◆ GetPipeline()

virtual vtkCPPipeline* vtkCPProcessor::GetPipeline ( int  which)
virtual

Return a specific pipeline.

◆ RemovePipeline()

virtual void vtkCPProcessor::RemovePipeline ( vtkCPPipeline pipeline)
virtual

Remove pipelines.

◆ RemoveAllPipelines()

virtual void vtkCPProcessor::RemoveAllPipelines ( )
virtual

◆ SetTemporalCacheSize()

virtual void vtkCPProcessor::SetTemporalCacheSize ( int  )
virtual

◆ GetTemporalCacheSize()

virtual int vtkCPProcessor::GetTemporalCacheSize ( )
virtual

◆ MakeTemporalCache()

virtual void vtkCPProcessor::MakeTemporalCache ( const char *  name)
virtual

◆ GetTemporalCache()

virtual vtkSMSourceProxy* vtkCPProcessor::GetTemporalCache ( const char *  name)
virtual

◆ Initialize() [1/2]

virtual int vtkCPProcessor::Initialize ( const char *  workingDirectory = nullptr)
virtual

Initialize the co-processor.

Returns 1 if successful and 0 otherwise. If Catalyst is built with MPI then Initialize() can also be called with a specific MPI communicator if MPI_COMM_WORLD isn't the proper one. Catalyst is initialized to use MPI_COMM_WORLD by default. Both methods have an optional workingDirectory argument which will set WorkingDirectory so that files will be put relative to this directory.

◆ Initialize() [2/2]

virtual int vtkCPProcessor::Initialize ( vtkMPICommunicatorOpaqueComm &  comm,
const char *  workingDirectory = nullptr 
)
virtual

◆ GetInputArrayName()

static const char* vtkCPProcessor::GetInputArrayName ( )
inlinestatic

The Catalyst input field data string array name.

This array will be generated automatically by Catalyst and have a single entry that has the input name for identifying the associated vtkCPInputDataDescription. This will allow automatically mapping

Definition at line 94 of file vtkCPProcessor.h.

◆ RequestDataDescription()

virtual int vtkCPProcessor::RequestDataDescription ( vtkCPDataDescription dataDescription)
virtual

Configuration Step: The coprocessor first determines if any coprocessing needs to be done at this TimeStep/Time combination returning 1 if it does and 0 otherwise.

If coprocessing does need to be performed this time step it fills in the FieldNames array that the coprocessor requires in order to fulfill all the coprocessing requests for this TimeStep/Time combination.

◆ CoProcess()

virtual int vtkCPProcessor::CoProcess ( vtkCPDataDescription dataDescription)
virtual

Processing Step: Provides the grid and the field data for the co-procesor to process.

Return value is 1 for success and 0 for failure.

◆ Finalize()

virtual int vtkCPProcessor::Finalize ( )
virtual

Called after all co-processing is complete giving the Co-Processor implementation an opportunity to clean up, before it is destroyed.

◆ GetWorkingDirectory()

virtual char* vtkCPProcessor::GetWorkingDirectory ( )
virtual

Get the current working directory for outputting Catalyst files.

If not set then Catalyst output files will be relative to the current working directory. This will not affect where Catalyst looks for Python scripts. WorkingDirectory gets set through the Initialize() methods.

◆ NewInitializationHelper()

virtual vtkObject* vtkCPProcessor::NewInitializationHelper ( )
protectedvirtual

Create a new instance of the InitializationHelper.

◆ SetWorkingDirectory()

virtual void vtkCPProcessor::SetWorkingDirectory ( const char *  )
protectedvirtual

Set the current working directory for outputting Catalyst files.

This is a protected method since simulation code adaptors should set this through the Initialize() methods.

◆ FinalizeAndRemovePipelines()

void vtkCPProcessor::FinalizeAndRemovePipelines ( )
protected

Finalizes and remove all pipelines.


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