mappedPatchBase: Added patchToPatch as a sampling mode
This mode uses the patchToPatch system (the same one used by NCC) for
coupling two patches. It can be selected for a patch (e.g., in a
blockMeshDict) in the following way:
fluid_to_solid
{
type mappedWall;
sampleMode patchToPatch;
sampleRegion solid;
samplePatch solid_to_fluid;
patchToPatchMode intersection;
faces
(
(0 1 2 3)
...
);
}
The "patchToPatchMode" can be one of the following:
"intersection": Values obtained by weighting contributions from
sampled faces with the intersected area between the faces.
Equivalent to the nearestPatchFaceAMI sampleMode (which will be
removed in a future commit).
"inverseDistance": Values obtained by inverse-distance weighting
between a small stencil of nearby sampled faces.
"nearest": Take the value from the nearest sampled face.
"matching": As nearest, but with checks to ensure that the mapping
is one-to-one. To be used for mapping between identical patches.
The intention is that patchToPatch will become the only sampleMode, and
the four options above will become the options which determine how
mapping is performed. Cell-to-patch mapping will be transferred into a
separate class as its use cases essentially never intersect with those
of patch-to-patch mapping.
This commit is contained in:
@ -75,7 +75,7 @@ public:
|
||||
part()
|
||||
:
|
||||
area(Zero),
|
||||
centre(point::uniform(NaN))
|
||||
centre(NaN<point>())
|
||||
{}
|
||||
|
||||
//- Default construct
|
||||
@ -210,6 +210,9 @@ private:
|
||||
//- The coupling geometry for for each source face
|
||||
List<DynamicList<couple>> srcCouples_;
|
||||
|
||||
//- The proportion of the source faces that are coupled
|
||||
List<scalar> srcCoverage_;
|
||||
|
||||
//- The non-coupled geometry associated with each source edge
|
||||
List<part> srcEdgeParts_;
|
||||
|
||||
@ -220,6 +223,9 @@ private:
|
||||
//- The coupling geometry for for each target face
|
||||
List<DynamicList<couple>> tgtCouples_;
|
||||
|
||||
//- The proportion of the target faces that are coupled
|
||||
List<scalar> tgtCoverage_;
|
||||
|
||||
|
||||
//- Triangulation engine
|
||||
mutable polygonTriangulate triEngine_;
|
||||
@ -325,11 +331,7 @@ private:
|
||||
//- Send data that resulted from an intersection between the source
|
||||
// patch and a distributed source-local-target patch back to the
|
||||
// original target processes.
|
||||
virtual void rDistributeTgt
|
||||
(
|
||||
const primitiveOldTimePatch& tgtPatch,
|
||||
const distributionMap& tgtMap
|
||||
);
|
||||
virtual void rDistributeTgt(const primitiveOldTimePatch& tgtPatch);
|
||||
|
||||
//- Finalise the intersection
|
||||
virtual label finalise
|
||||
@ -341,6 +343,12 @@ private:
|
||||
const transformer& tgtToSrc
|
||||
);
|
||||
|
||||
//- For each source face, the coupled target weights
|
||||
virtual tmpNrc<List<DynamicList<scalar>>> srcWeights() const;
|
||||
|
||||
//- For each target face, the coupled source weights
|
||||
virtual tmpNrc<List<DynamicList<scalar>>> tgtWeights() const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -393,18 +401,6 @@ public:
|
||||
//- For each target face, the target and source areas for each
|
||||
// source coupling
|
||||
inline const List<DynamicList<couple>>& tgtCouples() const;
|
||||
|
||||
//- For each source face, the coupled target weights
|
||||
virtual tmpNrc<List<DynamicList<scalar>>> srcWeights
|
||||
(
|
||||
const primitivePatch& srcPatch
|
||||
) const;
|
||||
|
||||
//- For each target face, the coupled source weights
|
||||
virtual tmpNrc<List<DynamicList<scalar>>> tgtWeights
|
||||
(
|
||||
const primitivePatch& tgtPatch
|
||||
) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user