diff options
author | Thomas White <taw@physics.org> | 2019-03-09 11:42:55 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-11 16:49:37 +0100 |
commit | cb51ba0e53425ae663db313d730c1df644e4f76b (patch) | |
tree | d380d61eca0f6729b3af97a5065c16c8e0c5d19c /tests | |
parent | 7d5453e30c18a59b27b486298c3589046adbc308 (diff) |
Change matrix notation to match ITA chapter 5.1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/transformation_check.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/transformation_check.c b/tests/transformation_check.c index ba189e4e..2790d6f1 100644 --- a/tests/transformation_check.c +++ b/tests/transformation_check.c @@ -341,9 +341,9 @@ int main(int argc, char *argv[]) /* Permutation of axes */ if ( tfn == NULL ) return 1; - intmat_set_all_3x3(tfn, 0,1,0, - 0,0,1, - 1,0,0); + intmat_set_all_3x3(tfn, 0,0,1, + 1,0,0, + 0,1,0); fail += check_transformation(cell, tfn, 1); /* Doubling of cell in one direction */ @@ -355,28 +355,28 @@ int main(int argc, char *argv[]) /* Shearing */ if ( tfn == NULL ) return 1; - intmat_set_all_3x3(tfn, 1,1,0, - 0,1,0, + intmat_set_all_3x3(tfn, 1,0,0, + 1,1,0, 0,0,1); fail += check_transformation(cell, tfn, 1); /* Crazy */ if ( tfn == NULL ) return 1; - intmat_set_all_3x3(tfn, 1,1,0, - 0,1,0, - 0,1,1); + intmat_set_all_3x3(tfn, 1,0,0, + 1,1,1, + 0,0,1); fail += check_transformation(cell, tfn, 0); /* Identity in two parts */ part1 = intmat_identity(3); part2 = intmat_identity(3); if ( tfn == NULL ) return 1; - intmat_set_all_3x3(part1, 0,0,1, - 0,1,0, - -1,0,0); - intmat_set_all_3x3(part2, 0,0,-1, - 0,1,0, - 1,0,0); + intmat_set_all_3x3(part1, 0,0,-1, + 0,1,0, + 1,0,0); + intmat_set_all_3x3(part2, 0,0,1, + 0,1,0, + -1,0,0); tfn = intmat_intmat_mult(part1, part2); fail += check_identity(cell, tfn); intmat_free(part1); |