Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
maggul committed Oct 4, 2024
1 parent b4b0ee8 commit 45df944
Show file tree
Hide file tree
Showing 9 changed files with 300 additions and 247 deletions.
18 changes: 9 additions & 9 deletions examples/arkode/C_serial/ark_analytic_lsrk.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ int main(void)
N_VGetArrayPointer(y)[0]); /* access/print solution */
fprintf(UFID, " %.16" ESYM " %.16" ESYM "\n", t, N_VGetArrayPointer(y)[0]);
if (flag < 0)
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
}
printf(" ---------------------\n");
fclose(UFID);
Expand Down
18 changes: 9 additions & 9 deletions examples/arkode/C_serial/ark_analytic_lsrk_varjac.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ int main(void)
N_VGetArrayPointer(y)[0]); /* access/print solution */
fprintf(UFID, " %.16" ESYM " %.16" ESYM "\n", t, N_VGetArrayPointer(y)[0]);
if (flag < 0)
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
}
printf(" ---------------------\n");
fclose(UFID);
Expand Down
18 changes: 9 additions & 9 deletions examples/arkode/C_serial/ark_analytic_ssprk.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ int main(void)
N_VGetArrayPointer(y)[0]); /* access/print solution */
fprintf(UFID, " %.16" ESYM " %.16" ESYM "\n", t, N_VGetArrayPointer(y)[0]);
if (flag < 0)
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
{ /* unsuccessful solve: break */
fprintf(stderr, "Solver failure, stopping integration\n");
break;
}
else
{ /* successful solve: update time */
tout += dTout;
tout = (tout > Tf) ? Tf : tout;
}
}
printf(" ---------------------\n");
fclose(UFID);
Expand Down
11 changes: 5 additions & 6 deletions include/arkode/arkode_lsrkstep.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
extern "C" {
#endif

#define STAGE_MAX_LIMIT 1000000
#define DOM_EIG_SAFETY_DEFAULT SUN_RCONST(1.01)
#define DOM_EIG_FREQ_DEFAULT 25
#define STAGE_MAX_LIMIT 1000000
#define DOM_EIG_SAFETY_DEFAULT SUN_RCONST(1.01)
#define DOM_EIG_FREQ_DEFAULT 25
#define RETRY_CONTRACTION_FAC_DEFAULT SUN_RCONST(0.9)

typedef int (*ARKDomEigFn)(sunrealtype t, N_Vector y, N_Vector fn,
Expand Down Expand Up @@ -82,8 +82,8 @@ SUNDIALS_EXPORT int LSRKStepSetMaxNumStages(void* arkode_mem,
SUNDIALS_EXPORT int LSRKStepSetDomEigSafetyFactor(void* arkode_mem,
sunrealtype dom_eig_safety);

SUNDIALS_EXPORT int LSRKStepSetReTryContractionFactor(void* arkode_mem,
sunrealtype retry_contraction_fac);
SUNDIALS_EXPORT int LSRKStepSetReTryContractionFactor(
void* arkode_mem, sunrealtype retry_contraction_fac);

SUNDIALS_EXPORT int LSRKStepSetSSPStageNum(void* arkode_mem, int num_of_stages);

Expand All @@ -97,7 +97,6 @@ SUNDIALS_EXPORT int LSRKStepGetNumDomEigUpdates(void* arkode_mem,

SUNDIALS_EXPORT int LSRKStepGetMaxNumStages(void* arkode_mem, int* stage_max);


#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 45df944

Please sign in to comment.