aboutsummaryrefslogtreecommitdiff
path: root/src/povray.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-18 18:21:30 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:33 +0100
commit599c277480ee1d3d5a1a2ffb486e855b845c0dbe (patch)
tree668685308cca58d126b11d10f98eb256c7dac0f6 /src/povray.c
parent33077f930ed81d70081a95edb7d7004390fa4047 (diff)
Compiles (with warnings)
Diffstat (limited to 'src/povray.c')
-rw-r--r--src/povray.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/povray.c b/src/povray.c
index 660f1c59..9fb267f4 100644
--- a/src/povray.c
+++ b/src/povray.c
@@ -30,7 +30,7 @@
int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
- const char *sym, int wght, double boost,
+ const SymOpList *sym, int wght, double boost,
double scale_top)
{
FILE *fh;
@@ -174,8 +174,10 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
float val;
signed int h, k, l;
+ SymOpList *sp;
get_indices(refl, &h, &k, &l);
+ sp = special_position(sym, h, k, l);
switch ( wght ) {
case WGHT_I :
@@ -187,7 +189,7 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
break;
case WGHT_COUNTS :
val = get_redundancy(refl);
- val /= (float)num_equivs(h, k, l, sym);
+ val /= (double)num_equivs(sp);
break;
case WGHT_RAWCOUNTS :
val = get_redundancy(refl);
@@ -199,6 +201,8 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
if ( val > max ) max = val;
+ free_symoplist(sp);
+
}
max /= boost;
@@ -216,8 +220,12 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
int s;
float val, p, r, g, b, trans;
int j;
+ SymOpList *sp;
+ int neq;
get_indices(refl, &h, &k, &l);
+ sp = special_position(sym, h, k, l);
+ neq = num_equivs(sp);
switch ( wght ) {
case WGHT_I :
@@ -229,7 +237,7 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
break;
case WGHT_COUNTS :
val = get_redundancy(refl);
- val /= (float)num_equivs(h, k, l, sym);
+ val /= (double)neq;
break;
case WGHT_RAWCOUNTS :
val = get_redundancy(refl);
@@ -281,12 +289,12 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
trans = 1.0-(val/max);
/* For each equivalent */
- for ( j=0; j<num_equivs(h, k, l, sym); j++ ) {
+ for ( j=0; j<neq; j++ ) {
signed int he, ke, le;
float x, y, z;
- get_equiv(h, k, l, &he, &ke, &le, sym, j);
+ get_equiv(sp, j, h, k, l, &he, &ke, &le);
x = asx*he + bsx*ke + csx*le;
y = asy*he + bsy*ke + csy*le;
@@ -303,6 +311,8 @@ int povray_render_animation(UnitCell *cell, RefList *list, unsigned int nproc,
}
+ free_symoplist(sp);
+
}
fprintf(fh, "\n");