mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
ParaView-5.0.1: Added the source-tree to ThirdParty-dev and patched as described in the README file
Resolves bug-report http://bugs.openfoam.org/view.php?id=2098
This commit is contained in:
82
ParaView-5.0.1/VTK/Parallel/Core/vtkDummyController.cxx
Normal file
82
ParaView-5.0.1/VTK/Parallel/Core/vtkDummyController.cxx
Normal file
@ -0,0 +1,82 @@
|
||||
/*=========================================================================
|
||||
|
||||
Program: Visualization Toolkit
|
||||
Module: vtkDummyController.cxx
|
||||
|
||||
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
||||
All rights reserved.
|
||||
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
||||
|
||||
This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the above copyright notice for more information.
|
||||
|
||||
=========================================================================*/
|
||||
#include "vtkDummyCommunicator.h"
|
||||
#include "vtkDummyController.h"
|
||||
#include "vtkObjectFactory.h"
|
||||
|
||||
vtkStandardNewMacro(vtkDummyController);
|
||||
|
||||
vtkCxxSetObjectMacro(vtkDummyController, Communicator, vtkCommunicator);
|
||||
vtkCxxSetObjectMacro(vtkDummyController, RMICommunicator, vtkCommunicator);
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
vtkDummyController::vtkDummyController()
|
||||
{
|
||||
this->Communicator = vtkDummyCommunicator::New();
|
||||
this->RMICommunicator = vtkDummyCommunicator::New();
|
||||
}
|
||||
|
||||
vtkDummyController::~vtkDummyController()
|
||||
{
|
||||
this->SetCommunicator(NULL);
|
||||
this->SetRMICommunicator(NULL);
|
||||
}
|
||||
|
||||
void vtkDummyController::PrintSelf(ostream& os, vtkIndent indent)
|
||||
{
|
||||
this->Superclass::PrintSelf(os,indent);
|
||||
|
||||
os << indent << "Communicator: " << this->Communicator << endl;
|
||||
os << indent << "RMICommunicator: " << this->RMICommunicator << endl;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void vtkDummyController::SingleMethodExecute()
|
||||
{
|
||||
if (this->SingleMethod)
|
||||
{
|
||||
// Should we set the global controller here? I'm going to say no since
|
||||
// we are not really a parallel job or at the very least not the global
|
||||
// controller.
|
||||
|
||||
(this->SingleMethod)(this, this->SingleData);
|
||||
}
|
||||
else
|
||||
{
|
||||
vtkWarningMacro("SingleMethod not set.");
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void vtkDummyController::MultipleMethodExecute()
|
||||
{
|
||||
int i = this->GetLocalProcessId();
|
||||
|
||||
vtkProcessFunctionType multipleMethod;
|
||||
void *multipleData;
|
||||
this->GetMultipleMethod(i, multipleMethod, multipleData);
|
||||
if (multipleMethod)
|
||||
{
|
||||
// Should we set the global controller here? I'm going to say no since
|
||||
// we are not really a parallel job or at the very least not the global
|
||||
// controller.
|
||||
|
||||
(multipleMethod)(this, multipleData);
|
||||
}
|
||||
else
|
||||
{
|
||||
vtkWarningMacro("MultipleMethod " << i << " not set.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user