mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated Info, Warning and Error messages
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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_;
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -275,7 +275,7 @@ void Foam::probes::readDict(const dictionary& dict)
|
||||
{
|
||||
if (!fixedLocations_ && interpolationScheme_ != "cell")
|
||||
{
|
||||
WarningIn("void Foam::probes::read(const dictionary&)")
|
||||
WarningInFunction
|
||||
<< "Only cell interpolation can be applied when "
|
||||
<< "not using fixedLocations. InterpolationScheme "
|
||||
<< "entry will be ignored";
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1279,7 +1279,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
|
||||
|| (f[2] < 0) || (f[2] >= surf.points().size())
|
||||
)
|
||||
{
|
||||
WarningIn("validTri(const triSurface&, const label)")
|
||||
WarningInFunction
|
||||
<< "triangle " << faceI << " vertices " << f
|
||||
<< " uses point indices outside point range 0.."
|
||||
<< surf.points().size()-1 << endl;
|
||||
@ -1289,7 +1289,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
|
||||
|
||||
if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2]))
|
||||
{
|
||||
WarningIn("validTri(const triSurface&, const label)")
|
||||
WarningInFunction
|
||||
<< "triangle " << faceI
|
||||
<< " uses non-unique vertices " << f
|
||||
<< endl;
|
||||
@ -1321,7 +1321,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI)
|
||||
&& ((f[2] == nbrF[0]) || (f[2] == nbrF[1]) || (f[2] == nbrF[2]))
|
||||
)
|
||||
{
|
||||
WarningIn("validTri(const triSurface&, const label)")
|
||||
WarningInFunction
|
||||
<< "triangle " << faceI << " vertices " << f
|
||||
<< " fc:" << f.centre(surf.points())
|
||||
<< " has the same vertices as triangle " << nbrFaceI
|
||||
|
||||
Reference in New Issue
Block a user