Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-dev-OpenCFD into develop

This commit is contained in:
mattijs
2015-12-09 11:02:22 +00:00
2307 changed files with 44944 additions and 26268 deletions

View File

@ -103,7 +103,7 @@ void Foam::partialWrite::read(const dictionary& dict)
if (writeInterval_ < 1)
{
FatalIOErrorIn("partialWrite::read(const dictionary&)", dict)
FatalIOErrorInFunction(dict)
<< "Illegal value for writeInterval " << writeInterval_
<< ". It should be >= 1."
<< exit(FatalIOError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(writeRegisteredObject, 0);
defineTypeNameAndDebug(writeRegisteredObject, 0);
}
@ -105,7 +105,7 @@ void Foam::writeRegisteredObject::write()
}
else
{
WarningIn("Foam::writeRegisteredObject::write()")
WarningInFunction
<< "Object " << objectNames_[i] << " not found in "
<< "database. Available objects:" << nl << obr_.sortedToc()
<< endl;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -162,8 +162,9 @@ void Foam::cloudInfo::write()
if (Pstream::master())
{
writeTime(filePtrs_[cloudI]);
filePtrs_[cloudI]
<< obr_.time().value() << token::TAB
<< token::TAB
<< nParcels << token::TAB
<< massInSystem << token::TAB
<< Dmax << token::TAB

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -90,7 +90,7 @@ void Foam::fieldAverage::initialize()
{
if (!faItems_[fieldI].active())
{
WarningIn("void Foam::fieldAverage::initialize()")
WarningInFunction
<< "Field " << faItems_[fieldI].fieldName()
<< " not found in database for averaging";
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -166,10 +166,7 @@ void Foam::fieldAverage::addPrime2MeanField(const label fieldI)
if (!faItems_[fieldI].mean())
{
FatalErrorIn
(
"void Foam::fieldAverage::addPrime2MeanField(const label) const"
)
FatalErrorInFunction
<< "To calculate the prime-squared average, the "
<< "mean average must also be selected for field "
<< fieldName << nl << exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,10 +92,8 @@ void Foam::fieldAverageItem::operator=(const fieldAverageItem& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn
(
"Foam::fieldAverageItem::operator=(const Foam::fieldAverageItem&)"
) << "Attempted assignment to self" << nl
FatalErrorInFunction
<< "Attempted assignment to self" << nl
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(fieldCoordinateSystemTransform, 0);
defineTypeNameAndDebug(fieldCoordinateSystemTransform, 0);
}
@ -64,16 +64,8 @@ Foam::fieldCoordinateSystemTransform::fieldCoordinateSystemTransform
else
{
active_ = false;
WarningIn
(
"fieldCoordinateSystemTransform::fieldCoordinateSystemTransform"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -160,7 +160,8 @@ void Foam::fieldMinMax::write()
{
if (active_)
{
if (!writeLocation_) file()<< obr_.time().value();
if (!writeLocation_) writeTime(file());
if (log_) Info<< type() << " " << name_ << " output:" << nl;
forAll(fieldSet_, fieldI)

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -45,7 +45,7 @@ void Foam::fieldMinMax::output
if (writeLocation_)
{
file<< obr_.time().value();
writeTime(file());
writeTabbed(file, fieldName);
@ -278,14 +278,7 @@ void Foam::fieldMinMax::calcMinMaxFields
}
default:
{
FatalErrorIn
(
"Foam::fieldMinMax::calcMinMaxFields"
"("
"const word&, "
"const modeType&"
")"
)
FatalErrorInFunction
<< "Unknown min/max mode: " << modeTypeNames_[mode_]
<< exit(FatalError);
}

View File

@ -83,7 +83,7 @@ void Foam::fieldValues::cellSource::setCellZoneCells()
if (zoneId < 0)
{
FatalErrorIn("cellSource::cellSource::setCellZoneCells()")
FatalErrorInFunction
<< "Unknown cell zone name: " << sourceName_
<< ". Valid cell zones are: " << mesh().cellZones().names()
<< nl << exit(FatalError);
@ -103,7 +103,7 @@ void Foam::fieldValues::cellSource::setCellZoneCells()
default:
{
FatalErrorIn("cellSource::setCellZoneCells()")
FatalErrorInFunction
<< "Unknown source type. Valid source types are:"
<< sourceTypeNames_ << nl << exit(FatalError);
}
@ -130,10 +130,7 @@ void Foam::fieldValues::cellSource::initialise(const dictionary& dict)
if (nCells_ == 0)
{
WarningIn
(
"Foam::fieldValues::cellSource::initialise(const dictionary&)"
)
WarningInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Source has no cells - deactivating" << endl;
@ -237,7 +234,7 @@ void Foam::fieldValues::cellSource::write()
if (active_)
{
file() << obr_.time().value();
writeTime(file());
// Construct weight field. Note: zero size indicates unweighted
scalarField weightField;
@ -266,7 +263,7 @@ void Foam::fieldValues::cellSource::write()
if (!ok)
{
WarningIn("void Foam::fieldValues::cellSource::write()")
WarningInFunction
<< "Requested field " << fieldName
<< " not found in database and not processed"
<< endl;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -58,15 +58,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::cellSource::setFieldValues
if (mustGet)
{
FatalErrorIn
(
"Foam::tmp<Foam::Field<Type> > "
"Foam::fieldValues::cellSource::setFieldValues"
"("
"const word&, "
"const bool"
") const"
) << "Field " << fieldName << " not found in database"
FatalErrorInFunction
<< "Field " << fieldName << " not found in database"
<< abort(FatalError);
}

View File

@ -90,7 +90,7 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces()
if (zoneId < 0)
{
FatalErrorIn("faceSource::faceSource::setFaceZoneFaces()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Unknown face zone name: " << sourceName_
@ -175,7 +175,7 @@ void Foam::fieldValues::faceSource::setPatchFaces()
if (patchId < 0)
{
FatalErrorIn("faceSource::constructFaceAddressing()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Unknown patch name: " << sourceName_
@ -419,7 +419,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
}
default:
{
FatalErrorIn("faceSource::initialise()")
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
<< nl << " Unknown source type. Valid source types are:"
@ -429,10 +429,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
if (nFaces_ == 0)
{
WarningIn
(
"Foam::fieldValues::faceSource::initialise(const dictionary&)"
)
WarningInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl
<< " Source has no faces - deactivating" << endl;
@ -459,14 +456,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
if (source_ == stSampledSurface)
{
FatalIOErrorIn
(
"void Foam::fieldValues::faceSource::initialise"
"("
"const dictionary&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< "Cannot use weightField for a sampledSurface"
<< exit(FatalIOError);
}
@ -482,14 +472,7 @@ void Foam::fieldValues::faceSource::initialise(const dictionary& dict)
}
else
{
FatalIOErrorIn
(
"void Foam::fieldValues::faceSource::initialise"
"("
"const dictionary&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< "Either weightField or orientedWeightField can be supplied, "
<< "but not both"
<< exit(FatalIOError);
@ -684,7 +667,7 @@ void Foam::fieldValues::faceSource::write()
surfacePtr_().update();
}
file() << obr_.time().value();
writeTime(file());
if (writeArea_)
{
@ -722,7 +705,7 @@ void Foam::fieldValues::faceSource::write()
if (!ok)
{
WarningIn("void Foam::fieldValues::faceSource::write()")
WarningInFunction
<< "Requested field " << fieldName
<< " not found in database and not processed"
<< endl;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -110,16 +110,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::setFieldValues
if (mustGet)
{
FatalErrorIn
(
"Foam::tmp<Foam::Field<Type> > "
"Foam::fieldValues::faceSource::setFieldValues"
"("
"const word&, "
"const bool, "
"const bool"
") const"
) << "Field " << fieldName << " not found in database"
FatalErrorInFunction
<< "Field " << fieldName << " not found in database"
<< abort(FatalError);
}
@ -150,16 +142,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
}
case opSumDirection:
{
FatalErrorIn
(
"template<class Type>"
"Type Foam::fieldValues::faceSource::processSameTypeValues"
"("
"const Field<Type>&, "
"const vectorField&, "
"const scalarField&"
") const"
)
FatalErrorInFunction
<< "Operation " << operationTypeNames_[operation_]
<< " not available for values of type "
<< pTraits<Type>::typeName
@ -170,16 +153,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
}
case opSumDirectionBalance:
{
FatalErrorIn
(
"template<class Type>"
"Type Foam::fieldValues::faceSource::processSameTypeValues"
"("
"const Field<Type>&, "
"const vectorField&, "
"const scalarField&"
") const"
)
FatalErrorInFunction
<< "Operation " << operationTypeNames_[operation_]
<< " not available for values of type "
<< pTraits<Type>::typeName
@ -401,14 +375,8 @@ Foam::tmp<Foam::Field<Type> > Foam::fieldValues::faceSource::filterField
}
else
{
FatalErrorIn
(
"fieldValues::faceSource::filterField"
"("
"const GeometricField<Type, fvPatchField, volMesh>&, "
"const bool"
") const"
) << type() << " " << name_ << ": "
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
<< nl
<< " Unable to process internal faces for volume field "

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,16 +48,8 @@ Foam::autoPtr<Foam::fieldValue> Foam::fieldValue::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"fieldValue::New"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "Unknown " << typeName << " type "
FatalErrorInFunction
<< "Unknown " << typeName << " type "
<< modelType << nl << nl
<< "Valid " << typeName << " types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -168,7 +168,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
source1Ptr_->write();
source2Ptr_->write();
file()<< obr_.time().value();
writeTime(file());
if (log_) Info << type() << " " << name_ << " output:" << endl;
@ -180,7 +180,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
if (entries1.size() != entries2.size())
{
FatalErrorIn("void Foam::fieldValues::fieldValueDelta::execute()")
FatalErrorInFunction
<< name_ << ": objects must generate the same number of results"
<< nl
<< " " << name1 << " objects: " << entries1 << nl
@ -197,10 +197,7 @@ void Foam::fieldValues::fieldValueDelta::execute()
if (type1 != type2)
{
FatalErrorIn
(
"void Foam::fieldValues::fieldValueDelta::execute()"
)
FatalErrorInFunction
<< name_
<< ": input values for operation must be of the same type"
<< nl

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -77,20 +77,9 @@ void Foam::fieldValues::fieldValueDelta::apply
}
default:
{
FatalErrorIn
(
"void Foam::fieldValues::fieldValueDelta::applyOperation"
"("
"const word&, "
"const word&, "
"const word&, "
"const word&, "
"const word&"
"bool&"
") const"
)
<< "Operation not supported: "
<< opName
FatalErrorInFunction
<< "Unable to process operation "
<< operationTypeNames_[operation_]
<< abort(FatalError);
}
}

View File

@ -242,16 +242,8 @@ Foam::nearWallFields::nearWallFields
else
{
active_ = false;
WarningIn
(
"nearWallFields::nearWallFields"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}

View File

@ -47,13 +47,7 @@ void Foam::nearWallFields::createFields
if (obr_.found(sampleFldName))
{
WarningIn
(
"void Foam::nearWallFields::createFields"
"("
"PtrList<GeometricField<Type, fvPatchField, volMesh> >&"
") const"
)
WarningInFunction
<< " a field named " << sampleFldName
<< " already exists on the mesh"
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -31,7 +31,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(processorField, 0);
defineTypeNameAndDebug(processorField, 0);
}
@ -80,16 +80,8 @@ Foam::processorField::processorField
else
{
active_ = false;
WarningIn
(
"processorField::processorField"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -58,16 +58,8 @@ Foam::readFields::readFields
else
{
active_ = false;
WarningIn
(
"readFields::readFields"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -345,16 +345,8 @@ Foam::regionSizeDistribution::regionSizeDistribution
else
{
active_ = false;
WarningIn
(
"regionSizeDistribution::regionSizeDistribution"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -152,7 +152,7 @@ void Foam::streamLine::read(const dictionary& dict)
if (subCycling && fixedLength)
{
FatalIOErrorIn("streamLine::read(const dictionary&)", dict)
FatalIOErrorInFunction(dict)
<< "Cannot both specify automatic time stepping (through '"
<< "nSubCycle' specification) and fixed track length (through '"
<< "trackLength')"

View File

@ -165,7 +165,7 @@ void Foam::streamLineBase::initInterpolations
}
else
{
FatalErrorIn("streamLineBase::track()")
FatalErrorInFunction
<< "Cannot find field " << fields_[i] << nl
<< "Valid scalar fields are:"
<< mesh.names(volScalarField::typeName) << nl
@ -238,7 +238,7 @@ void Foam::streamLineBase::initInterpolations
if (UIndex == -1)
{
FatalErrorIn("streamLineBase::track()")
FatalErrorInFunction
<< "Cannot find field to move particles with : " << UName_ << nl
<< "This field has to be present in the sampled fields " << fields_
<< " and in the objectRegistry."
@ -575,7 +575,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
UName_ = "U";
if (dict.found("U"))
{
IOWarningIn("streamLineBase::read(const dictionary&)", dict)
IOWarningInFunction(dict)
<< "Using deprecated entry \"U\"."
<< " Please use \"UName\" instead."
<< endl;
@ -585,7 +585,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
if (findIndex(fields_, UName_) == -1)
{
FatalIOErrorIn("streamLineBase::read(const dictionary&)", dict)
FatalIOErrorInFunction(dict)
<< "Velocity field for tracking " << UName_
<< " should be present in the list of fields " << fields_
<< exit(FatalIOError);
@ -596,7 +596,7 @@ void Foam::streamLineBase::read(const dictionary& dict)
dict.lookup("lifeTime") >> lifeTime_;
if (lifeTime_ < 1)
{
FatalErrorIn(":streamLineBase::read(const dictionary&)")
FatalErrorInFunction
<< "Illegal value " << lifeTime_ << " for lifeTime"
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,7 +65,7 @@ Foam::vector Foam::streamLineParticle::interpolateFields
{
if (cellI == -1)
{
FatalErrorIn("streamLineParticle::interpolateFields(..)")
FatalErrorInFunction
<< "Cell:" << cellI << abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -57,16 +57,8 @@ Foam::surfaceInterpolateFields::surfaceInterpolateFields
else
{
active_ = false;
WarningIn
(
"surfaceInterpolateFields::surfaceInterpolateFields"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
}

View File

@ -162,7 +162,7 @@ void Foam::valueAverage::execute()
if (unprocessedFields.size())
{
WarningIn("bool Foam::valueAverage::execute()")
WarningInFunction
<< "From function object: " << functionObjectName_ << nl
<< "Unprocessed fields:" << nl;

View File

@ -39,7 +39,7 @@ Foam::edge Foam::wallBoundedParticle::currentEdge() const
{
if ((meshEdgeStart_ != -1) == (diagEdge_ != -1))
{
FatalErrorIn("wallBoundedParticle::currentEdge() const")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "cannot both be on a mesh edge and a face-diagonal edge."
@ -93,11 +93,8 @@ void Foam::wallBoundedParticle::crossEdgeConnectedFace
}
else
{
FatalErrorIn
(
"wallBoundedParticle::crossEdgeConnectedFace"
"(const edge&)"
) << "Problem :"
FatalErrorInFunction
<< "Problem :"
<< " particle:"
<< info()
<< "face:" << tetFace()
@ -113,11 +110,8 @@ void Foam::wallBoundedParticle::crossEdgeConnectedFace
const edge eNew(f[meshEdgeStart_], f.nextLabel(meshEdgeStart_));
if (eNew != meshEdge)
{
FatalErrorIn
(
"wallBoundedParticle::crossEdgeConnectedFace"
"(const edge&)"
) << "Problem" << abort(FatalError);
FatalErrorInFunction
<< "Problem" << abort(FatalError);
}
}
@ -126,14 +120,14 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
{
if (diagEdge_ == -1)
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "not on a diagonal edge" << abort(FatalError);
}
if (meshEdgeStart_ != -1)
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "meshEdgeStart_:" << meshEdgeStart_ << abort(FatalError);
@ -156,7 +150,7 @@ void Foam::wallBoundedParticle::crossDiagonalEdge()
}
else
{
FatalErrorIn("wallBoundedParticle::crossDiagonalEdge()")
FatalErrorInFunction
<< "Particle:"
<< info()
<< "tetPt:" << tetPt()
@ -264,11 +258,8 @@ bool Foam::wallBoundedParticle::isTriAlongTrack
|| findIndex(triVerts, currentE[1]) == -1
)
{
FatalErrorIn
(
"wallBoundedParticle::isTriAlongTrack"
"(const point&)"
) << "Edge " << currentE << " not on triangle " << triVerts
FatalErrorInFunction
<< "Edge " << currentE << " not on triangle " << triVerts
<< info()
<< abort(FatalError);
}
@ -293,11 +284,8 @@ bool Foam::wallBoundedParticle::isTriAlongTrack
}
}
FatalErrorIn
(
"wallBoundedParticle::isTriAlongTrack"
"(const point&)"
) << "Problem" << abort(FatalError);
FatalErrorInFunction
<< "Problem" << abort(FatalError);
return false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -206,11 +206,8 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
if (mesh_.isInternalFace(tetFace()))
{
FatalErrorIn
(
"wallBoundedParticle::trackToEdge"
"(TrackData&, const vector&)"
) << "Can only track on boundary faces."
FatalErrorInFunction
<< "Can only track on boundary faces."
<< " Face:" << tetFace()
<< " at:" << mesh_.faceCentres()[tetFace()]
<< abort(FatalError);
@ -286,7 +283,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
{
//Note: should not happen since boundary face so owner
//Pout<< "Real edge." << endl;
FatalErrorIn("shold not happend") << info()
FatalErrorInFunction
<< abort(FatalError);
diagEdge_ = -1;
@ -332,7 +329,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
{
//Note: should not happen since boundary face so owner
//Pout<< "Real edge." << endl;
FatalErrorIn("shold not happend") << info()
FatalErrorInFunction
<< abort(FatalError);
diagEdge_ = -1;

View File

@ -275,7 +275,7 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
{
label nFaces = returnReduce(faces.size(), sumOp<label>());
WarningIn("wallBoundedStreamLine::read(const dictionary&)")
WarningInFunction
<< "Found " << nFaces
<<" faces with low quality or negative volume "
<< "decomposition tets. Writing to faceSet " << faces.name()
@ -314,10 +314,8 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
{
if (iter() != 2)
{
FatalErrorIn
(
"wallBoundedStreamLine::read(const dictionary&)"
) << "problem cell:" << cellI
FatalErrorInFunction
<< "problem cell:" << cellI
<< abort(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,7 +38,7 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields
{
if (cellI == -1)
{
FatalErrorIn("wallBoundedStreamLineParticle::interpolateFields(..)")
FatalErrorInFunction
<< "Cell:" << cellI << abort(FatalError);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -358,8 +358,9 @@ void Foam::forceCoeffs::execute()
if (writeToFile())
{
writeTime(coeffFilePtr_());
coeffFilePtr_()
<< obr_.time().value() << tab << CmTot << tab << CdTot
<< tab << CmTot << tab << CdTot
<< tab << ClTot << tab << ClfTot << tab << ClrTot << endl;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -173,7 +173,7 @@ void Foam::forces::initialise()
if (!obr_.foundObject<volVectorField>(fDName_))
{
active_ = false;
WarningIn("void Foam::forces::initialise()")
WarningInFunction
<< "Could not find " << fDName_ << " in database." << nl
<< " De-activating forces."
<< endl;
@ -193,7 +193,7 @@ void Foam::forces::initialise()
{
active_ = false;
WarningIn("void Foam::forces::initialise()")
WarningInFunction
<< "Could not find " << UName_ << ", " << pName_;
if (rhoName_ != "rhoInf")
@ -370,7 +370,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::forces::devRhoReff() const
}
else
{
FatalErrorIn("forces::devRhoReff()")
FatalErrorInFunction
<< "No valid model for viscous stress calculation"
<< exit(FatalError);
@ -409,7 +409,7 @@ Foam::tmp<Foam::volScalarField> Foam::forces::mu() const
}
else
{
FatalErrorIn("forces::mu()")
FatalErrorInFunction
<< "No valid model for dynamic viscosity calculation"
<< exit(FatalError);
@ -456,7 +456,7 @@ Foam::scalar Foam::forces::rho(const volScalarField& p) const
{
if (rhoName_ != "rhoInf")
{
FatalErrorIn("forces::rho(const volScalarField& p)")
FatalErrorInFunction
<< "Dynamic pressure is expected but kinematic is provided."
<< exit(FatalError);
}
@ -690,7 +690,7 @@ void Foam::forces::writeBinnedForceMoment
Ostream& os = osPtr();
os << obr_.time().value();
writeTime(os);
forAll(f[0], i)
{
@ -923,10 +923,8 @@ void Foam::forces::read(const dictionary& dict)
if (nBin_ < 0)
{
FatalIOErrorIn
(
"void Foam::forces::read(const dictionary&)", dict
) << "Number of bins (nBin) must be zero or greater"
FatalIOErrorInFunction(dict)
<< "Number of bins (nBin) must be zero or greater"
<< exit(FatalIOError);
}
else if (nBin_ == 0)
@ -1173,7 +1171,7 @@ void Foam::forces::calcForcesMoment()
if (models.empty())
{
WarningIn("void Foam::forces::calcForcesMoment()")
WarningInFunction
<< "Porosity effects requested, but no porosity models found "
<< "in the database"
<< endl;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(calcFvcDiv, 0);
defineTypeNameAndDebug(calcFvcDiv, 0);
}
@ -95,16 +95,8 @@ Foam::calcFvcDiv::calcFvcDiv
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"calcFvcDiv::calcFvcDiv"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating." << nl
WarningInFunction
<< "No fvMesh available, deactivating." << nl
<< endl;
}
@ -148,7 +140,7 @@ void Foam::calcFvcDiv::execute()
if (!processed)
{
WarningIn("void Foam::calcFvcDiv::write()")
WarningInFunction
<< "Unprocessed field " << fieldName_ << endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(calcFvcGrad, 0);
defineTypeNameAndDebug(calcFvcGrad, 0);
}
@ -57,16 +57,8 @@ Foam::calcFvcGrad::calcFvcGrad
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"calcFvcGrad::calcFvcGrad"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating." << nl
WarningInFunction
<< "No fvMesh available, deactivating." << nl
<< endl;
}
@ -110,7 +102,7 @@ void Foam::calcFvcGrad::execute()
if (!processed)
{
WarningIn("void Foam::calcFvcGrad::write()")
WarningInFunction
<< "Unprocessed field " << fieldName_ << endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(calcMag, 0);
defineTypeNameAndDebug(calcMag, 0);
}
@ -57,16 +57,8 @@ Foam::calcMag::calcMag
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"calcMag::calcMag"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating." << nl
WarningInFunction
<< "No fvMesh available, deactivating." << nl
<< endl;
}
@ -113,7 +105,7 @@ void Foam::calcMag::execute()
if (!processed)
{
WarningIn("void Foam::calcMag::write()")
WarningInFunction
<< "Unprocessed field " << fieldName_ << endl;
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -407,19 +407,7 @@ void Foam::fieldVisualisationBase::addGlyphs
}
else
{
WarningIn
(
"void Foam::fieldVisualisationBase::addGlyphs"
"("
"const scalar, "
"const word&, "
"const word&, "
"const scalar, "
"vtkPolyData*, "
"vtkActor*, "
"vtkRenderer*"
") const"
)
WarningInFunction
<< "Glyphs can only be added to " << pTraits<scalar>::typeName
<< " and " << pTraits<vector>::typeName << " fields. "
<< " Field " << scaleFieldName << " has " << nComponents

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -102,14 +102,7 @@ void Foam::functionObjectCloud::addGeometryToScene
if (fName.empty())
{
WarningIn
(
"void Foam::functionObjectCloud::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -93,14 +93,7 @@ void Foam::functionObjectLine::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectLine::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Line will not be processed"

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -95,14 +95,7 @@ void Foam::functionObjectSurface::addGeometryToScene
fileName fName;
if (!dict.readIfPresent("file", fName))
{
WarningIn
(
"void Foam::functionObjectSurface::addToScene"
"("
"const scalar, "
"vtkRenderer*"
")"
)
WarningInFunction
<< "Unable to find function object " << functionObject_
<< " output for field " << fieldName_
<< ". Surface will not be processed"

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -64,15 +64,7 @@ void Foam::geometrySurface::addGeometryToScene
{
if (representation_ == rtGlyph)
{
FatalErrorIn
(
"void Foam::geometrySurface::addGeometryToScene"
"("
"const label, "
"vtkRenderer*, "
"const fileName&"
") const"
)
FatalErrorInFunction
<< "Glyph representation not available for " << typeName
<< "object" << exit(FatalError);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -182,16 +182,8 @@ Foam::autoPtr<Foam::pathline> Foam::pathline::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pathline> Foam::pathline::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pathline type "
FatalErrorInFunction
<< "Unknown pathline type "
<< pathlineType << nl << nl
<< "Valid pathline types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -142,16 +142,8 @@ Foam::autoPtr<Foam::pointData> Foam::pointData::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::pointData> Foam::pointData::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown pointData type "
FatalErrorInFunction
<< "Unknown pointData type "
<< pointDataType << nl << nl
<< "Valid pointData types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -102,11 +102,7 @@ void Foam::runTimePostProcessing::read(const dictionary& dict)
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::read(const dictionary&)",
textDict
)
FatalIOErrorInFunction(textDict)
<< "text must be specified in dictionary format"
<< exit(FatalIOError);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -37,15 +37,7 @@ void Foam::runTimePostProcessing::readObjects
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::runTimePostProcessing::readObjects"
"("
"const dictionary&, "
"PtrList<Type>&"
")",
dict
)
FatalIOErrorInFunction(dict)
<< dict.dictName()
<< " objects must be specified in dictionary format"
<< exit(FatalIOError);

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -61,11 +61,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if (nFrameTotal_ < 1)
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "nFrameTotal must be 1 or greater"
FatalIOErrorInFunction(dict)
<< "nFrameTotal must be 1 or greater"
<< exit(FatalIOError);
}
}
@ -74,11 +71,8 @@ void Foam::scene::readCamera(const dictionary& dict)
{
if ((position_ < 0) || (position_ > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "startPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "startPosition must be in the range 0-1"
<< exit(FatalIOError);
}
}
@ -91,11 +85,8 @@ void Foam::scene::readCamera(const dictionary& dict)
scalar endPosition = dict.lookupOrDefault<scalar>("endPosition", 1);
if ((endPosition < 0) || (endPosition > 1))
{
FatalIOErrorIn
(
"void Foam::scene::readCamera(const dictionary&)",
dict
) << "endPosition must be in the range 0-1"
FatalIOErrorInFunction(dict)
<< "endPosition must be in the range 0-1"
<< exit(FatalIOError);
}
dPosition_ = (endPosition - position_)/scalar(nFrameTotal_ - 1);
@ -137,7 +128,7 @@ void Foam::scene::readCamera(const dictionary& dict)
}
default:
{
FatalErrorIn("void Foam::scene::read(const dictionary&)")
FatalErrorInFunction
<< "Unhandled enumeration " << modeTypeNames_[mode_]
<< abort(FatalError);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -205,16 +205,8 @@ Foam::autoPtr<Foam::surface> Foam::surface::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"Foam::autoPtr<Foam::surface> Foam::surface::New"
"("
"const runTimePostProcessing&, "
"const dictionary&, "
"const HashPtrTable<DataEntry<vector>, word>&, "
"const word&"
")"
) << "Unknown surface type "
FatalErrorInFunction
<< "Unknown surface type "
<< surfaceType << nl << nl
<< "Valid surface types are:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -203,12 +203,7 @@ void Foam::externalCoupledFunctionObject::wait() const
{
if (totalTime > timeOut_)
{
FatalErrorIn
(
"void "
"Foam::externalCoupledFunctionObject::wait() "
"const"
)
FatalErrorInFunction
<< "Wait time exceeded time out time of " << timeOut_
<< " s" << abort(FatalError);
}
@ -280,11 +275,8 @@ void Foam::externalCoupledFunctionObject::readColumns
{
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::readColumns()",
masterFilePtr()
) << "Trying to read data for processor " << procI
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
@ -347,11 +339,8 @@ void Foam::externalCoupledFunctionObject::readLines
{
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::readColumns()",
masterFilePtr()
) << "Trying to read data for processor " << procI
FatalIOErrorInFunction(masterFilePtr())
<< "Trying to read data for processor " << procI
<< " row " << rowI
<< ". Does your file have as many rows as there are"
<< " patch faces (" << globalFaces.size()
@ -542,10 +531,8 @@ Foam::word Foam::externalCoupledFunctionObject::compositeName
{
if (regionNames.size() == 0)
{
FatalErrorIn
(
"externalCoupledFunctionObject::compositeName(const wordList&)"
) << "Empty regionNames" << abort(FatalError);
FatalErrorInFunction
<< "Empty regionNames" << abort(FatalError);
return word::null;
}
else if (regionNames.size() == 1)
@ -586,10 +573,8 @@ void Foam::externalCoupledFunctionObject::checkOrder
sortedOrder(regionNames, order);
if (order != identity(regionNames.size()))
{
FatalErrorIn
(
"externalCoupledFunctionObject::checkOrder(const wordList&)"
) << "regionNames " << regionNames << " not in alphabetical order :"
FatalErrorInFunction
<< "regionNames " << regionNames << " not in alphabetical order :"
<< order << exit(FatalError);
}
}
@ -655,10 +640,7 @@ void Foam::externalCoupledFunctionObject::readData()
if (!ok)
{
WarningIn
(
"void Foam::externalCoupledFunctionObject::readData()"
)
WarningInFunction
<< "Field " << fieldName << " in regions " << compName
<< " was not found." << endl;
}
@ -728,10 +710,7 @@ void Foam::externalCoupledFunctionObject::writeData() const
if (!ok)
{
WarningIn
(
"void Foam::externalCoupledFunctionObject::writeData()"
)
WarningInFunction
<< "Field " << fieldName << " in regions " << compName
<< " was not found." << endl;
}
@ -948,12 +927,7 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
{
if (!iter().isDict())
{
FatalIOErrorIn
(
"void Foam::externalCoupledFunctionObject::read"
"(const dictionary&)",
allRegionsDict
)
FatalIOErrorInFunction(allRegionsDict)
<< "Regions must be specified in dictionary format"
<< exit(FatalIOError);
}
@ -973,12 +947,7 @@ bool Foam::externalCoupledFunctionObject::read(const dictionary& dict)
{
if (!regionIter().isDict())
{
FatalIOErrorIn
(
"void Foam::externalCoupledFunctionObject::read"
"(const dictionary&)",
regionDict
)
FatalIOErrorInFunction(regionDict)
<< "Regions must be specified in dictionary format"
<< exit(FatalIOError);
}

View File

@ -73,16 +73,8 @@ bool Foam::externalCoupledFunctionObject::readData
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"void externalCoupledFunctionObject::readData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
")",
masterFilePtr()
) << "Cannot open file for region " << compositeName(regionNames)
FatalIOErrorInFunction(masterFilePtr())
<< "Cannot open file for region " << compositeName(regionNames)
<< ", field " << fieldName
<< exit(FatalIOError);
}
@ -285,15 +277,7 @@ bool Foam::externalCoupledFunctionObject::readData
}
else
{
FatalErrorIn
(
"void externalCoupledFunctionObject::readData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
")"
)
FatalErrorInFunction
<< "Unsupported boundary condition " << bf[patchI].type()
<< " for patch " << bf[patchI].patch().name()
<< " in region " << mesh.name()
@ -389,16 +373,8 @@ bool Foam::externalCoupledFunctionObject::writeData
if (!masterFilePtr().good())
{
FatalIOErrorIn
(
"externalCoupledFunctionObject::writeData"
"("
"const UPtrList<const fvMesh>&, "
"const wordRe&, "
"const word&"
") const",
masterFilePtr()
) << "Cannot open file for region " << compositeName(regionNames)
FatalIOErrorInFunction(masterFilePtr())
<< "Cannot open file for region " << compositeName(regionNames)
<< ", field " << fieldName
<< exit(FatalIOError);
}

View File

@ -184,14 +184,8 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::writeData
}
else
{
FatalErrorIn
(
"void Foam::externalCoupledTemperatureMixedFvPatchScalarField::"
"transferData"
"("
"Ostream&"
") const"
) << "Condition requires either compressible turbulence and/or "
FatalErrorInFunction
<< "Condition requires either compressible turbulence and/or "
<< "thermo model to be available" << exit(FatalError);
}

View File

@ -32,21 +32,43 @@ Description
application. Values are transferred as plain text files, where OpenFOAM
data is written as:
# Patch: <patch name>
<magSf1> <value1> <qDot1> <htc1>
<magSf2> <value2> <qDot2> <htc2>
<magSf3> <value3> <qDot3> <htc2>
# Patch: \<patch name\>
\<magSf1\> \<value1\> \<qDot1\> \<htc1\>
\<magSf2\> \<value2\> \<qDot2\> \<htc2\>
\<magSf3\> \<value3\> \<qDot3\> \<htc2\>
...
<magSfN> <valueN> <qDotN> <htcN>
\<magSfN\> \<valueN\> \<qDotN\> \<htcN\>
and received as the constituent pieces of the `mixed' condition, i.e.
# Patch: <patch name>
<refValue1> <refGrad1> <valueFraction1>
<refValue2> <refGrad2> <valueFraction2>
<refValue3> <refGrad3> <valueFraction3>
...
<refValueN> <refGradN> <valueFractionN>
# Patch: \<patch name\>
\<value1\> \<gradient1\> \<valueFracion1\>
\<value2\> \<gradient2\> \<valueFracion2\>
\<value3\> \<gradient3\> \<valueFracion3\>
...
\<valueN\> \<gradientN\> \<valueFracionN\>
Data is sent/received as a single file for all patches from the directory
$FOAM_CASE/\<commsDir\>
At start-up, the boundary creates a lock file, i.e..
OpenFOAM.lock
... to signal the external source to wait. During the boundary condition
update, boundary values are written to file, e.g.
\<fileName\>.out
The lock file is then removed, instructing the external source to take
control of the program execution. When ready, the external program
should create the return values, e.g. to file
\<fileName\>.in
... and then re-instate the lock file. The boundary condition will then
read the return values, and pass program execution back to OpenFOAM.
To be used in combination with the externalCoupled functionObject.

View File

@ -135,7 +135,7 @@ bool Foam::averageCondition::apply()
if (unprocessedFields.size())
{
WarningIn("bool Foam::averageCondition::apply()")
WarningInFunction
<< "From function object: " << functionObjectName_ << nl
<< "Unprocessed fields:" << nl;

View File

@ -74,17 +74,7 @@ Foam::equationInitialResidualCondition::equationInitialResidualCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationInitialResidualCondition::"
"equationInitialResidualCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -151,10 +141,7 @@ bool Foam::equationInitialResidualCondition::apply()
}
default:
{
FatalErrorIn
(
"bool Foam::equationInitialResidualCondition::apply()"
)
FatalErrorInFunction
<< "Unhandled enumeration "
<< operatingModeNames[mode_]
<< abort(FatalError);
@ -168,7 +155,7 @@ bool Foam::equationInitialResidualCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for field "
<< fieldNames_[i] << endl;
}
@ -180,7 +167,7 @@ bool Foam::equationInitialResidualCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationInitialResidualCondition::apply()")
WarningInFunction
<< "Initial residual data not found for any fields: "
<< "deactivating" << endl;

View File

@ -59,17 +59,7 @@ Foam::equationMaxIterCondition::equationMaxIterCondition
{
if (!fieldNames_.size())
{
WarningIn
(
"Foam::equationMaxIterCondition::"
"equationMaxIterCondition"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
)
WarningInFunction
<< "No fields supplied: deactivating" << endl;
active_ = false;
@ -129,7 +119,7 @@ bool Foam::equationMaxIterCondition::apply()
{
if (result[i] < 0)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for field "
<< fieldNames_[i] << endl;
}
@ -141,7 +131,7 @@ bool Foam::equationMaxIterCondition::apply()
if (!valid)
{
WarningIn("bool Foam::equationMaxIterCondition::apply()")
WarningInFunction
<< "Number of iterations data not found for any fields: "
<< "deactivating" << endl;

View File

@ -104,7 +104,7 @@ bool Foam::minMaxCondition::apply()
if (valueType == word::null)
{
WarningIn("bool Foam::minMaxCondition::apply()")
WarningInFunction
<< "Unable to find entry " << fieldName
<< " for function object " << functionObjectName_
<< ". Condition will not be applied."

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -44,16 +44,8 @@ Foam::autoPtr<Foam::runTimeCondition> Foam::runTimeCondition::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"runTimeCondition::New"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"functionObjectState&"
")"
) << "Unknown runTimeCondition type "
FatalErrorInFunction
<< "Unknown runTimeCondition type "
<< conditionType << nl << nl
<< "Valid runTimeCondition types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -163,7 +163,7 @@ void Foam::runTimeControl::execute()
if (conditionIter == groupMap_.end())
{
FatalErrorIn("void Foam::runTimeControl::execute()")
FatalErrorInFunction
<< "group " << groupI << " not found in map"
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,13 +70,13 @@ void Foam::systemCall::read(const dictionary& dict)
if (executeCalls_.empty() && endCalls_.empty() && writeCalls_.empty())
{
WarningIn("Foam::system::read(const dictionary&)")
WarningInFunction
<< "no executeCalls, endCalls or writeCalls defined."
<< endl;
}
else if (!dynamicCode::allowSystemOperations)
{
FatalErrorIn("systemCall::read(const dictionary&)")
FatalErrorInFunction
<< "Executing user-supplied system calls is not enabled by "
<< "default because of " << nl
<< "security issues. If you trust the case you can enable this "

View File

@ -76,16 +76,8 @@ Foam::CourantNo::CourantNo
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"CourantNo::CourantNo"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -70,16 +70,8 @@ Foam::DESModelRegions::DESModelRegions
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"DESModelRegions::DESModelRegions"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -58,16 +58,8 @@ Foam::Lambda2::Lambda2
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"Lambda2::Lambda2"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -1,5 +1,4 @@
EXE_INC = \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/DSMC/lnInclude \
-I$(LIB_SRC)/transportModels \

View File

@ -60,16 +60,8 @@ Foam::Peclet::Peclet
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"Peclet::Peclet"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}
@ -181,7 +173,7 @@ void Foam::Peclet::execute()
}
else
{
FatalErrorIn("void Foam::Peclet::execute()")
FatalErrorInFunction
<< "Unable to determine the viscosity"
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(Q, 0);
defineTypeNameAndDebug(Q, 0);
}
@ -57,16 +57,8 @@ Foam::Q::Q
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"Q::Q"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -126,7 +126,7 @@ void Foam::blendingFactor::read(const dictionary& dict)
dict.readIfPresent("tolerance", tolerance_);
if ((tolerance_ < 0) || (tolerance_ > 1))
{
FatalErrorIn("void Foam::blendingFactor::read(const dictionary&)")
FatalErrorInFunction
<< "tolerance must be in the range 0 to 1. Supplied value: "
<< tolerance_ << exit(FatalError);
}

View File

@ -60,7 +60,7 @@ void Foam::blendingFactor::calc()
if (!isA<blendedSchemeBase<Type> >(interpScheme))
{
FatalErrorIn("void Foam::blendingFactor::execute()")
FatalErrorInFunction
<< interpScheme.typeName << " is not a blended scheme"
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,16 +59,8 @@ Foam::dsmcFields::dsmcFields
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"dsmcFields::dsmcFields"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -75,17 +75,7 @@ void Foam::fluxSummary::initialiseFaceZone
if (zoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseFaceZone"
"("
"const word&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
<< ". Valid faceZones are: " << mesh.faceZones().names()
<< exit(FatalError);
@ -178,19 +168,7 @@ void Foam::fluxSummary::initialiseFaceZoneAndDirection
if (zoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseFaceZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find faceZone " << faceZoneName
<< ". Valid faceZones are: " << mesh.faceZones().names()
<< exit(FatalError);
@ -299,19 +277,7 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
if (cellZoneI == -1)
{
FatalErrorIn
(
"void Foam::fluxSummary::initialiseCellZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
)
FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName
<< ". Valid zones are: " << mesh.cellZones().names()
<< exit(FatalError);
@ -474,19 +440,8 @@ void Foam::fluxSummary::initialiseCellZoneAndDirection
{
if (allEdgeInfo[fEdges[i]].region() != -1)
{
WarningIn
(
"void Foam::fluxSummary::initialiseCellZoneAndDirection"
"("
"const word&, "
"const vector&, "
"DynamicList<vector>&, "
"DynamicList<word>&, "
"DynamicList<List<label> >&, "
"DynamicList<List<label> >&, "
"DynamicList<List<scalar> >&"
") const"
) << "Problem in edge face wave: attempted to assign a "
WarningInFunction
<< "Problem in edge face wave: attempted to assign a "
<< "value to an edge that has already been visited. "
<< "Edge info: " << allEdgeInfo[fEdges[i]]
<< endl;
@ -650,16 +605,8 @@ Foam::fluxSummary::fluxSummary
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"fluxSummary::fluxSummary"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
@ -759,11 +706,7 @@ void Foam::fluxSummary::read(const dictionary& dict)
}
default:
{
FatalIOErrorIn
(
"void Foam::fluxSummary::read(const dictionary&)",
dict
)
FatalIOErrorInFunction(dict)
<< "unhandled enumeration " << modeTypeNames_[mode_]
<< abort(FatalIOError);
}
@ -887,7 +830,7 @@ void Foam::fluxSummary::write()
}
else
{
FatalErrorIn("void Foam::fluxSummary::write()")
FatalErrorInFunction
<< "Unsupported flux field " << phi.name() << " with dimensions "
<< phi.dimensions() << ". Expected eithe mass flow or volumetric "
<< "flow rate" << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -66,13 +66,7 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::rho
{
if (!rhoInfInitialised_)
{
FatalErrorIn
(
"Foam::tmp<Foam::volScalarField> Foam::pressureTools::rho"
"("
" const volScalarField&"
") const"
)
FatalErrorInFunction
<< type() << " " << name_ << ": "
<< "pressure identified as incompressible, but reference "
<< "density is not set. Please set rhoName to rhoInf, and "
@ -201,16 +195,8 @@ Foam::pressureTools::pressureTools
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"pressureTools::pressureTools"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}
@ -292,7 +278,7 @@ void Foam::pressureTools::read(const dictionary& dict)
if (mag(zeroCheck) < ROOTVSMALL)
{
WarningIn("void Foam::pressureTools::read(const dictionary&)")
WarningInFunction
<< type() << " " << name_ << ": "
<< "Coefficient calculation requested, but reference "
<< "pressure level is zero. Please check the supplied "

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -72,16 +72,8 @@ Foam::residuals::residuals
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"residuals::residuals"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
@ -115,21 +107,15 @@ void Foam::residuals::read(const dictionary& dict)
void Foam::residuals::execute()
{
// Do nothing - only valid on write
}
{}
void Foam::residuals::end()
{
// Do nothing - only valid on write
}
{}
void Foam::residuals::timeSet()
{
// Do nothing - only valid on write
}
{}
void Foam::residuals::write()
@ -138,7 +124,7 @@ void Foam::residuals::write()
{
if (Pstream::master())
{
file()<< obr_.time().value();
writeTime(file());
forAll(fieldSet_, fieldI)
{
@ -156,4 +142,5 @@ void Foam::residuals::write()
}
}
// ************************************************************************* //

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -115,6 +115,10 @@ protected:
//- Disallow default bitwise assignment
void operator=(const residuals&);
//- Output field header information
template<class Type>
void writeFileHeader(const word& fieldName);
//- Output file header information
virtual void writeFileHeader(Ostream& os) const;

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,9 +42,25 @@ void Foam::residuals::writeResidual(const word& fieldName)
if (solverDict.found(fieldName))
{
const List<solverPerformance> sp(solverDict.lookup(fieldName));
const scalar residual = sp.first().initialResidual();
file() << token::TAB << residual;
const List<SolverPerformance<Type> > sp
(
solverDict.lookup(fieldName)
);
const Type& residual = sp.first().initialResidual();
typename pTraits<Type>::labelType validComponents
(
mesh.validComponents<Type>()
);
for (direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
{
if (component(validComponents, cmpt) != -1)
{
file() << token::TAB << component(residual, cmpt);
}
}
}
}
}

View File

@ -315,7 +315,7 @@ void Foam::scalarTransport::execute()
}
else
{
FatalErrorIn("void Foam::scalarTransport::execute()")
FatalErrorInFunction
<< "Incompatible dimensions for phi: " << phi.dimensions() << nl
<< "Dimensions should be " << dimMass/dimTime << " or "
<< dimVolume/dimTime << endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -132,8 +132,8 @@ bool Foam::setTimeStepFunctionObject::read(const dictionary& dict)
|| !adjust
)
{
FatalIOErrorIn("setTimeStep::read(const dictionary&)", dict)
<< "'adjustTimeStep' must be set to true to enable external"
FatalIOErrorInFunction(dict)
<< "Need to have 'adjustTimeStep' true to enable external"
<< " timestep control" << exit(FatalIOError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(timeActivatedFileUpdate, 0);
defineTypeNameAndDebug(timeActivatedFileUpdate, 0);
}
@ -113,7 +113,7 @@ void Foam::timeActivatedFileUpdate::read(const dictionary& dict)
timeVsFile_[i].second() = timeVsFile_[i].second().expand();
if (!isFile(timeVsFile_[i].second()))
{
FatalErrorIn("timeActivatedFileUpdate::read(const dictionary&)")
FatalErrorInFunction
<< "File: " << timeVsFile_[i].second() << " not found"
<< nl << exit(FatalError);
}

View File

@ -80,7 +80,7 @@ bool Foam::turbulenceFields::compressible()
}
else
{
WarningIn("Foam::word& Foam::turbulenceFields::compressible() const")
WarningInFunction
<< "Turbulence model not found in database, deactivating";
active_ = false;
}
@ -113,16 +113,8 @@ Foam::turbulenceFields::turbulenceFields
else
{
active_ = false;
WarningIn
(
"turbulenceFields::turbulenceFields"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_
WarningInFunction
<< "No fvMesh available, deactivating " << name_
<< endl;
}
}
@ -226,7 +218,7 @@ void Foam::turbulenceFields::execute()
}
default:
{
FatalErrorIn("void Foam::turbulenceFields::execute()")
FatalErrorInFunction
<< "Invalid field selection" << abort(FatalError);
}
}
@ -274,7 +266,7 @@ void Foam::turbulenceFields::execute()
}
default:
{
FatalErrorIn("void Foam::turbulenceFields::execute()")
FatalErrorInFunction
<< "Invalid field selection" << abort(FatalError);
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,14 +46,8 @@ void Foam::turbulenceFields::processField
}
else if (obr_.found(scopedName))
{
WarningIn
(
"void Foam::turbulenceFields::processField"
"("
"const word&, "
"const tmp<GeometricField<Type, fvPatchField, volMesh> >&"
")"
) << "Cannot store turbulence field " << scopedName
WarningInFunction
<< "Cannot store turbulence field " << scopedName
<< " since an object with that name already exists"
<< nl << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -57,16 +57,8 @@ Foam::vorticity::vorticity
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"vorticity::vorticity"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -109,16 +109,8 @@ Foam::wallShearStress::wallShearStress
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"wallShearStress::wallShearStress"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}
@ -211,7 +203,7 @@ void Foam::wallShearStress::read(const dictionary& dict)
}
else
{
WarningIn("void wallShearStress::read(const dictionary&)")
WarningInFunction
<< "Requested wall shear stress on non-wall boundary "
<< "type patch: " << pbm[patchI].name() << endl;
}
@ -260,7 +252,7 @@ void Foam::wallShearStress::execute()
}
else
{
FatalErrorIn("void Foam::wallShearStress::write()")
FatalErrorInFunction
<< "Unable to find turbulence model in the "
<< "database" << exit(FatalError);
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -72,16 +72,8 @@ Foam::yPlus::yPlus
if (!isA<fvMesh>(obr_))
{
active_ = false;
WarningIn
(
"yPlus::yPlus"
"("
"const word&, "
"const objectRegistry&, "
"const dictionary&, "
"const bool"
")"
) << "No fvMesh available, deactivating " << name_ << nl
WarningInFunction
<< "No fvMesh available, deactivating " << name_ << nl
<< endl;
}
@ -170,7 +162,7 @@ void Foam::yPlus::execute()
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unable to find compressible turbulence model in the "
<< "database: yPlus will not be calculated" << endl;
}
@ -189,18 +181,19 @@ void Foam::yPlus::execute()
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unable to find incompressible turbulence model in the "
<< "database: yPlus will not be calculated" << endl;
}
}
else
{
WarningIn("void Foam::yPlus::execute()")
WarningInFunction
<< "Unknown " << phiName_ << " dimensions: "
<< phi.dimensions() << nl
<< "Expected either " << dimMass/dimTime << " or "
<< dimVolume/dimTime << nl
<< "Unable to determine turbulence model type. "
<< "yPlus will not be calculated" << endl;
}
}

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -73,7 +73,8 @@ void Foam::yPlus::calcYPlus
<< " y+ : min = " << minYplus << ", max = " << maxYplus
<< ", average = " << avgYplus << nl;
file() << obr_.time().value()
writeTime(file());
file()
<< token::TAB << patch.name()
<< token::TAB << minYplus
<< token::TAB << maxYplus
@ -95,20 +96,18 @@ void Foam::yPlus::calcYPlus
const scalar maxYplus = gMax(yPlusp);
const scalar avgYplus = gAverage(yPlusp);
if (Pstream::master())
{
if (log_) Info
<< " patch " << patch.name()
<< " y+ : min = " << minYplus << ", max = " << maxYplus
<< ", average = " << avgYplus << nl;
if (log_) Info
<< " patch " << patch.name()
<< " y+ : min = " << minYplus << ", max = " << maxYplus
<< ", average = " << avgYplus << nl;
file() << obr_.time().value()
<< token::TAB << patch.name()
<< token::TAB << minYplus
<< token::TAB << maxYplus
<< token::TAB << avgYplus
<< endl;
}
writeTime(file());
file()
<< token::TAB << patch.name()
<< token::TAB << minYplus
<< token::TAB << maxYplus
<< token::TAB << avgYplus
<< endl;
}
}
}