<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I would like to partition the unstructured data using <span style="font-family: Menlo; font-size: 11px;" class="">vtkUnstructuredGridReader</span> for further parallel application. The thought is to partition and assign one part of the data (mesh) to each process.</div><div class="">The code is at below. However, the generated result of each process is somehow not very correct.</div><div class="">For example, for one data partition of a process, the number of points is 3, and the number of cells is 5. But these 5 cells are the same (actually one cell contains 3 points). So how to avoid this? Can this code reach to my goal of data partitioning?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  vtkMPIController *contr = vtkMPIController::New();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  contr->Initialize(&argc, &argv);</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  vtkMultiProcessController::SetGlobalController(contr);</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">int</span><span style="font-variant-ligatures: no-common-ligatures" class=""> numProcs = contr->GetNumberOfProcesses();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">int</span><span style="font-variant-ligatures: no-common-ligatures" class=""> me = contr->GetLocalProcessId();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  vtkUnstructuredGridReader *reader = vtkUnstructuredGridReader::New();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  vtkUnstructuredGrid *ds = vtkUnstructuredGrid::New();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">  reader->SetFileName(</span><span style="color: rgb(195, 55, 32); font-variant-ligatures: no-common-ligatures;" class="">“data.vtk"</span><span style="font-variant-ligatures: no-common-ligatures; color: rgb(0, 0, 0);" class="">);</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  reader->Update();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  ds = reader->GetOutput();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  vtkDistributedDataFilter *dd = vtkDistributedDataFilter::New();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  dd->SetInputData(ds);</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  dd->SetController(contr);</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  dd->UseMinimalMemoryOff();</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  dd-></span>SetBoundaryModeToAssignToOneRegion();</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  dd->Update();</span></div></div><div class=""><br class=""></div></body></html>