freestreamFvPatchField<Type>::freestreamFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict ) : inletOutletFvPatchField<Type>(p, iF) { freestreamValue() = Field<Type>("freestreamValue", dict, p.size()); if (dict.found("value")) { fvPatchField<Type>::operator= ( Field<Type>("value", dict, p.size()) ); } else { fvPatchField<Type>::operator=(freestreamValue()); } dict.readIfPresent("phi", this->phiName_); }
freestreamFvPatchField<Type>::freestreamFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict ) : inletOutletFvPatchField<Type>(p, iF) { this->phiName_ = dict.lookupOrDefault<word>("phi","phi"); freestreamValue() = gpuField<Type>("freestreamValue", dict, p.size()); if (dict.found("value")) { fvPatchField<Type>::operator= ( gpuField<Type>("value", dict, p.size()) ); } else { fvPatchField<Type>::operator=(freestreamValue()); } }
void freestreamFvPatchField<Type>::write(Ostream& os) const { fvPatchField<Type>::write(os); if (this->phiName_ != "phi") { os.writeKeyword("phi") << this->phiName_ << token::END_STATEMENT << nl; } freestreamValue().writeEntry("freestreamValue", os); this->writeEntry("value", os); }