diff --git a/src/adjoint/DAFvSource/DAFvSourceHeatSource.C b/src/adjoint/DAFvSource/DAFvSourceHeatSource.C index f86b5fb0..a3a7261d 100755 --- a/src/adjoint/DAFvSource/DAFvSourceHeatSource.C +++ b/src/adjoint/DAFvSource/DAFvSourceHeatSource.C @@ -112,11 +112,16 @@ DAFvSourceHeatSource::DAFvSourceHeatSource( if (snapCenter2Cell_[sourceName]) { point centerPoint = {actuatorDiskDVs_[sourceName][0], actuatorDiskDVs_[sourceName][1], actuatorDiskDVs_[sourceName][2]}; - snappedCenterCellI_.set(sourceName, mesh_.findCell(centerPoint)); + + // NOTE: we need to call a self-defined findCell func to make it work correctly in ADR + label myCellI = DAUtility::myFindCell(mesh_, centerPoint); + + snappedCenterCellI_.set(sourceName, myCellI); label foundCellI = 0; if (snappedCenterCellI_[sourceName] >= 0) { foundCellI = 1; + //Pout << "snap source " << sourceName << " to center " << mesh_.C()[snappedCenterCellI_[sourceName]] << endl; } reduce(foundCellI, sumOp