mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated weight field initialisation for fieldValues function object
This commit is contained in:
@ -145,22 +145,7 @@ void Foam::fieldValues::cellSource::initialise(const dictionary& dict)
|
||||
if (operation_ == opWeightedAverage)
|
||||
{
|
||||
dict.lookup("weightField") >> weightFieldName_;
|
||||
if
|
||||
(
|
||||
obr().foundObject<volScalarField>(weightFieldName_)
|
||||
)
|
||||
{
|
||||
Info<< " weight field = " << weightFieldName_;
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn("cellSource::initialise()")
|
||||
<< type() << " " << name_ << ": "
|
||||
<< sourceTypeNames_[source_] << "(" << sourceName_ << "):"
|
||||
<< nl << " Weight field " << weightFieldName_
|
||||
<< " must be a " << volScalarField::typeName
|
||||
<< nl << exit(FatalError);
|
||||
}
|
||||
Info<< " weight field = " << weightFieldName_;
|
||||
}
|
||||
|
||||
Info<< nl << endl;
|
||||
|
||||
Reference in New Issue
Block a user