id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,workpackage
852,"More unit tests, especially for oriented or 2d models",richardh,richardh,"
From my email of 20 Dec 2016, a survey of unit tests, initially for the ""oriented"" models,
and possibly not now completely accurate, shows that we are rather short of unit tests and really ought to add a lot more.
Fortunately when comparing gpu and cpu computations we can simply use the starting or
demo parameters, but these may not push the boundaries in quite the same way as a well
thought unit test.
[After sorting a bug in the new coordinate transform #836 I later fixed the unit tests in the new coordinates for cylinder (apart from a numerical issue in the 2d test which is sending back a slightly different value) and core_shell_ellipsoid.]
NOTE that currently the symmetric particles (only theta & phi angles)
are using the new angular coordinates, whilst the asymmetric ones
(theta, phi & psi angles) are still on the old coordinates, see #776
discussions about angular dispersity.
New angles theta’, phi’ from from old ones are given by:
cos(theta’) = cos(theta)sin(phi)
tan(phi’) = tan(theta)/cos(phi)
Note when writing unit tests, please make sure that all the parameter
values are numerically different, so that if they get shuffled on passing
through subroutine calls it might be noticed. In the list below ""no 2d calc""
means that angular dispersity is not currently allowed.
'''Cylinder functions '''
barbell – no tests
capped_cylinder – no tests
core_shell_bicelle – no tests
core_shell_bicelle_elliptical – one 1d test
core_shell_cylinder – no tests
cylinder – one 1d, one 2d test
elliptical_cylinder – one 1d test
flexible_cylinder – three 1d tests, another at Q=.001 commented out with “currently fails in OCL”, no 2d calc
flexible_cylinder_elliptical – three 1d tests, another at Q=.001 commented out with “currently fails in OCL”, no 2d calc
hollow_cylinder – two 1d tests,
pearl_necklace – one 1d test, no 2d calc
pringle – three 1d tests, no 2d calc
stacked_disks – all 1d & 2d, tests commented out
'''Ellipsoid Functions'''
core_shell_ellipsoid – two 1d, one 2d test
ellipsoid – no tests
triaxial_ellipsoid – no tests
'''Lamellae Functions'''
lamellar – one 1d test, no 2d calc
lamellar_hg – one 1d test, no 2d calc
lamellar_hg_stack_caille – one 1d test, no 2d calc
lamellar_stack_caille – one 1d test, no 2d calc
lamellar_stack_paracrystal – two 1d test, no 2d calc
Paracrystal Functions
bcc_paracrystal – no tests, (does 2d calc, has 3 angles)
fcc_paracrystal – no tests, (does 2d calc, has 3 angles)
sc_paracrystal – three 1d tests, (does 2d calc, has 3 angles)
Parallelepiped Functions
core_shell_parallelepiped - two 1d tests, two 2d tests, (has 3 angles, check in new coords?)
hollow_rectangular_prism – one 1d test, no 2d calc
hollow_rectangular_prism_thin_walls – one 1d test, no 2d calc
parallelepiped - one 1d test, two 2d tests, (has 3 angles, check in new coords?)
rectangular_prism – one 1d test, no 2d calc
'''Others'''
I am assuming that all “sphere” and “shape independent” functions are purely 1d.
",enhancement,closed,minor,SasView 4.2.0,sasmodels,fixed,unit tests,,SasView QA and testing