ENH: added a default word to the IOMRFZoneList constructor

to allow for constructing different MRF zones for multi-point
optimisation runs
This commit is contained in:
Vaggelis Papoutsis
2020-12-01 15:29:24 +02:00
committed by Andrew Heather
parent 5ec8a4d4b1
commit 27ea73f905
2 changed files with 18 additions and 6 deletions

View File

@ -7,6 +7,7 @@
-------------------------------------------------------------------------------
Copyright (C) 2012-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2020 PCOpt/NTUA
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -34,12 +35,13 @@ License
Foam::IOobject Foam::IOMRFZoneList::createIOobject
(
const fvMesh& mesh
const fvMesh& mesh,
const word& solverName
) const
{
IOobject io
(
"MRFProperties",
"MRFProperties" + solverName,
mesh.time().constant(),
mesh,
IOobject::MUST_READ,
@ -67,10 +69,11 @@ Foam::IOobject Foam::IOMRFZoneList::createIOobject
Foam::IOMRFZoneList::IOMRFZoneList
(
const fvMesh& mesh
const fvMesh& mesh,
const word& solverName
)
:
IOdictionary(createIOobject(mesh)),
IOdictionary(createIOobject(mesh, solverName)),
MRFZoneList(mesh, *this)
{}

View File

@ -7,6 +7,7 @@
-------------------------------------------------------------------------------
Copyright (C) 2012 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2020 PCOpt/NTUA
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -77,7 +78,11 @@ private:
// Private Member Functions
//- Create IO object if dictionary is present
IOobject createIOobject(const fvMesh& mesh) const;
IOobject createIOobject
(
const fvMesh& mesh,
const word& solverName
) const;
//- No copy construct
IOMRFZoneList(const IOMRFZoneList&) = delete;
@ -91,7 +96,11 @@ public:
// Constructors
//- Construct from mesh
IOMRFZoneList(const fvMesh& mesh);
IOMRFZoneList
(
const fvMesh& mesh,
const word& solverName = word::null
);
//- Destructor