Skip to content

Correct nviter and convergence_parameter reporting in output#3054

Merged
jonmaddock merged 2 commits intomainfrom
3025-the-int-nviter-is-not-increased-in-the-outdat
Feb 15, 2024
Merged

Correct nviter and convergence_parameter reporting in output#3054
jonmaddock merged 2 commits intomainfrom
3025-the-int-nviter-is-not-increased-in-the-outdat

Conversation

@timothy-nunn
Copy link
Copy Markdown
Collaborator

@timothy-nunn timothy-nunn commented Feb 14, 2024

Description

PyVMCON interface in PROCESS now updates the nviter and convergence_parameter values so they can be correctly reported in the OUT.DAT and MFILE.DAT

I have also corrected the dummy variables in the _solver_callback because they were the wrong way around.

And, I have removed nviter from the regression test comparison because it does not make much sense to fail if the number of iterations has changed (we should only care about the solution).

@timothy-nunn timothy-nunn linked an issue Feb 14, 2024 that may be closed by this pull request
@timothy-nunn timothy-nunn self-assigned this Feb 14, 2024
@timothy-nunn
Copy link
Copy Markdown
Collaborator Author

Large tokamak now reports the below in the OUT.DAT:

VMCON error flag                                                         (ifail)                           1     
 Number of iteration variables                                            (nvar)                           45     
 Number of constraints (total)                                            (neqns+nineqns)                  26     
 Optimisation switch                                                      (ioptimz)                         1     
 Figure of merit switch                                                   (minmax)                          1     
 Square root of the sum of squares of the constraint residuals            (sqsumsq)                 1.871E-04  OP 
 VMCON convergence parameter                                              (convergence_parameter)   4.087E-09  OP 
 Normalised objective function                                            (norm_objf)               1.600E+00  OP 
 Number of VMCON iterations                                               (nviter)                          8  OP 

The MFILE also agrees

@jonmaddock jonmaddock merged commit a422025 into main Feb 15, 2024
@jonmaddock jonmaddock deleted the 3025-the-int-nviter-is-not-increased-in-the-outdat branch February 15, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The int nviter is not increased in the OUT.DAT

2 participants