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

Method Execute

Filters/Parallel/Testing/Cxx/DistributedData.cxx:75–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void MyProcess::Execute()
76{
77 this->ReturnValue = 1;
78 int numProcs = this->Controller->GetNumberOfProcesses();
79 int me = this->Controller->GetLocalProcessId();
80
81 int i, go;
82
83 vtkCompositeRenderManager* prm = vtkCompositeRenderManager::New();
84
85 // READER
86
87 vtkDataSetReader* dsr = vtkDataSetReader::New();
88 vtkUnstructuredGrid* ug = vtkUnstructuredGrid::New();
89
90 vtkDataSet* ds = nullptr;
91
92 if (me == 0)
93 {
94 char* fname =
95 vtkTestUtilities::ExpandDataFileName(this->Argc, this->Argv, "Data/tetraMesh.vtk");
96
97 dsr->SetFileName(fname);
98
99 ds = dsr->GetOutput();
100
101 dsr->Update();
102
103 vtkFloatArray* fa = vtkFloatArray::New();
104 fa->SetName("ones");
105 fa->SetNumberOfTuples(ds->GetNumberOfPoints());
106 fa->FillComponent(0, 1);
107 ds->GetPointData()->AddArray(fa);
108 fa->Delete();
109
110 delete[] fname;
111
112 go = 1;
113
114 if ((ds == nullptr) || (ds->GetNumberOfCells() == 0))
115 {
116 if (ds)
117 {
118 std::cout << "Failure: input file has no cells" << std::endl;
119 }
120 go = 0;
121 }
122 }
123 else
124 {
125 ds = static_cast<vtkDataSet*>(ug);
126 }
127
128 vtkMPICommunicator* comm = vtkMPICommunicator::SafeDownCast(this->Controller->GetCommunicator());
129
130 comm->Broadcast(&go, 1, 0);
131
132 if (!go)

Callers

nothing calls this directly

Calls 15

GetNumberOfProcessesMethod · 0.80
FillComponentMethod · 0.80
MakeRendererMethod · 0.80
MakeRenderWindowMethod · 0.80
InitializeOffScreenMethod · 0.80
GetActiveCameraMethod · 0.80
SetParallelScaleMethod · 0.80
StopServicesMethod · 0.80
StartServicesMethod · 0.80
SetBlocksDimensionsMethod · 0.80
DeleteMethod · 0.65

Tested by

no test coverage detected