Skip to content

Commit eacac5a

Browse files
RichardWaiteSTFCmducle
authored andcommitted
Add test with q-points chunked fastmode=true, hermit=false nomex
1 parent 6b7cf80 commit eacac5a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

+sw_tests/+unit_tests/unittest_spinw_spinwave.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,16 @@ function test_fastmode_mex_nomex(testCase)
682682
testCase.verify_val(spec0.Sperp(1:nMode,:), spec1.Sperp, 'abs_tol', 1e-8);
683683
testCase.verify_val(spec0.Sperp(1:nMode,:), spec2.Sperp, 'abs_tol', 1e-8);
684684
end
685+
function test_fastmode_memory_chunked_nomex(testCase)
686+
swpref.setpref('usemex', 0);
687+
sw_obj = copy(testCase.swobj);
688+
hkl = {[0 0 0] [1 0 0] [0 1 0] 50};
689+
% check that executes with no error
690+
spec_fast = sw_obj.spinwave(hkl, 'hermit', false, 'fastmode', true, 'optmem', 2);
691+
% eval with fastmode=false for comparison
692+
spec_slow = sw_obj.spinwave(hkl, 'hermit', false, 'fastmode', false);
693+
testCase.verify_val(spec_fast.omega, spec_slow.omega(1,:))
694+
end
685695
end
686696
methods (Test, TestTags = {'Symbolic'})
687697
function test_sw_symbolic_no_qpts(testCase)

0 commit comments

Comments
 (0)