User routine seems not work

Dear experts,
The attachment is my file. The model relate to optical photon’s wavelength convert, so I use wvlnsh.f, but it seems that the user routine did not work from the result of USRBDX. Could you help me to find the reason?
Look forward to your help.
detector(ZnO).inp (3.3 KB)
abscff.f (1.4 KB)
wvlnsh.f (2.7 KB)
surH.f (2.7 KB)

Dear Xiong,

there are multiple issues with you user routine:

  1. The MMAT (material number) is an integer, it can’t be 3.5

  2. The variable containing the wavelength is WVLNGT and not WVLNGH

  3. It is not possible to compare to floating point number using equal. you should use:

    abs(A - B) < e
    

    where e is the maximum allowed difference between A and B.

Cheers,
David