mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: GAMGInterface: additional checking
This commit is contained in:
@ -83,6 +83,27 @@ Foam::tmp<Foam::scalarField> Foam::GAMGInterface::agglomerateCoeffs
|
|||||||
tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0));
|
tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0));
|
||||||
scalarField& coarseCoeffs = tcoarseCoeffs();
|
scalarField& coarseCoeffs = tcoarseCoeffs();
|
||||||
|
|
||||||
|
if (fineCoeffs.size() != faceRestrictAddressing_.size())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"GAMGInterface::agglomerateCoeffs(const scalarField&) const"
|
||||||
|
) << "Size of coefficients " << fineCoeffs.size()
|
||||||
|
<< " does not correspond to the size of the restriction "
|
||||||
|
<< faceRestrictAddressing_.size()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
if (debug && max(faceRestrictAddressing_) > size())
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"GAMGInterface::agglomerateCoeffs(const scalarField&) const"
|
||||||
|
) << "Face restrict addressing addresses outside of coarse interface"
|
||||||
|
<< " size. Max addressing:" << max(faceRestrictAddressing_)
|
||||||
|
<< " coarse size:" << size()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
forAll(faceRestrictAddressing_, ffi)
|
forAll(faceRestrictAddressing_, ffi)
|
||||||
{
|
{
|
||||||
coarseCoeffs[faceRestrictAddressing_[ffi]] += fineCoeffs[ffi];
|
coarseCoeffs[faceRestrictAddressing_[ffi]] += fineCoeffs[ffi];
|
||||||
|
|||||||
@ -224,7 +224,7 @@ public:
|
|||||||
return faceCells_;
|
return faceCells_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return face restrict addressing
|
//- Return (local)face restrict addressing
|
||||||
virtual const labelList& faceRestrictAddressing() const
|
virtual const labelList& faceRestrictAddressing() const
|
||||||
{
|
{
|
||||||
return faceRestrictAddressing_;
|
return faceRestrictAddressing_;
|
||||||
|
|||||||
Reference in New Issue
Block a user