Esempio n. 1
0
        public void Close()
        {
            var mockTextWriter = new Mock <TextWriter>(MockBehavior.Strict);
            var fileSeismogram = new FileSeismogram(mockTextWriter.Object);

            mockTextWriter.Setup(tw => tw.Close()).Verifiable();

            fileSeismogram.Close();

            mockTextWriter.Verify();
        }
Esempio n. 2
0
        private static void ReversalModeling()
        {
            var source     = new FileSource(new StreamReader("forward.txt"));
            var seismogram = new FileSeismogram(new StreamWriter("backward.txt"));

            var simulation = new Simulation(source, seismogram);

            simulation.Execute(1.0, -0.01, 0.0);

            seismogram.Close();

            Console.WriteLine("Reversal modeling finished!");
        }
Esempio n. 3
0
        private static void ForwardModeling()
        {
            var source     = new SinSource(1.0, 0.0, 1.0);
            var seismogram = new FileSeismogram(new StreamWriter("forward.txt"));

            var simulation = new Simulation(source, seismogram);

            simulation.Execute(0.0, 0.01, 1.0);

            seismogram.Close();

            Console.WriteLine("Forward modeling finished!");
        }