mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: fvFieldReconstructorReconstructFields.C: handle face flip of internal faces
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -377,18 +377,24 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField
|
|||||||
// take care of the face direction offset trick.
|
// take care of the face direction offset trick.
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
labelList curAddr(faceProcAddressing_[procI]);
|
const labelList& faceMap = faceProcAddressing_[procI];
|
||||||
|
|
||||||
forAll(curAddr, addrI)
|
// Addressing into original field
|
||||||
|
labelList curAddr(faceMap.size());
|
||||||
|
// Correctly oriented copy of internal field
|
||||||
|
Field<Type> procInternalField(procField.internalField());
|
||||||
|
|
||||||
|
forAll(faceMap, addrI)
|
||||||
{
|
{
|
||||||
curAddr[addrI] -= 1;
|
curAddr[addrI] = mag(faceMap[addrI])-1;
|
||||||
|
if (faceMap[addrI] < 0)
|
||||||
|
{
|
||||||
|
procInternalField[addrI] = -procInternalField[addrI];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internalField.rmap
|
// Map
|
||||||
(
|
internalField.rmap(procInternalField, curAddr);
|
||||||
procField.internalField(),
|
|
||||||
curAddr
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the boundary patch values in the reconstructed field
|
// Set the boundary patch values in the reconstructed field
|
||||||
|
|||||||
Reference in New Issue
Block a user