public void SolveSinRightLeft() { RseSolver solver = new RseSolver { InitialPosition = 0, FinalPosition = 10, Samples = 10000, RightHandSide = SinDglRhs, InitialSolutionValue = new Complex(0, 0), InitialDerivativeValue = new Complex(1, 0) }; solver.Solve(); double maxDeviation = GetMaxDeviation(solver.PositionValues, solver.SolutionValues, ComplexSin); Assert.IsTrue(maxDeviation < 1e-7); }
public void SolveHydrogen21() { RseSolver solver = new RseSolver { InitialPosition = 40, FinalPosition = 0, Samples = 70000, RightHandSide = CoulombRightHandSideN2L1, InitialSolutionValue = new Complex(1e-40, 0), InitialDerivativeValue = new Complex(0, 0) }; solver.Solve(); Normalize(solver.SolutionValues, solver.StepSize, 2); MakePlotFile(solver.PositionValues, solver.SolutionValues, HydrogenWaveFunctionN2L1); double maxDeviation = GetMaxDeviation(solver.PositionValues, solver.SolutionValues, HydrogenWaveFunctionN2L1); Assert.IsTrue(maxDeviation < 1e-5); }