Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct nviter and convergence_parameter reporting in output #3054

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

timothy-nunn
Copy link
Contributor

@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
Contributor 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
20 checks passed
@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