aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-05-20 17:43:18 +0200
committerThomas White <taw@physics.org>2014-05-20 17:43:18 +0200
commitb2a198a4a7935d4c81c0b7044d9f89e3c6932472 (patch)
treed334718457565e35e7308abdd1462d3ccb8176dd /tests
parented307095fdf7f513232fb6edcd33a311510abe4e (diff)
Add Gaussian partiality model
Diffstat (limited to 'tests')
-rw-r--r--tests/pr_l_gradient_check.c12
-rw-r--r--tests/pr_p_gradient_check.c12
-rw-r--r--tests/pr_pl_gradient_check.c12
3 files changed, 30 insertions, 6 deletions
diff --git a/tests/pr_l_gradient_check.c b/tests/pr_l_gradient_check.c
index 4b3894ba..72d353f9 100644
--- a/tests/pr_l_gradient_check.c
+++ b/tests/pr_l_gradient_check.c
@@ -279,7 +279,6 @@ int main(int argc, char *argv[])
Crystal *cr;
struct quaternion orientation;
int i;
- const PartialityModel pmodel = PMODEL_SPHERE;
int fail = 0;
int quiet = 0;
int plot = 0;
@@ -337,10 +336,19 @@ int main(int argc, char *argv[])
rng = gsl_rng_alloc(gsl_rng_mt19937);
- for ( i=0; i<1; i++ ) {
+ for ( i=0; i<2; i++ ) {
UnitCell *rot;
double val;
+ PartialityModel pmodel;
+
+ if ( i == 0 ) {
+ pmodel = PMODEL_SPHERE;
+ STATUS("Testing flat sphere model:\n");
+ } else {
+ pmodel = PMODEL_GAUSSIAN;
+ STATUS("Testing Gaussian model:\n");
+ }
orientation = random_quaternion(rng);
rot = cell_rotate(cell, orientation);
diff --git a/tests/pr_p_gradient_check.c b/tests/pr_p_gradient_check.c
index c0582036..c3b55cfa 100644
--- a/tests/pr_p_gradient_check.c
+++ b/tests/pr_p_gradient_check.c
@@ -392,7 +392,6 @@ int main(int argc, char *argv[])
Crystal *cr;
struct quaternion orientation;
int i;
- const PartialityModel pmodel = PMODEL_SPHERE;
int fail = 0;
int quiet = 0;
int plot = 0;
@@ -450,10 +449,19 @@ int main(int argc, char *argv[])
rng = gsl_rng_alloc(gsl_rng_mt19937);
- for ( i=0; i<1; i++ ) {
+ for ( i=0; i<2; i++ ) {
UnitCell *rot;
double val;
+ PartialityModel pmodel;
+
+ if ( i == 0 ) {
+ pmodel = PMODEL_SPHERE;
+ STATUS("Testing flat sphere model:\n");
+ } else {
+ pmodel = PMODEL_GAUSSIAN;
+ STATUS("Testing Gaussian model:\n");
+ }
orientation = random_quaternion(rng);
rot = cell_rotate(cell, orientation);
diff --git a/tests/pr_pl_gradient_check.c b/tests/pr_pl_gradient_check.c
index 785d9973..ddbc1840 100644
--- a/tests/pr_pl_gradient_check.c
+++ b/tests/pr_pl_gradient_check.c
@@ -394,7 +394,6 @@ int main(int argc, char *argv[])
Crystal *cr;
struct quaternion orientation;
int i;
- const PartialityModel pmodel = PMODEL_SPHERE;
int fail = 0;
int quiet = 0;
int plot = 0;
@@ -452,10 +451,19 @@ int main(int argc, char *argv[])
rng = gsl_rng_alloc(gsl_rng_mt19937);
- for ( i=0; i<1; i++ ) {
+ for ( i=0; i<2; i++ ) {
UnitCell *rot;
double val;
+ PartialityModel pmodel;
+
+ if ( i == 0 ) {
+ pmodel = PMODEL_SPHERE;
+ STATUS("Testing flat sphere model:\n");
+ } else {
+ pmodel = PMODEL_GAUSSIAN;
+ STATUS("Testing Gaussian model:\n");
+ }
orientation = random_quaternion(rng);
rot = cell_rotate(cell, orientation);