Crate wafer[][src]

Wa ve f unction Solv er: a parallelized, 3D, Schrödinger equation solver.

Wafer exploits a Wick-rotated time-dependent Schrödinger equation to solve for time-independent solutions in three dimensions.

Inspired by quantumfdtd, which is a proof of concept tool and falls short of a general purpose utility. Wafer attempts to remedy this issue.

If you use Wafer in your research, please reference the following articles:

M. Strickland and D. Yager-Elorriaga, “A parallel algorithm for solving the 3D Schrödinger equation”, Journal of Computational Physics 229, 6015–6026 (2010).

Re-exports

extern crate std;
extern crate chrono;
extern crate clap;
extern crate csv;
extern crate error_chain;
extern crate indicatif;
extern crate lazy_static;
extern crate ndarray;
extern crate ndarray_parallel;
extern crate noisy_float;
extern crate num;
extern crate num_cpus;
extern crate ordinal;
extern crate rand;
extern crate rayon;
extern crate rmp_serde as rmps;
extern crate ron;
extern crate serde;
extern crate serde_derive;
extern crate serde_json;
extern crate serde_yaml;
extern crate slog;
extern crate slog_async;
extern crate slog_term;
extern crate term_size;
extern crate yansi;
use std::prelude::v1::*;
use clap::App;
use clap::Arg;
use config::Config;
use errors::*;
use slog::Drain;
use slog::Duplicate;
use slog::Fuse;
use slog::Level;
use slog::LevelFilter;
use slog::Logger;
use std::fs::OpenOptions;
use std::process;
use std::thread;
use std::time::Duration;
use std::time::Instant;

Modules

config

Config is a (mostly) public module which reads the configuration file wafer.cfg and populates the Config struct with the information required to run the current instance of the application.

errors

Handles the error chain of the program.

grid

The meat of the calculation is performed on a finite grid. Basically all of the computation work is done within this module.

input

Any required file input (apart from configuration) is handled here. Plain text and binary formats.

output

All file output is handled in this module. Plain text and binary options are both here.

potential

Handles the potential generation, binding energy offsets, callouts to files or scripts if needed etc.

Functions

exit_with_pause

Exits (with error, but no display) after a short pause. Because we're using async logs, sometimes we dump before the log system outputs information. We spool for a little first in these instances so we get the logging info.

main

System entry point

sha

Generate a SHA string

short_sha

Generate a short SHA string