ENH: objective: added function to output a blank line

to be used in separating instantaneous objective values of different
optimisation cycles.
This commit is contained in:
Vaggelis Papoutsis
2020-04-06 11:58:50 +03:00
committed by Andrew Heather
parent dcc039ce80
commit 01dfdc4794
2 changed files with 19 additions and 4 deletions

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2007-2020 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP Copyright (C) 2013-2020 FOSS GP
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -624,6 +624,18 @@ void objective::writeInstantaneousValue() const
} }
void objective::writeInstantaneousSeparator() const
{
if (Pstream::master())
{
if (instantValueFilePtr_.valid())
{
instantValueFilePtr_() << endl;
}
}
}
void objective::writeMeanValue() const void objective::writeMeanValue() const
{ {
if (Pstream::master()) if (Pstream::master())

View File

@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA Copyright (C) 2007-2020 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP Copyright (C) 2013-2020 FOSS GP
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -355,6 +355,9 @@ public:
//- Write objective function history at each primal solver iteration //- Write objective function history at each primal solver iteration
virtual void writeInstantaneousValue() const; virtual void writeInstantaneousValue() const;
//- Write objective function history at each primal solver iteration
virtual void writeInstantaneousSeparator() const;
//- Write mean objective function history //- Write mean objective function history
virtual void writeMeanValue() const; virtual void writeMeanValue() const;