Skip to content

Commit

Permalink
Fix spelling errors unrelated to this PR but caused by codespell update
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven-Roberts committed Jan 21, 2025
1 parent 4ab53fe commit a8af8ea
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_imex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,7 @@ static int PrintUserData(UserData* udata)
cout << " linear = " << udata->linear << endl;
cout << " --------------------------------- " << endl;
cout << " lin iters = " << udata->liniters << endl;
cout << " eps lins = " << udata->epslin << endl;
cout << " eps lin = " << udata->epslin << endl;
cout << " prectype = " << udata->prectype << endl;
cout << " msbp = " << udata->msbp << endl;
cout << " pfmg_relax = " << udata->pfmg_relax << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
linear = 0
---------------------------------
lin iters = 10
eps lins = -1
eps lin = -1
prectype = 1
msbp = 0
pfmg_relax = 2
Expand Down
2 changes: 1 addition & 1 deletion examples/arkode/CXX_parhyp/ark_heat2D_hypre_pfmg_mri.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ static int PrintUserData(UserData* udata)
cout << " linear = " << udata->linear << endl;
cout << " --------------------------------- " << endl;
cout << " lin iters = " << udata->liniters << endl;
cout << " eps lins = " << udata->epslin << endl;
cout << " eps lin = " << udata->epslin << endl;
cout << " prectype = " << udata->prectype << endl;
cout << " msbp = " << udata->msbp << endl;
cout << " pfmg_relax = " << udata->pfmg_relax << endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
linear = 0
---------------------------------
lin iters = 10
eps lins = -1
eps lin = -1
prectype = 1
msbp = 0
pfmg_relax = 2
Expand Down
8 changes: 4 additions & 4 deletions examples/cvodes/parallel/cvsAdvDiff_ASAp_non_p.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ static void PrintOutput(sunrealtype g_val, N_Vector uB, UserData data)
MPI_Comm comm;
MPI_Status status;
int j, npes, my_pe;
sunindextype i, Ni, indx, local_N, nperpe, nrem;
sunindextype i, Ni, index, local_N, nperpe, nrem;
sunrealtype* uBdata;
sunrealtype* mu;

Expand Down Expand Up @@ -742,12 +742,12 @@ static void PrintOutput(sunrealtype g_val, N_Vector uB, UserData data)
mu = (sunrealtype*)malloc(NEQ * sizeof(sunrealtype));
if (check_retval((void*)mu, "malloc", 2, my_pe)) { MPI_Abort(comm, 1); }

indx = 0;
index = 0;
for (j = 0; j < npes; j++)
{
Ni = (j < nrem) ? nperpe + 1 : nperpe;
MPI_Recv(&mu[indx], (int)Ni, MPI_SUNREALTYPE, j, 0, comm, &status);
indx += Ni;
MPI_Recv(&mu[index], (int)Ni, MPI_SUNREALTYPE, j, 0, comm, &status);
index += Ni;
}

