tstTransitionMatrixP.f90

./Core/dc/f/tests/tstTransitionMatrixP.f90

2 
3 #include "ScaleSTL/FortranTestMacros.h"
4 
9 type(origen_transitionmatrixp) :: trx
10 type(origen_library) :: lib
11 type(origen_fakefactory) :: ff
12 integer :: itot,non,id
13 integer :: nind
14 logical :: loaded
15 type(integerlist) :: ilist
16 
17 call lib % initialize()
18 loaded = ff % Library_random1(lib,333)
19 
20 call lib % newptr_transition_matrix_at(trx,1_c_size_t)
21 expect_true( c_associated(trx%instance_ptr) )
22 
23 expect_eq( 2226, trx%get_itot() )
24 
25 !target id
26 id = 381621
27 
28 !check we can guess
29 nind = trx%find_nuclide_guess(id)
30 expect_eq(2193,nind) !0-based
31 
32 !check index is the same
33 call trx%get_nucl(ilist)
34 expect_eq(id,ilist%at(nind+1))
35 
36 nind = trx%find_nuclide_guess(391629)
37 expect_eq(trx%NOT_FOUND(),nind)
38 
39 call trx % destroy()
40 call lib % destroy()
41 
42 end program