34 template<
class SourcePatch,
class TargetPatch>
41 word method =
"unknown-interpolationMethod";
52 method =
"mapNearestAMI";
55 case imFaceAreaWeight:
57 method =
"faceAreaWeightAMI";
60 case imPartialFaceAreaWeight:
62 method =
"partialFaceAreaWeightAMI";
65 case imSweptFaceAreaWeight:
67 method =
"sweptFaceAreaWeightAMI";
73 <<
"Unhandled interpolationMethod enumeration " << method
82 template<
class SourcePatch,
class TargetPatch>
99 "partialFaceAreaWeightAMI " 100 "sweptFaceAreaWeightAMI" 105 if (im ==
"directAMI")
109 else if (im ==
"mapNearestAMI")
111 method = imMapNearest;
113 else if (im ==
"faceAreaWeightAMI")
115 method = imFaceAreaWeight;
117 else if (im ==
"partialFaceAreaWeightAMI")
119 method = imPartialFaceAreaWeight;
121 else if (im ==
"sweptFaceAreaWeightAMI")
123 method = imSweptFaceAreaWeight;
128 <<
"Invalid interpolationMethod " << im
129 <<
". Valid methods are:" << methods
137 template<
class SourcePatch,
class TargetPatch>
138 template<
class Patch>
149 const pointField& patchPoints = patch.localPoints();
153 forAll(result, patchFacei)
155 faceAreaIntersect::triangulate
157 patch.localFaces()[patchFacei],
165 result[patchFacei] +=
168 patchPoints[patchFaceTris[i][0]],
169 patchPoints[patchFaceTris[i][1]],
170 patchPoints[patchFaceTris[i][2]]
181 template<
class SourcePatch,
class TargetPatch>
190 Info<<
"AMI: projecting points to surface" <<
endl;
216 <<
"Error projecting points to surface: " 217 << nMiss <<
" faces could not be determined" 223 template<
class SourcePatch,
class TargetPatch>
235 wghtSum[facei] =
sum(wght[facei]);
240 template<
class SourcePatch,
class TargetPatch>
247 wghtSum.
setSize(wghts[0].size());
254 forAll(wghts[wghtsi][facei], i)
256 wghtSum[facei] += wghts[wghtsi][facei][i];
263 template<
class SourcePatch,
class TargetPatch>
267 const word& patchName,
269 const scalar lowWeightTol
277 label nLowWeight = 0;
280 if (wghtSum[facei] < lowWeightTol)
288 <<
" sum(weights) min/max/average = " <<
gMin(wghtSum) <<
", " 289 <<
gMax(wghtSum) <<
", " 294 Info<<
indent <<
"AMI: Patch " << patchName <<
" identified " 295 << nLowWeight <<
" faces with weights less than " 296 << lowWeightTol <<
endl;
301 template<
class SourcePatch,
class TargetPatch>
314 w[i] /= wghtSum[facei];
320 template<
class SourcePatch,
class TargetPatch>
335 w[i] /= wghtSum[facei];
342 template<
class SourcePatch,
class TargetPatch>
350 const labelList& sourceRestrictAddressing,
351 const labelList& targetRestrictAddressing,
360 label sourceCoarseSize =
362 sourceRestrictAddressing.
size()
363 ?
max(sourceRestrictAddressing)+1
367 label targetCoarseSize =
369 targetRestrictAddressing.
size()
370 ?
max(targetRestrictAddressing)+1
376 srcMagSf.
setSize(sourceRestrictAddressing.
size(), 0.0);
377 forAll(sourceRestrictAddressing, facei)
379 label coarseFacei = sourceRestrictAddressing[facei];
380 srcMagSf[coarseFacei] += fineSrcMagSf[facei];
386 if (targetMapPtr.
valid())
391 labelList allRestrict(targetRestrictAddressing);
403 tgtSubMap[Pstream::myProcNo()] =
identity(targetCoarseSize);
408 if (proci != Pstream::myProcNo())
418 labelList oldToNew(targetCoarseSize, -1);
423 label fineElem = elems[i];
424 label coarseElem = allRestrict[fineElem];
425 if (oldToNew[coarseElem] == -1)
427 oldToNew[coarseElem] = newI;
428 newSubMap[newI] = coarseElem;
445 tgtConstructMap[Pstream::myProcNo()] =
448 tgtCompactMap = targetRestrictAddressing;
451 label compactI = targetCoarseSize;
456 if (proci != Pstream::myProcNo())
463 labelList& newConstructMap = tgtConstructMap[proci];
473 remoteTargetCoarseSize =
max 475 remoteTargetCoarseSize,
476 allRestrict[elems[i]]
479 remoteTargetCoarseSize += 1;
482 labelList oldToNew(remoteTargetCoarseSize, -1);
487 label fineElem = elems[i];
489 label coarseElem = allRestrict[fineElem];
490 if (oldToNew[coarseElem] == -1)
492 oldToNew[coarseElem] = newI;
493 tgtCompactMap[fineElem] = compactI;
494 newConstructMap[newI] = compactI++;
500 label compactI = oldToNew[coarseElem];
501 tgtCompactMap[fineElem] = newConstructMap[compactI];
510 srcAddress.
setSize(sourceCoarseSize);
511 srcWeights.
setSize(sourceCoarseSize);
513 forAll(fineSrcAddress, facei)
517 const labelList& elems = fineSrcAddress[facei];
518 const scalarList& weights = fineSrcWeights[facei];
519 const scalar fineArea = fineSrcMagSf[facei];
521 label coarseFacei = sourceRestrictAddressing[facei];
523 const scalar coarseArea = srcMagSf[coarseFacei];
525 labelList& newElems = srcAddress[coarseFacei];
526 scalarList& newWeights = srcWeights[coarseFacei];
530 label elemI = elems[i];
531 label coarseElemI = tgtCompactMap[elemI];
536 newElems.
append(coarseElemI);
537 newWeights.
append(fineArea/coarseArea*weights[i]);
541 newWeights[index] += fineArea/coarseArea*weights[i];
552 tgtConstructMap.
xfer()
558 srcAddress.
setSize(sourceCoarseSize);
559 srcWeights.
setSize(sourceCoarseSize);
561 forAll(fineSrcAddress, facei)
565 const labelList& elems = fineSrcAddress[facei];
566 const scalarList& weights = fineSrcWeights[facei];
567 const scalar fineArea = fineSrcMagSf[facei];
569 label coarseFacei = sourceRestrictAddressing[facei];
571 const scalar coarseArea = srcMagSf[coarseFacei];
573 labelList& newElems = srcAddress[coarseFacei];
574 scalarList& newWeights = srcWeights[coarseFacei];
578 label elemI = elems[i];
579 label coarseElemI = targetRestrictAddressing[elemI];
584 newElems.
append(coarseElemI);
585 newWeights.
append(fineArea/coarseArea*weights[i]);
589 newWeights[index] += fineArea/coarseArea*weights[i];
597 template<
class SourcePatch,
class TargetPatch>
600 const SourcePatch& srcPatch,
601 const TargetPatch& tgtPatch,
610 SourcePatch srcPatch0
631 TargetPatch tgtPatch0
653 projectPointsToSurface(surfPtr(), srcPoints);
654 projectPointsToSurface(surfPtr(), tgtPoints);
658 update(srcPatch0, tgtPatch0, report);
662 update(srcPatch, tgtPatch, report);
669 template<
class SourcePatch,
class TargetPatch>
672 const SourcePatch& srcPatch,
673 const TargetPatch& tgtPatch,
675 const bool requireMatch,
677 const scalar lowWeightCorrection,
678 const bool reverseTarget,
682 methodName_(interpolationMethodToWord(method)),
683 reverseTarget_(reverseTarget),
684 requireMatch_(requireMatch),
685 singlePatchProc_(-999),
686 lowWeightCorrection_(lowWeightCorrection),
697 update(srcPatch, tgtPatch, report);
701 template<
class SourcePatch,
class TargetPatch>
704 const SourcePatch& srcPatch,
705 const TargetPatch& tgtPatch,
707 const bool requireMatch,
708 const word& methodName,
709 const scalar lowWeightCorrection,
710 const bool reverseTarget,
714 methodName_(methodName),
715 reverseTarget_(reverseTarget),
716 requireMatch_(requireMatch),
717 singlePatchProc_(-999),
718 lowWeightCorrection_(lowWeightCorrection),
729 update(srcPatch, tgtPatch, report);
733 template<
class SourcePatch,
class TargetPatch>
736 const SourcePatch& srcPatch,
737 const TargetPatch& tgtPatch,
740 const bool requireMatch,
742 const scalar lowWeightCorrection,
743 const bool reverseTarget,
747 methodName_(interpolationMethodToWord(method)),
748 reverseTarget_(reverseTarget),
749 requireMatch_(requireMatch),
750 singlePatchProc_(-999),
751 lowWeightCorrection_(lowWeightCorrection),
762 constructFromSurface(srcPatch, tgtPatch, surfPtr, report);
766 template<
class SourcePatch,
class TargetPatch>
769 const SourcePatch& srcPatch,
770 const TargetPatch& tgtPatch,
773 const bool requireMatch,
774 const word& methodName,
775 const scalar lowWeightCorrection,
776 const bool reverseTarget,
780 methodName_(methodName),
781 reverseTarget_(reverseTarget),
782 requireMatch_(requireMatch),
783 singlePatchProc_(-999),
784 lowWeightCorrection_(lowWeightCorrection),
795 constructFromSurface(srcPatch, tgtPatch, surfPtr, report);
799 template<
class SourcePatch,
class TargetPatch>
803 const labelList& sourceRestrictAddressing,
804 const labelList& targetRestrictAddressing,
808 methodName_(fineAMI.methodName_),
809 reverseTarget_(fineAMI.reverseTarget_),
810 requireMatch_(fineAMI.requireMatch_),
811 singlePatchProc_(fineAMI.singlePatchProc_),
812 lowWeightCorrection_(-1.0),
819 triMode_(fineAMI.triMode_),
823 label sourceCoarseSize =
825 sourceRestrictAddressing.
size()
826 ?
max(sourceRestrictAddressing)+1
830 label neighbourCoarseSize =
832 targetRestrictAddressing.
size()
833 ?
max(targetRestrictAddressing)+1
839 Pout<<
"AMI: Creating addressing and weights as agglomeration of AMI :" 842 <<
" coarse source size:" << sourceCoarseSize
843 <<
" neighbour source size:" << neighbourCoarseSize
854 <<
"Size mismatch." <<
nl 855 <<
"Source patch size:" << fineAMI.
srcAddress().size() <<
nl 856 <<
"Source agglomeration size:" 857 << sourceRestrictAddressing.
size() <<
nl 858 <<
"Target patch size:" << fineAMI.
tgtAddress().size() <<
nl 859 <<
"Target agglomeration size:" 860 << targetRestrictAddressing.
size()
872 sourceRestrictAddressing,
873 targetRestrictAddressing,
889 targetRestrictAddressing,
890 sourceRestrictAddressing,
903 reportSumWeights(*
this);
907 normaliseWeights(*
this);
914 template<
class SourcePatch,
class TargetPatch>
921 template<
class SourcePatch,
class TargetPatch>
924 const SourcePatch& srcPatch,
925 const TargetPatch& tgtPatch,
932 if (srcTotalSize == 0)
936 Info<<
"AMI: no source faces present - no addressing constructed" 946 <<
"AMI: Creating addressing and weights between " 947 << srcTotalSize <<
" source faces and " 948 << tgtTotalSize <<
" target faces" 953 srcMagSf_ = patchMagSf(srcPatch, triMode_);
954 tgtMagSf_ = patchMagSf(tgtPatch, triMode_);
957 singlePatchProc_ = calcDistribution(srcPatch, tgtPatch);
959 if (singlePatchProc_ == -1)
980 distributeAndMergePatches
1000 scalarField newTgtMagSf(patchMagSf(newTgtPatch, triMode_));
1014 requireMatch_ && (lowWeightCorrection_ < 0)
1041 forAll(addressing, addrI)
1043 addressing[addrI] = tgtFaceIDs[addressing[addrI]];
1050 forAll(addressing, addrI)
1052 addressing[addrI] = globalSrcFaces.toGlobal(addressing[addrI]);
1059 mapDistributeBase::distribute
1061 Pstream::commsTypes::nonBlocking,
1074 mapDistributeBase::distribute
1076 Pstream::commsTypes::nonBlocking,
1091 srcMapPtr_.reset(
new mapDistribute(globalSrcFaces, tgtAddress_, cMap));
1092 tgtMapPtr_.reset(
new mapDistribute(globalTgtFaces, srcAddress_, cMap));
1096 writeFaceConnectivity(srcPatch, newTgtPatch, srcAddress_);
1113 requireMatch_ && (lowWeightCorrection_ < 0)
1130 reportSumWeights(*
this);
1134 normaliseWeights(*
this);
1139 Info<<
"AMIInterpolation : Constructed addressing and weights" <<
nl 1141 << faceAreaIntersect::triangulationModeNames_[triMode_] <<
nl 1142 <<
" singlePatchProc:" << singlePatchProc_ <<
nl 1143 <<
" srcMagSf :" <<
gSum(srcMagSf_) <<
nl 1144 <<
" tgtMagSf :" <<
gSum(tgtMagSf_) <<
nl 1150 template<
class SourcePatch,
class TargetPatch>
1156 sumWeights(AMI.srcWeights_, AMI.srcWeightsSum_);
1157 sumWeights(AMI.tgtWeights_, AMI.tgtWeightsSum_);
1161 template<
class SourcePatch,
class TargetPatch>
1170 srcWeights.set(i, &AMIs[i].srcWeights_);
1173 sumWeights(srcWeights, AMIs[0].srcWeightsSum_);
1175 for (
label i = 1; i < AMIs.size(); ++ i)
1177 AMIs[i].srcWeightsSum_ = AMIs[0].srcWeightsSum_;
1183 tgtWeights.set(i, &AMIs[i].tgtWeights_);
1186 sumWeights(tgtWeights, AMIs[0].tgtWeightsSum_);
1188 for (
label i = 1; i < AMIs.size(); ++ i)
1190 AMIs[i].tgtWeightsSum_ = AMIs[0].tgtWeightsSum_;
1195 template<
class SourcePatch,
class TargetPatch>
1206 AMI.lowWeightCorrection_
1214 AMI.lowWeightCorrection_
1219 template<
class SourcePatch,
class TargetPatch>
1225 normaliseWeights(AMI.srcWeights_, AMI.srcWeightsSum_);
1226 normaliseWeights(AMI.tgtWeights_, AMI.tgtWeightsSum_);
1230 template<
class SourcePatch,
class TargetPatch>
1239 srcWeights.set(i, &AMIs[i].srcWeights_);
1242 normaliseWeights(srcWeights, AMIs[0].srcWeightsSum_);
1247 tgtWeights.set(i, &AMIs[i].tgtWeights_);
1250 normaliseWeights(tgtWeights, AMIs[0].tgtWeightsSum_);
1254 template<
class SourcePatch,
class TargetPatch>
1255 template<
class Type,
class CombineOp>
1259 const CombineOp& cop,
1264 if (fld.
size() != srcAddress_.size())
1267 <<
"Supplied field size is not equal to source patch size" <<
nl 1268 <<
" source patch = " << srcAddress_.size() <<
nl 1269 <<
" target patch = " << tgtAddress_.size() <<
nl 1270 <<
" supplied field = " << fld.
size()
1274 if (lowWeightCorrection_ > 0)
1276 if (defaultValues.
size() != tgtAddress_.size())
1279 <<
"Employing default values when sum of weights falls below " 1280 << lowWeightCorrection_
1281 <<
" but supplied default field size is not equal to target " 1282 <<
"patch size" <<
nl 1283 <<
" default values = " << defaultValues.
size() <<
nl 1284 <<
" target patch = " << tgtAddress_.size() <<
nl 1289 result.
setSize(tgtAddress_.size());
1291 if (singlePatchProc_ == -1)
1300 if (tgtWeightsSum_[facei] < lowWeightCorrection_)
1302 result[facei] = defaultValues[facei];
1306 const labelList& faces = tgtAddress_[facei];
1307 const scalarList& weights = tgtWeights_[facei];
1311 cop(result[facei], facei, work[faces[i]], weights[i]);
1320 if (tgtWeightsSum_[facei] < lowWeightCorrection_)
1322 result[facei] = defaultValues[facei];
1326 const labelList& faces = tgtAddress_[facei];
1327 const scalarList& weights = tgtWeights_[facei];
1331 cop(result[facei], facei, fld[faces[i]], weights[i]);
1339 template<
class SourcePatch,
class TargetPatch>
1340 template<
class Type,
class CombineOp>
1344 const CombineOp& cop,
1349 if (fld.
size() != tgtAddress_.size())
1352 <<
"Supplied field size is not equal to target patch size" <<
nl 1353 <<
" source patch = " << srcAddress_.size() <<
nl 1354 <<
" target patch = " << tgtAddress_.size() <<
nl 1355 <<
" supplied field = " << fld.
size()
1359 if (lowWeightCorrection_ > 0)
1361 if (defaultValues.
size() != srcAddress_.size())
1364 <<
"Employing default values when sum of weights falls below " 1365 << lowWeightCorrection_
1366 <<
" but supplied default field size is not equal to target " 1367 <<
"patch size" <<
nl 1368 <<
" default values = " << defaultValues.
size() <<
nl 1369 <<
" source patch = " << srcAddress_.size() <<
nl 1374 result.
setSize(srcAddress_.size());
1376 if (singlePatchProc_ == -1)
1385 if (srcWeightsSum_[facei] < lowWeightCorrection_)
1387 result[facei] = defaultValues[facei];
1391 const labelList& faces = srcAddress_[facei];
1392 const scalarList& weights = srcWeights_[facei];
1396 cop(result[facei], facei, work[faces[i]], weights[i]);
1405 if (srcWeightsSum_[facei] < lowWeightCorrection_)
1407 result[facei] = defaultValues[facei];
1411 const labelList& faces = srcAddress_[facei];
1412 const scalarList& weights = srcWeights_[facei];
1416 cop(result[facei], facei, fld[faces[i]], weights[i]);
1424 template<
class SourcePatch,
class TargetPatch>
1425 template<
class Type,
class CombineOp>
1430 const CombineOp& cop,
1455 template<
class SourcePatch,
class TargetPatch>
1456 template<
class Type,
class CombineOp>
1461 const CombineOp& cop,
1465 return interpolateToSource(tFld(), cop, defaultValues);
1469 template<
class SourcePatch,
class TargetPatch>
1470 template<
class Type,
class CombineOp>
1475 const CombineOp& cop,
1500 template<
class SourcePatch,
class TargetPatch>
1501 template<
class Type,
class CombineOp>
1506 const CombineOp& cop,
1510 return interpolateToTarget(tFld(), cop, defaultValues);
1514 template<
class SourcePatch,
class TargetPatch>
1515 template<
class Type>
1523 return interpolateToSource(fld,
plusEqOp<Type>(), defaultValues);
1527 template<
class SourcePatch,
class TargetPatch>
1528 template<
class Type>
1536 return interpolateToSource(tFld(),
plusEqOp<Type>(), defaultValues);
1540 template<
class SourcePatch,
class TargetPatch>
1541 template<
class Type>
1549 return interpolateToTarget(fld,
plusEqOp<Type>(), defaultValues);
1553 template<
class SourcePatch,
class TargetPatch>
1554 template<
class Type>
1562 return interpolateToTarget(tFld(),
plusEqOp<Type>(), defaultValues);
1566 template<
class SourcePatch,
class TargetPatch>
1569 const SourcePatch& srcPatch,
1570 const TargetPatch& tgtPatch,
1572 const label tgtFacei,
1577 const pointField& srcPoints = srcPatch.points();
1580 const labelList& addr = tgtAddress_[tgtFacei];
1584 label nearestFacei = -1;
1588 const label srcFacei = addr[i];
1589 const face&
f = srcPatch[srcFacei];
1601 nearestFacei = srcFacei;
1608 return nearestFacei;
1615 template<
class SourcePatch,
class TargetPatch>
1618 const SourcePatch& srcPatch,
1619 const TargetPatch& tgtPatch,
1621 const label srcFacei,
1626 const pointField& tgtPoints = tgtPatch.points();
1630 label nearestFacei = -1;
1633 const labelList& addr = srcAddress_[srcFacei];
1637 const label tgtFacei = addr[i];
1638 const face&
f = tgtPatch[tgtFacei];
1650 nearestFacei = tgtFacei;
1657 return nearestFacei;
1664 template<
class SourcePatch,
class TargetPatch>
1667 const SourcePatch& srcPatch,
1668 const TargetPatch& tgtPatch,
1680 const point& srcPt = srcPatch.faceCentres()[i];
1684 label tgtPtI = addr[j];
1685 const point& tgtPt = tgtPatch.faceCentres()[tgtPtI];
1690 os <<
"l " << ptI <<
" " << ptI + 1 <<
endl;
static word interpolationMethodToWord(const interpolationMethod &method)
Convert interpolationMethod to word representation.
Class containing functor to negate primitives. Dummy for all other types.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void reset(T *=nullptr)
If object pointer already set, delete object and set to given.
A face is a list of labels corresponding to mesh vertices.
const scalarListList & tgtWeights() const
Return const access to target patch weights.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type gMin(const FieldField< Field, Type > &f)
Xfer< List< T > > xfer()
Transfer contents to the Xfer container.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
T & ref() const
Return non-const reference or generate a fatal error.
const labelListList & subMap() const
From subsetted data back to original data.
void size(const label)
Override size to be inconsistent with allocated storage.
static interpolationMethod wordTointerpolationMethod(const word &method)
Convert word to interpolationMethod.
const labelListList & tgtAddress() const
Return const access to target patch addressing.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label tgtPointFace(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const vector &n, const label srcFacei, point &srcPoint) const
Return target patch face index of point on source patch face.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
label srcPointFace(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const vector &n, const label tgtFacei, point &tgtPoint) const
Return source patch face index of point on target patch face.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
interpolationMethod
Enumeration specifying interpolation method.
void writeFaceConnectivity(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const labelListList &srcAddress) const
Write face connectivity as OBJ file.
const scalarField & srcMagSf() const
Return const access to source patch face areas.
const Point & hitPoint() const
Return hit point.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A List obtained as a section of another List.
pointHit ray(const point &p, const vector &n, const pointField &, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Return potential intersection with face with a ray starting.
void setDistance(const scalar d)
Type gSum(const FieldField< Field, Type > &f)
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const =0
A class for handling words, derived from string.
void append(const T &)
Append an element at the end of the list.
List< scalar > scalarList
A List of scalars.
bool hit() const
Is there a hit.
bool hit() const
Is there a hit.
List< label > labelList
A List of labels.
~AMIInterpolation()
Destructor.
void interpolateToTarget(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from source to target with supplied op.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
errorManip< error > abort(error &err)
Base class for Arbitrary Mesh Interface (AMI) methods.
volScalarField scalarField(fieldObject, mesh)
const scalarListList & srcWeights() const
Return const access to source patch weights.
Type gMax(const FieldField< Field, Type > &f)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
word name(const complex &)
Return a string representation of a complex.
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from target to source with supplied op.
label constructSize() const
Constructed data size.
void setSize(const label)
Reset size of List.
Class containing processor-to-processor mapping information.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Input from memory buffer stream.
prefixOSstream Pout(cout, "Pout")
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
triangle< point, const point & > triPointRef
const labelListList & constructMap() const
From subsetted data to new reconstructed data.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Helper class for list to append y onto the end of x.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
scalar distance() const
Return distance to hit.
A class for managing temporary objects.
void update(const SourcePatch &srcPatch, const TargetPatch &tgtPatch, const bool report)
Update addressing and weights.
bool eligibleMiss() const
Is this an eligible miss.
label size() const
Return the number of elements in the UList.
const labelListList & srcAddress() const
Return const access to source patch addressing.
static const label labelMin
const scalarField & tgtMagSf() const
Return const access to target patch face areas.
Tuple2< scalar, label > nearInfo
Private class for finding nearest.
static tmp< scalarField > patchMagSf(const Patch &patch, const faceAreaIntersect::triangulationMode triMode)
Calculate the patch face magnitudes for the given tri-mode.