mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use FatalIOError and minor changes to log output
This commit is contained in:
@ -99,8 +99,18 @@ bool Foam::functionObjects::reference::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
localDict_ = dict;
|
localDict_ = dict;
|
||||||
|
|
||||||
|
Log << type() << " " << name() << nl
|
||||||
|
<< " field: " << fieldName_ << nl;
|
||||||
|
|
||||||
|
if (dict.readIfPresent("scale", scale_))
|
||||||
|
{
|
||||||
|
Log << " scale: " << scale_ << nl;
|
||||||
|
}
|
||||||
|
|
||||||
if (dict.readIfPresent("position", position_))
|
if (dict.readIfPresent("position", position_))
|
||||||
{
|
{
|
||||||
|
Log << " sample position: " << position_ << nl;
|
||||||
|
|
||||||
positionIsSet_ = true;
|
positionIsSet_ = true;
|
||||||
|
|
||||||
celli_ = mesh_.findCell(position_);
|
celli_ = mesh_.findCell(position_);
|
||||||
@ -109,24 +119,16 @@ bool Foam::functionObjects::reference::read(const dictionary& dict)
|
|||||||
|
|
||||||
if (celli == -1)
|
if (celli == -1)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalIOErrorInFunction(dict)
|
||||||
<< "Sample cell could not be found at position " << position_
|
<< "Sample cell could not be found at position "
|
||||||
<< exit(FatalError);
|
<< position_ << exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolationScheme_ =
|
interpolationScheme_ =
|
||||||
dict.lookupOrDefault<word>("interpolationScheme", "cell");
|
dict.lookupOrDefault<word>("interpolationScheme", "cell");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log << endl;
|
||||||
dict.readIfPresent("scale", scale_);
|
|
||||||
|
|
||||||
|
|
||||||
Log << type() << " " << name() << nl
|
|
||||||
<< " field: " << fieldName_ << nl
|
|
||||||
<< " sample position: " << position_ << nl
|
|
||||||
<< " scale: " << scale_ << nl
|
|
||||||
<< endl;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user