MCPcopy Create free account
hub / github.com/Kitware/VTK / Execute

Method Execute

Filters/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx:88–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void MyProcess::Execute()
89{
90 this->ReturnValue = 1;
91 int numProcs = this->Controller->GetNumberOfProcesses();
92 int me = this->Controller->GetLocalProcessId();
93
94 int i, go;
95
96 // vtkCompositeRenderManager *prm = vtkCompositeRenderManager::New();
97 // vtkParallelRenderManager *prm = vtkParallelRenderManager::New();
98 vtkImageRenderManager* prm = vtkImageRenderManager::New();
99
100 vtkRenderWindowInteractor* iren = nullptr;
101
102 if (me == 0)
103 {
104 iren = vtkRenderWindowInteractor::New();
105 }
106
107 // READER
108
109 vtkDataSetReader* dsr = vtkDataSetReader::New();
110 vtkUnstructuredGrid* ug = vtkUnstructuredGrid::New();
111
112 vtkDataSet* ds = nullptr;
113
114 if (me == 0)
115 {
116 char* fname =
117 vtkTestUtilities::ExpandDataFileName(this->Argc, this->Argv, "Data/tetraMesh.vtk");
118
119 dsr->SetFileName(fname);
120
121 ds = dsr->GetOutput();
122
123 dsr->Update();
124
125 delete[] fname;
126
127 go = 1;
128
129 if ((ds == nullptr) || (ds->GetNumberOfCells() == 0))
130 {
131 if (ds)
132 {
133 std::cout << "Failure: input file has no cells" << std::endl;
134 }
135 go = 0;
136 }
137 }
138 else
139 {
140 ds = static_cast<vtkDataSet*>(ug);
141 }
142
143 vtkMPICommunicator* comm = vtkMPICommunicator::SafeDownCast(this->Controller->GetCommunicator());
144
145 comm->Broadcast(&go, 1, 0);

Callers

nothing calls this directly

Calls 15

GetNumberOfProcessesMethod · 0.80
MakeRendererMethod · 0.80
GetKdtreeMethod · 0.80
MakeRenderWindowMethod · 0.80
SetMultiSamplesMethod · 0.80
InitializeOffScreenMethod · 0.80
GetActiveCameraMethod · 0.80
SetParallelScaleMethod · 0.80
StopServicesMethod · 0.80
StartServicesMethod · 0.80
DeleteMethod · 0.65

Tested by

no test coverage detected