Skip to content

PR #67 amended to retain praxis#68

Open
JeffreyBroll wants to merge 19 commits into
drsteve:masterfrom
JeffreyBroll:main
Open

PR #67 amended to retain praxis#68
JeffreyBroll wants to merge 19 commits into
drsteve:masterfrom
JeffreyBroll:main

Conversation

@JeffreyBroll

Copy link
Copy Markdown

A few familiar problems popped up when I ran a fresh build with GCC 16.1.1 and "--coverage -g" so I had to bonk a few things back into place

  • some familiar incomplete function prototypes, but now Lgm_SummersDxxThings don't fuss about incompatible types
  • some char* vs char*[] type whining
  • praxis decobwebbed and properly headed

Comment on lines -7 to -16
double (*f)( double, _qpInfo *); /* The integrand function -- I.e. the function to integrate */
_qpInfo *qpInfo; /* Auxilliary information to pass to function (to avoid making globals) */
double a; /* Lower Limit of integration. */
double b; /* Upper limit of integration. */
double epsabs; /* Absolute accuracy requested. */
double epsrel; /* Relative accuracy requested. */
double *result; /* The desired result. I.e. integral of f() from a to b */
double *abserr; /* Estimate of the modulus of the absolute error in the result */
int *neval; /* The number of integrand evaluations performed. */
int *ier; /* Error flag. An error occurred if ier > 0. See below. */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to preserve the comments somewhere. Doxygen docstring?

Comment on lines -258 to -268
double (*f)( double, _qpInfo *); /* The integrand function -- I.e. the function to integrate */
_qpInfo *qpInfo; /* Auxilliary information to pass to function (to avoid making globals) */
double a; /* Lower Limit of integration. */
double b; /* Upper limit of integration. */
double epsabs; /* Absolute accuracy requested. */
double epsrel; /* Relative accuracy requested. */
int limit;
double *result; /* The desired result. I.e. integral of f() from a to b */
double *abserr; /* Estimate of the modulus of the absolute error in the result */
int *neval; /* The number of integrand evaluations performed. */
int *ier; /* Error flag. An error occurred if ier > 0. See below. */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, comments need preserving. Doxygen docstring seems like a good spot.

Comment on lines -1136 to -1141
double (*f)( double, _qpInfo *); /* The integrand function -- I.e. the function to integrate */
_qpInfo *qpInfo; /* Auxilliary information to pass to function (to avoid making globals) */
double a; /* Lower Limit of integration. */
double b; /* Upper limit of integration. */
double *result; /* The desired result. I.e. integral of f() from a to b */
double *abserr; /* Estimate of the modulus of the absolute error in the result */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And one more on comments to be preserved

Comment on lines -7 to -18
double (*f)( double, _qpInfo *); /* The integrand function -- I.e. the function to integrate */
_qpInfo *qpInfo; /* Auxilliary information to pass to function (to avoid making globals) */
double a; /* Lower Limit of integration. */
double b; /* Upper limit of integration. */
int npts2;
double *points;
double epsabs; /* Absolute accuracy requested. */
double epsrel; /* Relative accuracy requested. */
double *result; /* The desired result. I.e. integral of f() from a to b */
double *abserr; /* Estimate of the modulus of the absolute error in the result */
int *neval; /* The number of integrand evaluations performed. */
int *ier; /* Error flag. An error occurred if ier > 0. See below. */

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments need preserving. Maybe doxygen docstring?

Comment on lines -296 to -309
double (*f)( double, _qpInfo *); /* The integrand function -- I.e. the function to integrate */
_qpInfo *qpInfo; /* Auxilliary information to pass to function (to avoid making globals) */
double a; /* Lower Limit of integration. */
double b; /* Upper limit of integration. */
int npts2;
double *points;
double epsabs; /* Absolute accuracy requested. */
double epsrel; /* Relative accuracy requested. */
int limit;
double *result; /* The desired result. I.e. integral of f() from a to b */
double *abserr; /* Estimate of the modulus of the absolute error in the result */
int *neval; /* The number of integrand evaluations performed. */
int *ier; /* Error flag. An error occurred if ier > 0. See below. */
double *alist;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment preservation society.

Comment thread libLanlGeoMag/praxis.c Outdated
Comment on lines +616 to +617
if (i1 != k1)
b[i1 - 1] = z;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces would help legibility

Comment thread libLanlGeoMag/praxis.c Outdated
Comment on lines +645 to +646
for (int i = ur; i >= lr; i--)
free((char *)(m[i] + lc));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces would help legibility

Comment thread libLanlGeoMag/praxis.c Outdated
Comment on lines +699 to +702
for (j = i1; j <= n; j++)
v[j][i] = a[i][j] / h;
for (j = i1; j <= n; j++)
elmcol(i1, n, j, i, v, v, matmat(i1, n, i, j, a, v));

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces would help legibility

Comment thread libLanlGeoMag/praxis.c Outdated
Comment on lines +704 to +705
for (j = i1; j <= n; j++)
v[i][j] = v[j][i] = 0.0;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces would help legibility

Comment thread libLanlGeoMag/praxis.c Outdated
Comment on lines +789 to +790
for (; l <= u; l++)
a[i][l] += b[j][l] * x;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces would help legibility

@JeffreyBroll

Copy link
Copy Markdown
Author

Commit 29e8b3a put the parameter descriptions into Doxygen-read comments in Lgm_QuadPack.h and commit 8998a85 puts brackets into praxis. I'm not entirely clear on what's happening in the three QuadPack#.c files so I didn't mess with those yet.

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.

2 participants