mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more explicit use of REGISTER when storing fields
ENH: add phaseScopedName convenience method - unites IOobject::scopedName + phasePropertyName
This commit is contained in:
@ -404,10 +404,11 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc
|
||||
|
||||
bool Foam::functionObjects::streamFunction::calc()
|
||||
{
|
||||
if (foundObject<surfaceScalarField>(fieldName_))
|
||||
const auto* phiPtr = findObject<surfaceScalarField>(fieldName_);
|
||||
|
||||
if (phiPtr)
|
||||
{
|
||||
const surfaceScalarField& phi =
|
||||
mesh_.lookupObject<surfaceScalarField>(fieldName_);
|
||||
const surfaceScalarField& phi = *phiPtr;
|
||||
|
||||
return store(resultName_, calc(phi));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user