From b95331ef9440ad8e85f9fbfc6e245223cac69e30 Mon Sep 17 00:00:00 2001 From: Jonathan Maddock <78556175+jonmaddock@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:45:01 +0000 Subject: [PATCH] Add objective function to once-through mfile --- source/fortran/final_module.f90 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/fortran/final_module.f90 b/source/fortran/final_module.f90 index 9cc7b2c99a..d7a371339e 100644 --- a/source/fortran/final_module.f90 +++ b/source/fortran/final_module.f90 @@ -22,10 +22,11 @@ end subroutine final_header subroutine no_optimisation() use constants, only: mfile, nout - use numerics, only: neqns, nineqns, ipeqns, icc, lablcc, rcm + use numerics, only: neqns, nineqns, ipeqns, icc, lablcc, rcm, norm_objf use process_output, only: int_to_string3, ovarre, ocmmnt, oblnkl, osubhd, & oheadr use constraints, only: constraint_eqns + use function_evaluator, only: funfom implicit none @@ -34,12 +35,15 @@ subroutine no_optimisation() character(len=1), dimension(ipeqns) :: sym character(len=10), dimension(ipeqns) :: lab - !call funfom(objfun) call oheadr(nout,'Numerics') call ocmmnt(nout,'PROCESS has performed a run witout optimisation.') call oblnkl(nout) + ! Evaluate objective function + call funfom(norm_objf) + call ovarre(mfile,'Normalised objective function','(norm_objf)',norm_objf) + ! Print the residuals of the constraint equations call constraint_eqns(neqns+nineqns,-1,con1,con2,err,sym,lab) write(nout,120)