Bugfix: Finite Area bugfixes + WedgePointPatchField bugfix. Vanja Skuric
This commit is contained in:
commit
3b612e6748
5 changed files with 253 additions and 233 deletions
|
@ -422,12 +422,13 @@ void faMatrix<Type>::setValues
|
|||
}
|
||||
else
|
||||
{
|
||||
label patchi = mesh.boundary().whichPatch(edgei);
|
||||
const label& curEdgeIndex = mesh.edgeIndex()[edgei];
|
||||
label patchi = mesh.boundary().whichPatch(curEdgeIndex);
|
||||
|
||||
if (internalCoeffs_[patchi].size())
|
||||
{
|
||||
label patchEdgei =
|
||||
mesh.boundary()[patchi].whichEdge(edgei);
|
||||
mesh.boundary()[patchi].whichEdge(curEdgeIndex);
|
||||
|
||||
internalCoeffs_[patchi][patchEdgei] =
|
||||
pTraits<Type>::zero;
|
||||
|
|
|
@ -71,6 +71,7 @@ void Foam::faMesh::setPrimitiveMeshData()
|
|||
|
||||
// Set faMesh edges
|
||||
edges_.setSize(bp.nEdges());
|
||||
edgeIndex_.setSize(bp.nEdges());
|
||||
|
||||
label edgeI = -1;
|
||||
|
||||
|
@ -80,6 +81,7 @@ void Foam::faMesh::setPrimitiveMeshData()
|
|||
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
|
||||
{
|
||||
edges_[++edgeI] = bp.edges()[curEdge];
|
||||
edgeIndex_[curEdge] = edgeI;
|
||||
}
|
||||
|
||||
forAll (boundary(), patchI)
|
||||
|
@ -89,6 +91,7 @@ void Foam::faMesh::setPrimitiveMeshData()
|
|||
forAll (curP, eI)
|
||||
{
|
||||
edges_[++edgeI] = bp.edges()[curP[eI]];
|
||||
edgeIndex_[curP[eI]] = edgeI;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,6 +82,9 @@ class faMesh
|
|||
//- Boundary mesh
|
||||
faBoundaryMesh boundary_;
|
||||
|
||||
//- Edge index
|
||||
labelList edgeIndex_;
|
||||
|
||||
|
||||
// Primitive mesh data
|
||||
|
||||
|
@ -397,6 +400,11 @@ public:
|
|||
return faceLabels_;
|
||||
}
|
||||
|
||||
//- Return faMesh edge indices
|
||||
const labelList& edgeIndex() const
|
||||
{
|
||||
return edgeIndex_;
|
||||
}
|
||||
|
||||
//- Return parallel info
|
||||
const faGlobalMeshData& globalData() const;
|
||||
|
|
|
@ -1185,7 +1185,11 @@ void faMesh::calcPointAreaNormals() const
|
|||
// Processor patch points correction
|
||||
forAll (boundary(), patchI)
|
||||
{
|
||||
if(boundary()[patchI].type() == processorFaPatch::typeName)
|
||||
if
|
||||
(
|
||||
Pstream::parRun()
|
||||
&& boundary()[patchI].type() == processorFaPatch::typeName
|
||||
)
|
||||
{
|
||||
const processorFaPatch& procPatch =
|
||||
refCast<const processorFaPatch>(boundary()[patchI]);
|
||||
|
|
|
@ -201,6 +201,9 @@ WedgePointPatchField
|
|||
(
|
||||
const Pstream::commsTypes commsType
|
||||
)
|
||||
{
|
||||
// ZT, 26/02/2017: Size of the patch could be zero in parallel runs
|
||||
if (this->patch().meshPoints().size())
|
||||
{
|
||||
// In order to ensure that the wedge patch is always flat, take the
|
||||
// normal vector from the first point
|
||||
|
@ -221,6 +224,7 @@ WedgePointPatchField
|
|||
iF[meshPoints[pointI]] = values[pointI];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
Reference in a new issue