diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C index 1eb405cf29..49ac7d7431 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) Info<< "\nWall heat fluxes [W]" << endl; forAll(patchHeatFlux, patchi) { - if (typeid(mesh.boundary()) == typeid(wallFvPatch)) + if (typeid(mesh.boundary()[patchi]) == typeid(wallFvPatch)) { Info<< mesh.boundary()[patchi].name() << " " diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index 91473124c0..ba46223e81 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -207,8 +207,11 @@ void timeVaryingMappedFixedValueFvPatchField::autoMap ) { fixedValueFvPatchField::autoMap(m); - startSampledValues_.autoMap(m); - endSampledValues_.autoMap(m); + if (startSampledValues_.size() > 0) + { + startSampledValues_.autoMap(m); + endSampledValues_.autoMap(m); + } } diff --git a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C b/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C index 2a5a86604f..e3c42e77be 100644 --- a/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C +++ b/src/meshTools/searchableSurface/distributedTriSurfaceMesh.C @@ -97,7 +97,11 @@ void Foam::distributedTriSurfaceMesh::splitSegment point clipPt0, clipPt1; - // 1. Fully local already handled outside + // 1. Fully local already handled outside. Note: retest is cheap. + if (isLocal(procBb_[Pstream::myProcNo()], start, end)) + { + return; + } // 2. Check if fully inside other processor. Rare occurrence @@ -109,17 +113,14 @@ void Foam::distributedTriSurfaceMesh::splitSegment { const List& bbs = procBb_[procI]; - forAll(bbs, bbI) + if (isLocal(bbs, start, end)) { - if (bbs[bbI].contains(start) && bbs[bbI].contains(end)) - { - //Pout<< " Completely remote segment:" - // << start << end << " on proc:" << procI << endl; - sendMap[procI].append(allSegments.size()); - allSegmentMap.append(segmentI); - allSegments.append(segment(start, end)); - return; - } + //Pout<< " Completely remote segment:" + // << start << end << " on proc:" << procI << endl; + sendMap[procI].append(allSegments.size()); + allSegmentMap.append(segmentI); + allSegments.append(segment(start, end)); + return; } } }