aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-11-17 13:36:07 +0100
committerThomas White <taw@physics.org>2009-11-17 13:36:07 +0100
commit7d6f1c3261973ec8d8b2d9f289277f1693cf3cd9 (patch)
tree777f95f781fc9b937754c21821e1fef46fc58a9f
parent19cda1356d1f53103c70efe5c624f898b35bc711 (diff)
Tidy up (makes icc happier)
-rw-r--r--src/diffraction.c24
-rw-r--r--src/ewald.c1
-rw-r--r--src/hdf5-file.c1
3 files changed, 13 insertions, 13 deletions
diff --git a/src/diffraction.c b/src/diffraction.c
index 9fcde28b..a4a03b64 100644
--- a/src/diffraction.c
+++ b/src/diffraction.c
@@ -62,7 +62,7 @@ static double lattice_factor(struct threevec q, double ax, double ay, double az,
/* Look up f1 and f2 for this atom at this energy (in J/photon) */
-static complex get_sfac(const char *n, double en)
+static double complex get_sfac(const char *n, double en)
{
FILE *fh;
char filename[64];
@@ -104,7 +104,7 @@ static complex get_sfac(const char *n, double en)
last_f2 = f2;
} else {
- double f;
+ float f;
float actual_f1, actual_f2;
f = (en - last_E) / (E - last_E);
@@ -128,8 +128,8 @@ static complex get_sfac(const char *n, double en)
}
-static complex molecule_factor(struct molecule *mol, struct threevec q,
- double en)
+static double complex molecule_factor(struct molecule *mol, struct threevec q,
+ double en)
{
int i;
double F = 0.0;
@@ -183,7 +183,7 @@ static struct molecule *load_molecule()
do {
char el[4];
- int i, r;
+ int j, r;
int done = 0;
float x, y, z, occ, B;
char *coords;
@@ -211,24 +211,23 @@ static struct molecule *load_molecule()
abort();
}
- for ( i=0; i<mol->n_species; i++ ) {
+ for ( j=0; j<mol->n_species; j++ ) {
struct mol_species *spec;
int n;
- spec = mol->species[i];
+ spec = mol->species[j];
if ( strcmp(spec->species, el) != 0 ) continue;
-
- n = mol->species[i]->n_atoms;
+ n = mol->species[j]->n_atoms;
spec->x[n] = x;
spec->y[n] = y;
spec->z[n] = z;
spec->occ[n] = occ;
spec->B[n] = B;
- mol->species[i]->n_atoms++;
+ mol->species[j]->n_atoms++;
done = 1;
@@ -285,13 +284,14 @@ void get_diffraction(struct image *image, UnitCell *cell)
&bx, &by, &bz,
&cx, &cy, &cz);
- image->sfacs = malloc(image->width * image->height * sizeof(complex));
+ image->sfacs = malloc(image->width * image->height
+ * sizeof(double complex));
for ( x=0; x<image->width; x++ ) {
for ( y=0; y<image->height; y++ ) {
double f_lattice;
- complex f_molecule;
+ double complex f_molecule;
struct threevec q;
q = image->qvecs[x + image->width*y];
diff --git a/src/ewald.c b/src/ewald.c
index 5be65644..9968538e 100644
--- a/src/ewald.c
+++ b/src/ewald.c
@@ -23,7 +23,6 @@ void get_ewald(struct image *image)
{
int x, y;
double k; /* Wavenumber */
- double i0fac;
k = 1/image->lambda;
diff --git a/src/hdf5-file.c b/src/hdf5-file.c
index d90dd6b3..0d090281 100644
--- a/src/hdf5-file.c
+++ b/src/hdf5-file.c
@@ -20,6 +20,7 @@
#include <hdf5.h>
#include "image.h"
+#include "hdf5-file.h"
int hdf5_write(const char *filename, const uint16_t *data,