aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_spherical_harmonics
diff options
context:
space:
mode:
Diffstat (limited to 'src/mtx_spherical_harmonics')
-rw-r--r--src/mtx_spherical_harmonics/chebyshev12.c2
-rw-r--r--src/mtx_spherical_harmonics/legendre_a.c4
-rw-r--r--src/mtx_spherical_harmonics/sharmonics.c8
-rw-r--r--src/mtx_spherical_harmonics/sharmonics_normalization.c2
-rw-r--r--src/mtx_spherical_harmonics/sph_radial.c1
5 files changed, 9 insertions, 8 deletions
diff --git a/src/mtx_spherical_harmonics/chebyshev12.c b/src/mtx_spherical_harmonics/chebyshev12.c
index 64af232..c713bad 100644
--- a/src/mtx_spherical_harmonics/chebyshev12.c
+++ b/src/mtx_spherical_harmonics/chebyshev12.c
@@ -38,7 +38,7 @@ void chebyshev12_free(Cheby12WorkSpace *wc) {
}
void chebyshev12(double *phi, Cheby12WorkSpace *wc) {
- int l,l0,n;
+ unsigned int l,l0,n;
const int incr=2*wc->nmax+1;
double *cosphi;
double *sinphi;
diff --git a/src/mtx_spherical_harmonics/legendre_a.c b/src/mtx_spherical_harmonics/legendre_a.c
index a0762b1..a6c2aa5 100644
--- a/src/mtx_spherical_harmonics/legendre_a.c
+++ b/src/mtx_spherical_harmonics/legendre_a.c
@@ -34,7 +34,7 @@ static void legendre_first_recurrence (double *sintheta, LegendreWorkSpace *wl)
}
static void legendre_second_recurrence (double *costheta, LegendreWorkSpace *wl) {
- int m,n,l,l0;
+ unsigned int m,n,l,l0;
int nmt0=-1;
int nmo0=0;
int n0=1;
@@ -88,7 +88,7 @@ void legendre_a_free(LegendreWorkSpace *wl) {
}
void legendre_a(double *theta, LegendreWorkSpace *wl) {
- int l,l0;
+ unsigned int l,l0;
const int incr=(wl->nmax+1)*(wl->nmax+2)/2;
double *costheta;
double *sintheta;
diff --git a/src/mtx_spherical_harmonics/sharmonics.c b/src/mtx_spherical_harmonics/sharmonics.c
index dbfcb18..e3416e5 100644
--- a/src/mtx_spherical_harmonics/sharmonics.c
+++ b/src/mtx_spherical_harmonics/sharmonics.c
@@ -22,8 +22,8 @@
// ly0 and lp0 denote the starting position for one vertex in the arrays
// see below to find out how the data is arranged
static void sharmonics_initlegendrenormlzd(SHWorkSpace *ws) {
- int n,m,ny0,np0;
- int l,ly0,lp0;
+ unsigned int n,m,ny0,np0;
+ unsigned int l,ly0,lp0;
const int pincr=(ws->nmax+1)*(ws->nmax+2)/2;
const int yincr=(ws->nmax+1)*(ws->nmax+1);
@@ -49,9 +49,9 @@ static void sharmonics_initlegendrenormlzd(SHWorkSpace *ws) {
// ly0 and lt0 denote the starting position for one vertex in the arrays
// see below to find out how the data is arranged
static void sharmonics_multcheby12(SHWorkSpace *ws) {
- int n,m,ny0;
+ unsigned int n,m,ny0;
const int nt0=ws->nmax;
- int l,ly0,lt0;
+ unsigned int l,ly0,lt0;
const int tincr=2*ws->nmax+1;
const int yincr=(ws->nmax+1)*(ws->nmax+1);
diff --git a/src/mtx_spherical_harmonics/sharmonics_normalization.c b/src/mtx_spherical_harmonics/sharmonics_normalization.c
index d7fe00a..0db0531 100644
--- a/src/mtx_spherical_harmonics/sharmonics_normalization.c
+++ b/src/mtx_spherical_harmonics/sharmonics_normalization.c
@@ -16,7 +16,7 @@
SHNorml *sharmonics_normalization_new (const size_t nmax) {
SHNorml *wn;
- int n,n0,m;
+ unsigned int n,n0,m;
const double oneoversqrt2 = 1.0/sqrt(2);
// memory allocation
diff --git a/src/mtx_spherical_harmonics/sph_radial.c b/src/mtx_spherical_harmonics/sph_radial.c
index 32e86bb..aaba2d9 100644
--- a/src/mtx_spherical_harmonics/sph_radial.c
+++ b/src/mtx_spherical_harmonics/sph_radial.c
@@ -13,6 +13,7 @@
*/
#include <math.h>
+#include <stdlib.h>
#include "sph_radial.h"