diff --git a/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.C b/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.C index a9a910d6a7a9fc7674477ec39ffee449df7adc10..975813fdbc9a21e16705e1e105635d765c6fb232 100644 --- a/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.C +++ b/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.C @@ -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()) diff --git a/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.H b/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.H index 2293da74de47a7b5832868ef9bb337006e4c7528..7b6a3aa3d49f8a8fc78c5ee60ffd54d1f1abe701 100644 --- a/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.H +++ b/src/optimisation/adjointOptimisation/adjoint/objectives/objective/objective.H @@ -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;