Merge remote-tracking branch 'origin/hotfix/gcc47' into nextRelease
Conflicts: src/OpenFOAM/fields/PointPatchFields/constraint/processor/ProcessorPointPatchField.C
This commit is contained in:
commit
62f43224bd
2 changed files with 79 additions and 180 deletions
|
@ -962,8 +962,7 @@ initInterfaceMatrixUpdate
|
||||||
const lduMatrix& m,
|
const lduMatrix& m,
|
||||||
const scalarField& coeffs,
|
const scalarField& coeffs,
|
||||||
const direction,
|
const direction,
|
||||||
const Pstream::commsTypes commsType,
|
const Pstream::commsTypes commsType
|
||||||
const bool switchToLhs
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
tmp<scalarField> tlocalMult(new scalarField(this->size(), 0));
|
tmp<scalarField> tlocalMult(new scalarField(this->size(), 0));
|
||||||
|
@ -987,191 +986,95 @@ initInterfaceMatrixUpdate
|
||||||
// use the counter.
|
// use the counter.
|
||||||
label coeffI = 0;
|
label coeffI = 0;
|
||||||
|
|
||||||
if (switchToLhs)
|
// Owner side
|
||||||
|
// ~~~~~~~~~~
|
||||||
{
|
{
|
||||||
// Owner side
|
const labelList& cutOwn = procPatch_.cutEdgeOwnerIndices();
|
||||||
// ~~~~~~~~~~
|
const labelList& cutOwnStart = procPatch_.cutEdgeOwnerStart();
|
||||||
{
|
|
||||||
const labelList& cutOwn = procPatch_.cutEdgeOwnerIndices();
|
|
||||||
const labelList& cutOwnStart = procPatch_.cutEdgeOwnerStart();
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
|
||||||
{
|
|
||||||
label ownIndex = cutOwnStart[pointI];
|
|
||||||
label endOwn = cutOwnStart[pointI + 1];
|
|
||||||
|
|
||||||
for (; ownIndex < endOwn; ownIndex++)
|
|
||||||
{
|
|
||||||
localMult[pointI] +=
|
|
||||||
coeffs[coeffI]*psiInternal[U[cutOwn[ownIndex]]];
|
|
||||||
|
|
||||||
// Multiply the internal side as well using the cut mask
|
|
||||||
result[U[cutOwn[ownIndex]]] -=
|
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
|
||||||
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Neighbour side
|
|
||||||
// ~~~~~~~~~~~~~~
|
|
||||||
{
|
|
||||||
const labelList& cutNei = procPatch_.cutEdgeNeighbourIndices();
|
|
||||||
const labelList& cutNeiStart = procPatch_.cutEdgeNeighbourStart();
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
|
||||||
{
|
|
||||||
label neiIndex = cutNeiStart[pointI];
|
|
||||||
label endNei = cutNeiStart[pointI + 1];
|
|
||||||
|
|
||||||
for (; neiIndex < endNei; neiIndex++)
|
|
||||||
{
|
|
||||||
localMult[pointI] +=
|
|
||||||
coeffs[coeffI]*psiInternal[L[cutNei[neiIndex]]];
|
|
||||||
|
|
||||||
// Multiply the internal side as well using the cut mask
|
|
||||||
result[L[cutNei[neiIndex]]] -=
|
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
|
||||||
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doubly cut coefficients
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// There exists a possibility of having an internal edge for a
|
|
||||||
// point on the processor patch which is in fact connected to
|
|
||||||
// another point of the same patch. This particular nastiness
|
|
||||||
// introduces a deformation in the solution because the edge is
|
|
||||||
// either multiplied twice or not at all. For this purpose, the
|
|
||||||
// offending edges need to be separated out and multiplied
|
|
||||||
// appropriately. This will only happen for cell tetrahedral
|
|
||||||
// decomposition and is generally nasty.
|
|
||||||
// No need for cut mask here
|
|
||||||
{
|
|
||||||
const labelList& doubleCut = procPatch_.doubleCutEdgeIndices();
|
|
||||||
|
|
||||||
const labelList& doubleCutOwner = procPatch_.doubleCutOwner();
|
|
||||||
const labelList& doubleCutNeighbour =
|
|
||||||
procPatch_.doubleCutNeighbour();
|
|
||||||
|
|
||||||
forAll (doubleCut, edgeI)
|
|
||||||
{
|
|
||||||
// Owner side
|
|
||||||
localMult[doubleCutOwner[edgeI]] +=
|
|
||||||
coeffs[coeffI]*psiInternal[U[doubleCut[edgeI]]];
|
|
||||||
coeffI++;
|
|
||||||
|
|
||||||
// Neighbour side
|
|
||||||
localMult[doubleCutNeighbour[edgeI]] +=
|
|
||||||
coeffs[coeffI]*psiInternal[L[doubleCut[edgeI]]];
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the local multiplication to this side as well
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
forAll (mp, pointI)
|
||||||
{
|
{
|
||||||
result[mp[pointI]] -= localMult[pointI];
|
label ownIndex = cutOwnStart[pointI];
|
||||||
|
label endOwn = cutOwnStart[pointI + 1];
|
||||||
|
|
||||||
|
for (; ownIndex < endOwn; ownIndex++)
|
||||||
|
{
|
||||||
|
localMult[pointI] +=
|
||||||
|
coeffs[coeffI]*psiInternal[U[cutOwn[ownIndex]]];
|
||||||
|
|
||||||
|
// Multiply the internal side as well using the cut mask
|
||||||
|
result[U[cutOwn[ownIndex]]] +=
|
||||||
|
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
||||||
|
|
||||||
|
coeffI++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Neighbour side
|
||||||
|
// ~~~~~~~~~~~~~~
|
||||||
{
|
{
|
||||||
// Owner side
|
const labelList& cutNei = procPatch_.cutEdgeNeighbourIndices();
|
||||||
// ~~~~~~~~~~
|
const labelList& cutNeiStart = procPatch_.cutEdgeNeighbourStart();
|
||||||
{
|
|
||||||
const labelList& cutOwn = procPatch_.cutEdgeOwnerIndices();
|
|
||||||
const labelList& cutOwnStart = procPatch_.cutEdgeOwnerStart();
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
|
||||||
{
|
|
||||||
label ownIndex = cutOwnStart[pointI];
|
|
||||||
label endOwn = cutOwnStart[pointI + 1];
|
|
||||||
|
|
||||||
for (; ownIndex < endOwn; ownIndex++)
|
|
||||||
{
|
|
||||||
localMult[pointI] +=
|
|
||||||
coeffs[coeffI]*psiInternal[U[cutOwn[ownIndex]]];
|
|
||||||
|
|
||||||
// Multiply the internal side as well using the cut mask
|
|
||||||
result[U[cutOwn[ownIndex]]] +=
|
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
|
||||||
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Neighbour side
|
|
||||||
// ~~~~~~~~~~~~~~
|
|
||||||
{
|
|
||||||
const labelList& cutNei = procPatch_.cutEdgeNeighbourIndices();
|
|
||||||
const labelList& cutNeiStart = procPatch_.cutEdgeNeighbourStart();
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
|
||||||
{
|
|
||||||
label neiIndex = cutNeiStart[pointI];
|
|
||||||
label endNei = cutNeiStart[pointI + 1];
|
|
||||||
|
|
||||||
for (; neiIndex < endNei; neiIndex++)
|
|
||||||
{
|
|
||||||
localMult[pointI] +=
|
|
||||||
coeffs[coeffI]*psiInternal[L[cutNei[neiIndex]]];
|
|
||||||
|
|
||||||
// Multiply the internal side as well using the cut mask
|
|
||||||
result[L[cutNei[neiIndex]]] +=
|
|
||||||
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
|
||||||
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Doubly cut coefficients
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
// There exists a possibility of having an internal edge for a
|
|
||||||
// point on the processor patch which is in fact connected to
|
|
||||||
// another point of the same patch. This particular nastiness
|
|
||||||
// introduces a deformation in the solution because the edge is
|
|
||||||
// either multiplied twice or not at all. For this purpose, the
|
|
||||||
// offending edges need to be separated out and multiplied
|
|
||||||
// appropriately. This will only happen for cell tetrahedral
|
|
||||||
// decomposition and is generally nasty.
|
|
||||||
// No need for cut mask here
|
|
||||||
{
|
|
||||||
const labelList& doubleCut = procPatch_.doubleCutEdgeIndices();
|
|
||||||
|
|
||||||
const labelList& doubleCutOwner = procPatch_.doubleCutOwner();
|
|
||||||
const labelList& doubleCutNeighbour =
|
|
||||||
procPatch_.doubleCutNeighbour();
|
|
||||||
|
|
||||||
forAll (doubleCut, edgeI)
|
|
||||||
{
|
|
||||||
// Owner side
|
|
||||||
localMult[doubleCutOwner[edgeI]] +=
|
|
||||||
coeffs[coeffI]*psiInternal[U[doubleCut[edgeI]]];
|
|
||||||
coeffI++;
|
|
||||||
|
|
||||||
// Neighbour side
|
|
||||||
localMult[doubleCutNeighbour[edgeI]] +=
|
|
||||||
coeffs[coeffI]*psiInternal[L[doubleCut[edgeI]]];
|
|
||||||
coeffI++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the local multiplication to this side as well
|
|
||||||
|
|
||||||
forAll (mp, pointI)
|
forAll (mp, pointI)
|
||||||
{
|
{
|
||||||
result[mp[pointI]] += localMult[pointI];
|
label neiIndex = cutNeiStart[pointI];
|
||||||
|
label endNei = cutNeiStart[pointI + 1];
|
||||||
|
|
||||||
|
for (; neiIndex < endNei; neiIndex++)
|
||||||
|
{
|
||||||
|
localMult[pointI] +=
|
||||||
|
coeffs[coeffI]*psiInternal[L[cutNei[neiIndex]]];
|
||||||
|
|
||||||
|
// Multiply the internal side as well using the cut mask
|
||||||
|
result[L[cutNei[neiIndex]]] +=
|
||||||
|
cutMask[coeffI]*coeffs[coeffI]*psiInternal[mp[pointI]];
|
||||||
|
|
||||||
|
coeffI++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Doubly cut coefficients
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// There exists a possibility of having an internal edge for a
|
||||||
|
// point on the processor patch which is in fact connected to
|
||||||
|
// another point of the same patch. This particular nastiness
|
||||||
|
// introduces a deformation in the solution because the edge is
|
||||||
|
// either multiplied twice or not at all. For this purpose, the
|
||||||
|
// offending edges need to be separated out and multiplied
|
||||||
|
// appropriately. This will only happen for cell tetrahedral
|
||||||
|
// decomposition and is generally nasty.
|
||||||
|
// No need for cut mask here
|
||||||
|
{
|
||||||
|
const labelList& doubleCut = procPatch_.doubleCutEdgeIndices();
|
||||||
|
|
||||||
|
const labelList& doubleCutOwner = procPatch_.doubleCutOwner();
|
||||||
|
const labelList& doubleCutNeighbour = procPatch_.doubleCutNeighbour();
|
||||||
|
|
||||||
|
forAll (doubleCut, edgeI)
|
||||||
|
{
|
||||||
|
// Owner side
|
||||||
|
localMult[doubleCutOwner[edgeI]] +=
|
||||||
|
coeffs[coeffI]*psiInternal[U[doubleCut[edgeI]]];
|
||||||
|
coeffI++;
|
||||||
|
|
||||||
|
// Neighbour side
|
||||||
|
localMult[doubleCutNeighbour[edgeI]] +=
|
||||||
|
coeffs[coeffI]*psiInternal[L[doubleCut[edgeI]]];
|
||||||
|
coeffI++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add the local multiplication to this side as well
|
||||||
|
|
||||||
|
forAll (mp, pointI)
|
||||||
|
{
|
||||||
|
result[mp[pointI]] += localMult[pointI];
|
||||||
|
}
|
||||||
|
|
||||||
// Send the localMult
|
// Send the localMult
|
||||||
sendField(tlocalMult, commsType);
|
sendField(tlocalMult, commsType);
|
||||||
}
|
}
|
||||||
|
@ -1197,13 +1100,9 @@ updateInterfaceMatrix
|
||||||
const lduMatrix&,
|
const lduMatrix&,
|
||||||
const scalarField&,
|
const scalarField&,
|
||||||
const direction,
|
const direction,
|
||||||
const Pstream::commsTypes commsType,
|
const Pstream::commsTypes commsType
|
||||||
const bool switchToLhs
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Switch to lhs handled in init
|
|
||||||
// HJ, 22/May/2013
|
|
||||||
|
|
||||||
// Get the neighbour side multiplication
|
// Get the neighbour side multiplication
|
||||||
tmp<scalarField> tneiMult = receivePointField<scalar>(commsType);
|
tmp<scalarField> tneiMult = receivePointField<scalar>(commsType);
|
||||||
this->addToInternalField(result, tneiMult());
|
this->addToInternalField(result, tneiMult());
|
||||||
|
|
|
@ -317,7 +317,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||||
);
|
);
|
||||||
|
|
||||||
// Clac mass and enthalpy transfer due to surface reactions
|
// Clac mass and enthalpy transfer due to surface reactions
|
||||||
calcSurfaceReactions
|
this->calcSurfaceReactions
|
||||||
(
|
(
|
||||||
td,
|
td,
|
||||||
dt,
|
dt,
|
||||||
|
|
Reference in a new issue