mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
using neater writeEntryIfDifferent syntax
This commit is contained in:
@ -136,7 +136,7 @@ void buoyantPressureFvPatchScalarField::updateCoeffs()
|
||||
void buoyantPressureFvPatchScalarField::write(Ostream& os) const
|
||||
{
|
||||
fixedGradientFvPatchScalarField::write(os);
|
||||
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
@ -159,14 +159,8 @@ void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||
{
|
||||
fvPatchField<vector>::write(os);
|
||||
os.writeKeyword("flowRate") << flowRate_ << token::END_STATEMENT << nl;
|
||||
if (phiName_ != "phi")
|
||||
{
|
||||
os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
if (rhoName_ != "rho")
|
||||
{
|
||||
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||
writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user