<commit_before>#include <private/vecimpl.h>
#include <private/matimpl.h>
#include <private/pcimpl.h>
#include <private/kspimpl.h>
#include <private/snesimpl.h>
#include <private/tsimpl.h>

EXTERN_C_BEGIN
extern PetscErrorCode (*PetscPythonMonitorSet_C)(PetscObject,const char*);
EXTERN_C_END

EXTERN_C_BEGIN
#define PetscFwkPythonCall_C        PetscFwkPythonCall
#define PetscFwkPythonLoadVTable_C  PetscFwkPythonLoadVTable
#define PetscFwkPythonClearVTable_C PetscFwkPythonClearVTable
extern PetscErrorCode (*PetscFwkPythonCall_C)(PetscFwk,const char*,void*);
extern PetscErrorCode (*PetscFwkPythonLoadVTable_C)(PetscFwk,const char*,const char*,void**);
extern PetscErrorCode (*PetscFwkPythonClearVTable_C)(PetscFwk,void**);
EXTERN_C_END

#undef __FUNCT__
#define __FUNCT__ "KSPLogHistory"
PETSC_STATIC_INLINE
PetscErrorCode KSPLogHistory(KSP ksp,PetscInt iter,PetscReal rnorm)
{
  /*PetscErrorCode ierr;*/
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ksp,KSP_CLASSID,1);
  KSPLogResidualHistory(ksp,rnorm);
  PetscFunctionReturn(0);
}

#undef __FUNCT__
#define __FUNCT__ "SNESLogHistory"
PETSC_STATIC_INLINE
PetscErrorCode SNESLogHistory(SNES snes,PetscInt iter,PetscReal rnorm,PetscInt lits)
{
  /*PetscErrorCode ierr;*/
  PetscFunctionBegin;
  PetscValidHeaderSpecific(snes,SNES_CLASSID,1);
  SNESLogConvHistory(snes,rnorm,lits);
  PetscFunctionReturn(0);
}

#undef __FUNCT__
#define __FUNCT__ "KSPConverged"
PETSC_STATIC_INLINE
PetscErrorCode KSPConverged(KSP ksp, 
                            PetscInt iter,PetscReal rnorm,
                            KSPConvergedReason *reason)
{
  PetscErrorCode ierr;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ksp,KSP_CLASSID,1);
  if (reason) PetscValidPointer(reason,2);
  if (!iter) {
    ksp->reason = KSP_CONVERGED_ITERATING;
    ksp->rnorm0 = rnorm;
    ksp->ttol = PetscMax(ksp->rtol*ksp->rnorm0,ksp->abstol);
  }
  if (ksp->converged) {
    ierr = (*ksp->converged)(ksp,iter,rnorm,&ksp->reason,ksp->cnvP);CHKERRQ(ierr);
  } else {
    ierr = KSPSkipConverged(ksp,iter,rnorm,&ksp->reason,NULL);CHKERRQ(ierr);
    /*ierr = KSPDefaultConverged(ksp,iter,rnorm,&ksp->reason,NULL);CHKERRQ(ierr);*/
  }
  ksp->rnorm = rnorm;
  if (reason) *reason = ksp->reason;
  PetscFunctionReturn(0);<commit_msg>Unimportant change<commit_after>#include <private/vecimpl.h>
#include <private/matimpl.h>
#include <private/pcimpl.h>
#include <private/kspimpl.h>
#include <private/snesimpl.h>
#include <private/tsimpl.h>

EXTERN_C_BEGIN
extern PetscErrorCode (*PetscPythonMonitorSet_C)(PetscObject,const char*);
EXTERN_C_END

EXTERN_C_BEGIN
#define PetscFwkPythonCall_C        PetscFwkPythonCall
#define PetscFwkPythonLoadVTable_C  PetscFwkPythonLoadVTable
#define PetscFwkPythonClearVTable_C PetscFwkPythonClearVTable
extern PetscErrorCode (*PetscFwkPythonCall_C)(PetscFwk,const char*,void*);
extern PetscErrorCode (*PetscFwkPythonLoadVTable_C)(PetscFwk,const char*,const char*,void**);
extern PetscErrorCode (*PetscFwkPythonClearVTable_C)(PetscFwk,void**);
EXTERN_C_END

#undef __FUNCT__
#define __FUNCT__ "KSPLogHistory"
PETSC_STATIC_INLINE
PetscErrorCode KSPLogHistory(KSP ksp,PetscInt iter,PetscReal rnorm)
{
  /*PetscErrorCode ierr;*/
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ksp,KSP_CLASSID,1);
  KSPLogResidualHistory(ksp,rnorm);
  PetscFunctionReturn(0);
}

#undef __FUNCT__
#define __FUNCT__ "SNESLogHistory"
PETSC_STATIC_INLINE
PetscErrorCode SNESLogHistory(SNES snes,PetscInt iter,PetscReal rnorm,PetscInt lits)
{
  /*PetscErrorCode ierr;*/
  PetscFunctionBegin;
  PetscValidHeaderSpecific(snes,SNES_CLASSID,1);
  SNESLogConvHistory(snes,rnorm,lits);
  PetscFunctionReturn(0);
}

#undef __FUNCT__
#define __FUNCT__ "KSPConverged"
PETSC_STATIC_INLINE
PetscErrorCode KSPConverged(KSP ksp, 
                            PetscInt iter,PetscReal rnorm,
                            KSPConvergedReason *reason)
{
  PetscErrorCode ierr;
  PetscFunctionBegin;
  PetscValidHeaderSpecific(ksp,KSP_CLASSID,1);
  if (reason) PetscValidPointer(reason,2);
  if (!iter) ksp->rnorm0 = rnorm;
  if (!iter) {
    ksp->reason = KSP_CONVERGED_ITERATING;
    ksp->ttol = PetscMax(rnorm*ksp->rtol,ksp->abstol);
  }
  if (ksp->converged) {
    ierr = (*ksp->converged)(ksp,iter,rnorm,&ksp->reason,ksp->cnvP);CHKERRQ(ierr);
  } else {
    ierr = KSPSkipConverged(ksp,iter,rnorm,&ksp->reason,NULL);CHKERRQ(ierr);
    /*ierr = KSPDefaultConverged(ksp,iter,rnorm,&ksp->reason,NULL);CHKERRQ(ierr);*/
  }
  ksp->rnorm = rnorm;
  if (reason) *reason = ksp->reason;
  PetscFunctionReturn(0);
{'fraction_non_alphanumeric': 0.11536758193091232, 'fraction_numerical': 0.0037643932683790967, 'mean_word_length': 6.297253634894992, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2850268', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1768, 'n_words': 244}