mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Patches contributed by Mattijs Janssens:
splitMeshRegions: handle flipping of faces for surface fields
subsetMesh: subset dimensionedFields
decomposePar: use run-time selection of decomposition constraints. Used to
keep cells on particular processors. See the decomposeParDict in
$FOAM_UTILITIES/parallel/decomposePar:
- preserveBaffles: keep baffle faces on same processor
- preserveFaceZones: keep faceZones owner and neighbour on same processor
- preservePatches: keep owner and neighbour on same processor. Note: not
suitable for cyclicAMI since these are not coupled on the patch level
- singleProcessorFaceSets: keep complete faceSet on a single processor
- refinementHistory: keep cells originating from a single cell on the
same processor.
decomposePar: clean up decomposition of refinement data from snappyHexMesh
reconstructPar: reconstruct refinement data (refineHexMesh, snappyHexMesh)
reconstructParMesh: reconstruct refinement data (refineHexMesh, snappyHexMesh)
redistributePar:
- corrected mapping surfaceFields
- adding processor patches in order consistent with decomposePar
argList: check that slaves are running same version as master
fvMeshSubset: move to dynamicMesh library
fvMeshDistribute:
- support for mapping dimensionedFields
- corrected mapping of surfaceFields
parallel routines: allow parallel running on single processor
Field: support for
- distributed mapping
- mapping with flipping
mapDistribute: support for flipping
AMIInterpolation: avoid constructing localPoints
This commit is contained in:
@ -27,6 +27,7 @@ License
|
||||
#include "AMIMethod.H"
|
||||
#include "meshTools.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "flipOp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -933,7 +934,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
tgtMagSf_,
|
||||
triMode_,
|
||||
reverseTarget_,
|
||||
requireMatch_
|
||||
requireMatch_ && (lowWeightCorrection_ < 0)
|
||||
)
|
||||
);
|
||||
|
||||
@ -978,27 +979,33 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
// send data back to originating procs. Note that contributions
|
||||
// from different processors get added (ListAppendEqOp)
|
||||
|
||||
mapDistribute::distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(),
|
||||
tgtPatch.size(),
|
||||
map.constructMap(),
|
||||
false, // has flip
|
||||
map.subMap(),
|
||||
false, // has flip
|
||||
tgtAddress_,
|
||||
ListAppendEqOp<label>(),
|
||||
flipOp(), // flip operation
|
||||
labelList()
|
||||
);
|
||||
|
||||
mapDistribute::distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::nonBlocking,
|
||||
List<labelPair>(),
|
||||
tgtPatch.size(),
|
||||
map.constructMap(),
|
||||
false,
|
||||
map.subMap(),
|
||||
false,
|
||||
tgtWeights_,
|
||||
ListAppendEqOp<scalar>(),
|
||||
flipOp(),
|
||||
scalarList()
|
||||
);
|
||||
|
||||
@ -1050,7 +1057,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
|
||||
tgtMagSf_,
|
||||
triMode_,
|
||||
reverseTarget_,
|
||||
requireMatch_
|
||||
requireMatch_ && (lowWeightCorrection_ < 0)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -97,7 +97,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcOverlappingProcs
|
||||
|
||||
forAll(procBb, proci)
|
||||
{
|
||||
const List<treeBoundBox>& bbs = procBb[proci];
|
||||
const treeBoundBoxList& bbs = procBb[proci];
|
||||
|
||||
forAll(bbs, bbI)
|
||||
{
|
||||
|
||||
@ -200,7 +200,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::resetTree()
|
||||
// Clear the old octree
|
||||
treePtr_.clear();
|
||||
|
||||
treeBoundBox bb(tgtPatch_.points());
|
||||
treeBoundBox bb(tgtPatch_.points(), tgtPatch_.meshPoints());
|
||||
bb.inflate(0.01);
|
||||
|
||||
if (!treePtr_.valid())
|
||||
|
||||
@ -310,16 +310,14 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate
|
||||
forAll(srcAddr, i)
|
||||
{
|
||||
scalar magSf = this->srcMagSf_[i];
|
||||
// srcWeights[i] = scalarList(srcAddr[i].size(), magSf);
|
||||
srcWeights[i] = scalarList(1, magSf);
|
||||
srcAddress[i].transfer(srcAddr[i]);
|
||||
srcWeights[i] = scalarList(1, magSf);
|
||||
}
|
||||
forAll(tgtAddr, i)
|
||||
{
|
||||
scalar magSf = this->tgtMagSf_[i];
|
||||
// tgtWeights[i] = scalarList(tgtAddr[i].size(), magSf);
|
||||
tgtWeights[i] = scalarList(1, magSf);
|
||||
tgtAddress[i].transfer(tgtAddr[i]);
|
||||
tgtWeights[i] = scalarList(1, magSf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -61,15 +61,18 @@ void Foam::mappedPatchBase::distribute
|
||||
}
|
||||
default:
|
||||
{
|
||||
map().distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::defaultCommsType,
|
||||
map().schedule(),
|
||||
map().constructSize(),
|
||||
map().subMap(),
|
||||
false,
|
||||
map().constructMap(),
|
||||
false,
|
||||
lst,
|
||||
cop,
|
||||
flipOp(),
|
||||
Type(Zero)
|
||||
);
|
||||
}
|
||||
@ -117,15 +120,18 @@ void Foam::mappedPatchBase::reverseDistribute
|
||||
default:
|
||||
{
|
||||
label cSize = sampleSize();
|
||||
map().distribute
|
||||
mapDistributeBase::distribute
|
||||
(
|
||||
Pstream::defaultCommsType,
|
||||
map().schedule(),
|
||||
cSize,
|
||||
map().constructMap(),
|
||||
false,
|
||||
map().subMap(),
|
||||
false,
|
||||
lst,
|
||||
cop,
|
||||
flipOp(),
|
||||
Type(Zero)
|
||||
);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user