mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
cyclicRepeatAMI: Added error message for zero-sized transform patch
Sometimes decomposition can remove a cyclic patch entirely, converting it into a processor cyclic. If this patch is being used to specify the transform for a cyclicRepeatAMI patch then the calculation will fail. This change adds a check for this situation, and errors with the suggestion that the transform patch be preserved during decomposition.
This commit is contained in:
@ -82,8 +82,9 @@ void Foam::cyclicRepeatAMIPolyPatch::resetAMI() const
|
||||
}
|
||||
|
||||
Info<< indent << typeName <<" : Creating addressing and weights between "
|
||||
<< this->size() << " source faces and " << neighbPatch().size()
|
||||
<< " target faces" << endl;
|
||||
<< returnReduce(this->size(), sumOp<label>()) << " source faces and "
|
||||
<< returnReduce(neighbPatch().size(), sumOp<label>()) << " target faces"
|
||||
<< endl;
|
||||
|
||||
// Get the transform associated with the transform patch
|
||||
vectorTensorTransform t;
|
||||
@ -129,6 +130,17 @@ void Foam::cyclicRepeatAMIPolyPatch::resetAMI() const
|
||||
|
||||
reduce(bt, keepIfTrueOp<vectorTensorTransform>());
|
||||
|
||||
if (!bt.first())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Transform patch " << transformPatch.name() << " for "
|
||||
<< typeName << " patch " << name() << " has zero faces. It may "
|
||||
<< "have been converted to a processor cyclic during "
|
||||
<< "decomposition. Consider adding " << transformPatch.name()
|
||||
<< " and it's neighbour to the list of preserved patches."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
t = bt.second();
|
||||
}
|
||||
const vectorTensorTransform tInv(inv(t));
|
||||
|
||||
Reference in New Issue
Block a user