ENH: scalarTransport: transfer write control from controlDict to function object

This commit is contained in:
Kutalmis Bercin
2022-01-06 16:05:12 +00:00
committed by Andrew Heather
parent ab976a5ac0
commit 32d3fabcfe

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2012-2017 OpenFOAM Foundation Copyright (C) 2012-2017 OpenFOAM Foundation
Copyright (C) 2015-2020 OpenCFD Ltd. Copyright (C) 2015-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -69,7 +69,7 @@ Foam::volScalarField& Foam::functionObjects::scalarTransport::transportedField()
mesh_.time().timeName(), mesh_.time().timeName(),
mesh_, mesh_,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::AUTO_WRITE IOobject::NO_WRITE
), ),
mesh_ mesh_
); );
@ -374,6 +374,14 @@ bool Foam::functionObjects::scalarTransport::execute()
bool Foam::functionObjects::scalarTransport::write() bool Foam::functionObjects::scalarTransport::write()
{ {
Log << type() << " write: " << name() << nl
<< tab << fieldName_ << nl
<< endl;
volScalarField& s = transportedField();
s.write();
return true; return true;
} }