printf("mu(t0)\n");
Expand Down
2 changes: 1 addition & 1 deletion examples/cvodes/parallel/cvsAtmDisp_ASAi_kry_bbd_p.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ static void Load_yext(sunrealtype* src, ProblemData d)
/*
*------------------------------------------------------------------
* PrintHeader:
* Print first lins of output (problem description)
* Print first lines of output (problem description)
*------------------------------------------------------------------
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/kinsol/CUDA_mpi/kin_em_mpicuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ static int EM(N_Vector u, N_Vector f, void* user_data)
sunrealtype* mu_bottom_dev = N_VGetDeviceArrayPointer_Cuda(udata->mu_bottom);
sunrealtype* mu_top_dev = N_VGetDeviceArrayPointer_Cuda(udata->mu_top);

// Initilaize output vectors to zero (for sum reduction)
// Initialize output vectors to zero (for sum reduction)
N_VConst(ZERO, udata->mu_bottom);
N_VConst(ZERO, udata->mu_top);

Expand Down
68 changes: 34 additions & 34 deletions src/cvodes/cvodea.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void CVAbckpbDelete(CVodeBMem* cvB_memPtr);
static int CVAdataStore(CVodeMem cv_mem, CVckpntMem ck_mem);
static int CVAckpntGet(CVodeMem cv_mem, CVckpntMem ck_mem);

static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* indx,
static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* index,
sunbooleantype* newpoint);

static sunbooleantype CVAhermiteMalloc(CVodeMem cv_mem);
Expand Down Expand Up @@ -2538,16 +2538,16 @@ static int CVAckpntGet(CVodeMem cv_mem, CVckpntMem ck_mem)
* CVAfindIndex
*
* Finds the index in the array of data point structures such that
* dt_mem[indx-1].t <= t < dt_mem[indx].t
* If indx is changed from the previous invocation, then newpoint = SUNTRUE
* dt_mem[index-1].t <= t < dt_mem[index].t
* If index is changed from the previous invocation, then newpoint = SUNTRUE
*
* If t is beyond the leftmost limit, but close enough, indx=0.
* If t is beyond the leftmost limit, but close enough, index=0.
*
* Returns CV_SUCCESS if successful and CV_GETY_BADT if unable to
* find indx (t is too far beyond limits).
* find index (t is too far beyond limits).
*/

static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* indx,
static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* index,
sunbooleantype* newpoint)
{
CVadjMem ca_mem;
Expand All @@ -2571,28 +2571,28 @@ static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* indx,
ca_mem->ca_IMnewData = SUNFALSE;
}

/* Search for indx starting from ilast */
/* Search for index starting from ilast */
to_left = (sign * (t - dt_mem[ca_mem->ca_ilast - 1]->t) < ZERO);
to_right = (sign * (t - dt_mem[ca_mem->ca_ilast]->t) > ZERO);

