Skip to content
Snippets Groups Projects
Commit aa9dbbdb authored by Vaggelis Papoutsis's avatar Vaggelis Papoutsis
Browse files

ENH: objective: added function to output a blank line

to be used in separating instantaneous objective values of different
optimisation cycles.
parent 77b22fd9
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP
Copyright (C) 2007-2020 PCOpt/NTUA
Copyright (C) 2013-2020 FOSS GP
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
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
{
if (Pstream::master())
......
......@@ -5,8 +5,8 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2007-2019 PCOpt/NTUA
Copyright (C) 2013-2019 FOSS GP
Copyright (C) 2007-2020 PCOpt/NTUA
Copyright (C) 2013-2020 FOSS GP
Copyright (C) 2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
......@@ -355,6 +355,9 @@ public:
//- Write objective function history at each primal solver iteration
virtual void writeInstantaneousValue() const;
//- Write objective function history at each primal solver iteration
virtual void writeInstantaneousSeparator() const;
//- Write mean objective function history
virtual void writeMeanValue() const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment