mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: use simpler lookupPatchField form
This commit is contained in:
@ -89,17 +89,10 @@ void Foam::adjointOutletPressureFvPatchScalarField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const fvsPatchField<scalar>& phip =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("phi");
|
||||
|
||||
const fvsPatchField<scalar>& phiap =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("phia");
|
||||
|
||||
const fvPatchField<vector>& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>("U");
|
||||
|
||||
const fvPatchField<vector>& Uap =
|
||||
patch().lookupPatchField<volVectorField, vector>("Ua");
|
||||
const auto& phip = patch().lookupPatchField<surfaceScalarField>("phi");
|
||||
const auto& phiap = patch().lookupPatchField<surfaceScalarField>("phia");
|
||||
const auto& Up = patch().lookupPatchField<volVectorField>("U");
|
||||
const auto& Uap = patch().lookupPatchField<volVectorField>("Ua");
|
||||
|
||||
operator==((phiap/patch().magSf() - 1.0)*phip/patch().magSf() + (Up & Uap));
|
||||
|
||||
|
||||
@ -90,11 +90,8 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
|
||||
return;
|
||||
}
|
||||
|
||||
const fvsPatchField<scalar>& phiap =
|
||||
patch().lookupPatchField<surfaceScalarField, scalar>("phia");
|
||||
|
||||
const fvPatchField<vector>& Up =
|
||||
patch().lookupPatchField<volVectorField, vector>("U");
|
||||
const auto& phiap = patch().lookupPatchField<surfaceScalarField>("phia");
|
||||
const auto& Up = patch().lookupPatchField<volVectorField>("U");
|
||||
|
||||
scalarField Un(mag(patch().nf() & Up));
|
||||
vectorField UtHat((Up - patch().nf()*Un)/(Un + SMALL));
|
||||
|
||||
Reference in New Issue
Block a user