112 const int &numberOfIterations)
const {
116#ifndef TTK_ENABLE_KAMIKAZE
127 SimplexId const vertexNumber = triangulation->getNumberOfVertices();
134#ifdef TTK_ENABLE_OPENMP
135#pragma omp parallel for num_threads(threadNumber_)
137 for(
SimplexId i = 0; i < vertexNumber; i++) {
144 printMsg(
"Smoothing " + std::to_string(vertexNumber) +
" vertices", 0, 0,
147 int timeBuckets = 10;
148 if(numberOfIterations < timeBuckets)
149 timeBuckets = numberOfIterations;
151 for(
int it = 0; it < numberOfIterations; it++) {
152#ifdef TTK_ENABLE_OPENMP
153#pragma omp parallel for num_threads(threadNumber_)
155 for(
SimplexId i = 0; i < vertexNumber; i++) {
163 tmpData[curr] = outputData[curr];
165 const auto neighborNumber = triangulation->getVertexNeighborNumber(i);
166 for(
SimplexId k = 0; k < neighborNumber; k++) {
168 triangulation->getVertexNeighbor(i, k, neighborId);
171 tmpData[curr] /=
static_cast<double>(neighborNumber + 1);
175 if(numberOfIterations) {
177#ifdef TTK_ENABLE_OPENMP
178#pragma omp parallel for num_threads(threadNumber_)
180 for(
SimplexId i = 0; i < vertexNumber; i++) {
191 if(ttk::isRunningWithMPI()) {
194 exchangeGhostVertices<dataType, triangulationType>(
200 if(!(it % ((numberOfIterations) / timeBuckets))) {
201 printMsg(
"Smoothing " + std::to_string(vertexNumber) +
" vertices",
208 printMsg(
"Smoothed " + std::to_string(vertexNumber) +
" vertices", 1,
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)