(* Testing results of Segev - Heller paper *) (* Printing input parameters and checking their validity *) (* Input: x0, y0 - displacements omx, omy - frequencies nmax - quantum number of the acceptor state Example of input line: {x0, y0, omx, omy} = {1.1519, 1.2649, 0.4689, 0.5555};nmax=10; *) (* Load a package for formatted printing of numbers *) <Frequencies: omx =",printF[omx,10,5],", omy =",printF[omy,10,5],""]; If[!(NumberQ[omx]&&NumberQ[omy]&&omx>0&&omy>0), Print["Frequencies must be positive numbers!\n"]; fails=True]; Print["Displacements: x0 =",printF[x0,10,5],", y0 =",printF[y0,10,5],""]; If[!(NumberQ[x0]&&NumberQ[y0]), Print["Displacements must be numbers!\n"]; fails=True]; Print["Quantum number in the acceptor potential: n = ",nmax,""]; If[!(IntegerQ[nmax]&&nmax>=0), Print["Quantum number in the acceptor potential must be a non-negative integer!\n"]; fails=True]; If[!(nmax<=50), Print["Quantum number in the acceptor potential is too large!\n"]; fails=True]; If[fails, Print["Computations terminated because input parameters are illegitimate."]; Exit[] ]; (* Testing ends *) If[!(omx<100&&omy<100), Print["Warning: one of frequencies is too large. Results may be unpredictable."]; ]; If[!(omx>0.005&&omy>0.005), Print["Warning: one of frequencies is too small. Results may be unpredictable."]; ]; If[!(Abs[x0]<100&&Abs[y0]<100), Print["Warning: one of displacements is too large. Results may be unpredictable."]; ]; If[nmax<=20, {x0, y0, omx, omy}=N[{x0, y0, omx, omy}], {x0, y0, omx, omy}=SetPrecision[{x0, y0, omx, omy},128] ]; Print[""];