if (to_left)
{
/* look for a new indx to the left */
/* look for a new index to the left */

*newpoint = SUNTRUE;

*indx = ca_mem->ca_ilast;
*index = ca_mem->ca_ilast;
for (;;)
{
if (*indx == 0) { break; }
if (sign * (t - dt_mem[*indx - 1]->t) <= ZERO) { (*indx)--; }
if (*index == 0) { break; }
if (sign * (t - dt_mem[*index - 1]->t) <= ZERO) { (*index)--; }
else { break; }
}

if (*indx == 0) { ca_mem->ca_ilast = 1; }
else { ca_mem->ca_ilast = *indx; }
if (*index == 0) { ca_mem->ca_ilast = 1; }
else { ca_mem->ca_ilast = *index; }

if (*indx == 0)
if (*index == 0)
{
/* t is beyond leftmost limit. Is it too far? */
if (SUNRabs(t - dt_mem[0]->t) > FUZZ_FACTOR * cv_mem->cv_uround)
Expand All @@ -2603,24 +2603,24 @@ static int CVAfindIndex(CVodeMem cv_mem, sunrealtype t, long int* indx,
}
else if (to_right)
{
/* look for a new indx to the right */
/* look for a new index to the right */

*newpoint = SUNTRUE;

*indx = ca_mem->ca_ilast;
*index = ca_mem->ca_ilast;
for (;;)
{
if (sign * (t - dt_mem[*indx]->t) > ZERO) { (*indx)++; }
if (sign * (t - dt_mem[*index]->t) > ZERO) { (*index)++; }
else { break; }
}

ca_mem->ca_ilast = *indx;
ca_mem->ca_ilast = *index;
}
else
{
/* ilast is still OK */

*indx = ca_mem->ca_ilast;
*index = ca_mem->ca_ilast;
}

return (CV_SUCCESS);
Expand Down Expand Up @@ -2918,7 +2918,7 @@ static int CVAhermiteGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y, N_Vector*
N_Vector *yS0 = NULL, *ySd0 = NULL, *yS1, *ySd1;

int flag, is, NS;
long int indx;
long int index;
sunbooleantype newpoint;

/* local variables for fused vector oerations */
Expand All @@ -2936,13 +2936,13 @@ static int CVAhermiteGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y, N_Vector*

/* Get the index in dt_mem */

flag = CVAfindIndex(cv_mem, t, &indx, &newpoint);
flag = CVAfindIndex(cv_mem, t, &index, &newpoint);
if (flag != CV_SUCCESS) { return (flag); }

/* If we are beyond the left limit but close enough,
then return y at the left limit. */

if (indx == 0)
if (index == 0)
{
content0 = (CVhermiteDataMem)(dt_mem[0]->content);
N_VScale(ONE, content0->y, y);
Expand All @@ -2960,11 +2960,11 @@ static int CVAhermiteGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y, N_Vector*

/* Extract stuff from the appropriate data points */

t0 = dt_mem[indx - 1]->t;
t1 = dt_mem[indx]->t;
t0 = dt_mem[index - 1]->t;
t1 = dt_mem[index]->t;
delta = t1 - t0;

content0 = (CVhermiteDataMem)(dt_mem[indx - 1]->content);
content0 = (CVhermiteDataMem)(dt_mem[index - 1]->content);
y0 = content0->y;
yd0 = content0->yd;
if (ca_mem->ca_IMinterpSensi)
Expand All @@ -2977,7 +2977,7 @@ static int CVAhermiteGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y, N_Vector*
{
/* Recompute Y0 and Y1 */

content1 = (CVhermiteDataMem)(dt_mem[indx]->content);
content1 = (CVhermiteDataMem)(dt_mem[index]->content);

y1 = content1->y;
yd1 = content1->yd;
Expand Down Expand Up @@ -3277,7 +3277,7 @@ static int CVApolynomialGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y,
CVpolynomialDataMem content;

int flag, dir, order, i, j, is, NS, retval;
long int indx, base;
long int index, base;
sunbooleantype newpoint;
sunrealtype dt, factor;

Expand All @@ -3290,13 +3290,13 @@ static int CVApolynomialGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y,

/* Get the index in dt_mem */

flag = CVAfindIndex(cv_mem, t, &indx, &newpoint);
flag = CVAfindIndex(cv_mem, t, &index, &newpoint);
if (flag != CV_SUCCESS) { return (flag); }

/* If we are beyond the left limit but close enough,
then return y at the left limit. */

if (indx == 0)
if (index == 0)
{
content = (CVpolynomialDataMem)(dt_mem[0]->content);
N_VScale(ONE, content->y, y);
Expand All @@ -3313,7 +3313,7 @@ static int CVApolynomialGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y,

/* Scaling factor */

dt = SUNRabs(dt_mem[indx]->t - dt_mem[indx - 1]->t);
dt = SUNRabs(dt_mem[index]->t - dt_mem[index - 1]->t);

/* Find the direction of the forward integration */

Expand All @@ -3324,17 +3324,17 @@ static int CVApolynomialGetY(CVodeMem cv_mem, sunrealtype t, N_Vector y,

if (dir == 1)
{
base = indx;
base = index;
content = (CVpolynomialDataMem)(dt_mem[base]->content);
order = content->order;
if (indx < order) { base += order - indx; }
if (index < order) { base += order - index; }
}
else
{
base = indx - 1;
base = index - 1;
content = (CVpolynomialDataMem)(dt_mem[base]->content);
order = content->order;
if (ca_mem->ca_np - indx > order) { base -= indx + order - ca_mem->ca_np; }
if (ca_mem->ca_np - index > order) { base -= index + order - ca_mem->ca_np; }
}

/* Recompute Y (divided differences for Newton polynomial) if needed */
Expand Down
Loading

0 comments on commit a8af8ea

Please sign in to comment.