Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
[cRuntime] fix minor outpur issue in kinsol
Browse files Browse the repository at this point in the history
 - fixes 4395

Belonging to [master]:
  - #2677
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Sep 24, 2018
1 parent 090346b commit b860115
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SimulationRuntime/c/simulation/solver/kinsolSolver.c
Expand Up @@ -1027,10 +1027,12 @@ int nlsKinsolSolve(DATA *data, threadData_t *threadData, int sysNumber)
{
/* check if solution really solves the residuals */
nlsKinsolResiduals(kinsolData->initialGuess, kinsolData->fRes, &kinsolData->userData);
N_VProd(kinsolData->fRes, kinsolData->fScale, kinsolData->fRes);
if (!omc_flag[FLAG_NO_SCALING]){
N_VProd(kinsolData->fRes, kinsolData->fScale, kinsolData->fRes);
}
fNormValue = N_VWL2Norm(kinsolData->fRes, kinsolData->fRes);

infoStreamPrint(LOG_NLS_V, 0, "scaled Euclidean norm of F(u) = %e", fNormValue);
infoStreamPrint(LOG_NLS_V, 0, "%sEuclidean norm of F(u) = %e", (omc_flag[FLAG_NO_SCALING])?"":"scaled ", fNormValue);
if (FTOL_WITH_LESS_ACCURANCY<fNormValue)
{
warningStreamPrint(LOG_NLS_V, 0, "False positive solution. FNorm is not small enough.");
Expand Down

0 comments on commit b860115

Please sign in to comment.