50 vtkDataArray *output)
const {
57 double min = 0, max = 0;
58 for(
SimplexId i = 0; i < input->GetNumberOfTuples(); i++) {
60 double const value = input->GetTuple1(i);
62 if((!i) || (value < min)) {
65 if((!i) || (value > max)) {
71 if(ttk::isRunningWithMPI()) {
74 MPI_Allreduce(MPI_IN_PLACE, &min, 1, MPI_DOUBLE, MPI_MIN, ttk::MPIcomm_);
75 MPI_Allreduce(MPI_IN_PLACE, &max, 1, MPI_DOUBLE, MPI_MAX, ttk::MPIcomm_);
79 for(
SimplexId i = 0; i < input->GetNumberOfTuples(); i++) {
80 double value = input->GetTuple1(i);
84 output->SetTuple1(i, value);
91 vtkInformationVector **inputVector,
92 vtkInformationVector *outputVector) {
94 vtkDataSet *input = vtkDataSet::GetData(inputVector[0]);
95 vtkDataSet *output = vtkDataSet::GetData(outputVector);
98 vtkDataArray *inputArray = this->GetInputArrayToProcess(0, inputVector);
101 = ttkAlgorithm::checkEmptyMPIInput<vtkDataArray>(inputArray);
108 outputArray->SetName(inputArray->GetName());
109 outputArray->SetNumberOfComponents(1);
110 outputArray->SetNumberOfTuples(inputArray->GetNumberOfTuples());
116 output->ShallowCopy(input);
117 output->GetPointData()->AddArray(outputArray);