ENH: Updated Info, Warning and Error messages

This commit is contained in:
Andrew Heather
2015-12-08 11:15:39 +00:00
parent ae95edeea4
commit eafd5a3850
94 changed files with 351 additions and 1040 deletions

View File

@ -199,7 +199,7 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
if (mag(srcVol) > ROOTVSMALL && mag((tgtVol-srcVol)/srcVol) > 1e-6)
{
WarningIn("cellVolumeWeightMethod::calculateAddressing(..)")
WarningInFunction
<< "At cell " << cellI << " cc:"
<< src_.cellCentres()[cellI]
<< " vol:" << srcVol
@ -215,7 +215,7 @@ void Foam::cellVolumeWeightMethod::calculateAddressing
if (mag(tgtVol) > ROOTVSMALL && mag((srcVol-tgtVol)/tgtVol) > 1e-6)
{
WarningIn("cellVolumeWeightMethod::calculateAddressing(..)")
WarningInFunction
<< "At cell " << cellI << " cc:"
<< tgt_.cellCentres()[cellI]
<< " vol:" << tgtVol

View File

@ -164,10 +164,8 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
if (mag(srcVol) > ROOTVSMALL && mag((tgtVol-srcVol)/srcVol) > 1e-6)
{
WarningIn
(
"correctedCellVolumeWeightMethod::calculateAddressing(..)"
) << "At cell " << cellI << " cc:"
WarningInFunction
<< "At cell " << cellI << " cc:"
<< src_.cellCentres()[cellI]
<< " vol:" << srcVol
<< " total overlap volume:" << tgtVol
@ -182,10 +180,8 @@ void Foam::correctedCellVolumeWeightMethod::calculateAddressing
if (mag(tgtVol) > ROOTVSMALL && mag((srcVol-tgtVol)/tgtVol) > 1e-6)
{
WarningIn
(
"correctedCellVolumeWeightMethod::calculateAddressing(..)"
) << "At cell " << cellI << " cc:"
WarningInFunction
<< "At cell " << cellI << " cc:"
<< tgt_.cellCentres()[cellI]
<< " vol:" << tgtVol
<< " total overlap volume:" << srcVol

View File

@ -87,11 +87,8 @@ public:
if ((singlePatchProc_ == -1) != (distMapPtr_ != NULL))
{
FatalErrorIn
(
"distributedWeightedFvPatchFieldMapper::"
"distributedWeightedFvPatchFieldMapper(..)"
) << "Supply a mapDistributeBase if and only if "
FatalErrorInFunction
<< "Supply a mapDistributeBase if and only if "
<< "singlePatchProc is -1"
<< " singlePatchProc_:" << singlePatchProc_
<< " distMapPtr_:" << (distMapPtr_ != NULL)
@ -132,11 +129,8 @@ public:
{
if (!distMapPtr_)
{
FatalErrorIn
(
"distributedWeightedFvPatchFieldMapper::"
"distributeMap()"
) << "Cannot ask for distributeMap on a non-distributed"
FatalErrorInFunction
<< "Cannot ask for distributeMap on a non-distributed"
<< " mapper" << exit(FatalError);
}
return *distMapPtr_;

View File

@ -155,16 +155,8 @@ void Foam::meshToMesh::mapSrcToTgt
{
if (result.size() != tgtToSrcCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapSrcToTgt"
"("
"const UList<Type>&, "
"const UList<typename outerProduct<vector, Type>::type>&, "
"const CombineOp&, "
"List<Type>&"
") const"
) << "Supplied field size is not equal to target mesh size" << nl
FatalErrorInFunction
<< "Supplied field size is not equal to target mesh size" << nl
<< " source mesh = " << srcToTgtCellAddr_.size() << nl
<< " target mesh = " << tgtToSrcCellAddr_.size() << nl
<< " supplied field = " << result.size()
@ -376,16 +368,8 @@ void Foam::meshToMesh::mapTgtToSrc
{
if (result.size() != srcToTgtCellAddr_.size())
{
FatalErrorIn
(
"void Foam::meshToMesh::mapTgtToSrc"
"("
"const UList<Type>&, "
"const UList<typename outerProduct<vector, Type>::type>&, "
"const CombineOp&, "
"List<Type>&"
") const"
) << "Supplied field size is not equal to source mesh size" << nl
FatalErrorInFunction
<< "Supplied field size is not equal to source mesh size" << nl
<< " source mesh = " << srcToTgtCellAddr_.size() << nl
<< " target mesh = " << tgtToSrcCellAddr_.size() << nl
<< " supplied field = " << result.size()