Nearly all of today's processors are multicore, and ideally programming and algorithm development utilizing the entire processor should be introduced early in the computational physics curriculum. Parallel programming is often not introduced because it requires a new programming environment and uses constructs that are unfamiliar to many teachers. We describe how we decrease the barrier to parallel programming by using a java-based programming environment to treat problems in the usual undergraduate curriculum. We use the easy java simulations programming and authoring tool to create the program's graphical user interface together with objects based on those developed by Kaminsky [Building Parallel Programs (Course Technology, Boston, 2010)] to handle common parallel programming tasks. Shared-memory parallel implementations of physics problems, such as time evolution of the Schrödinger equation, are available as source code and as ready-to-run programs from the AAPT-ComPADRE digital library.

1.
S.
Oaks
and
H.
Wong
,
Java Threads
, 3rd ed. (
O'Reilly
,
Sebastopol, CA
,
2004
).
2.
F.
Esquembre
, “
Easy Java simulations modeling and authoring tool
,” ver. 5.2, <www.compadre.org/Repository/document/ServeFile.cfm?ID=7305> (
2017
). EJS software and help can be found at <www.um.es/fem/Ejs/>.
3.
Open Source Physics
,” <www.compadre.org/osp/>.
4.
H.
Gould
,
J.
Tobocknik
, and
W.
Christian
,
An Introduction to Computer Simulation Methods
, revised 3rd edition (2017). A PDF of the revised edition can be downloaded from <https://www.compadre.org/osp/items/detail.cfm?ID=7375>. The 2006 Addison-Wesley edition is out of print, but the revised third edition can be printed on demand from the Amazon store at <www.amazon.com/dp/1974427471>.
5.
D.
Brown
, “
Tracker video analysis and modeling tool
,” ver. 4.11.0, <www.compadre.org/Repository/document/ServeFile.cfm?ID=7365> (
2017
). Tracker software and help can be found at <www.physlets.org/tracker/>.
6.
L.
Engelhardt
, “
Introduction to EJS video tutorial
,” <www.compadre.org/OSP/tutorials/EJS_Tutorial/>. This video tutorial describes how to install EJS, open and modify EJS models, and how to package and distribute a simulation as a jar file.
7.
W.
Christian
, “
An Introduction to Computer Simulation Methods—EJS Resources
,” <www.compadre.org/books/CSM_EJS>. This ComPADRE book contains EJS-based curricular material used to teach computational physics at Davidson College. Selected chapters from Ref. 4 that have been adapted for use with EJS are available.
8.
See supplementary material at https://doi.org/10.1119/1.5012510 for a step-by-step EJS tutorial together with the EJS source code and compiled ready-to-run programs described in this paper.
9.
F.
Esquembre
, “
Easy Java simulations: A software tool to create scientific simulations in Java
,”
Comput Phys. Commun.
156
,
199
204
(
2004
).
10.
Alan
Kaminsky
,
Building Parallel Programs
(
Course Technology
,
Boston
,
2010
).
11.
W.
Christian
and
F.
Esquembre
, “
Random walk models with parallel programming
,” <www.compadre.org/Repository/document/ServeFile.cfm?ID=14533> (
2017
).
12.
J.
Crank
and
P.
Nicolson
, “
A practical method for numerical evaluation of solutions of partial differential equations of the heat conduction type
,”
Proc. Camb. Philos. Soc.
43
(
1
),
50
76
(
1947
).
13.
P. B.
Visscher
, “
A fast explicit algorithm for the time-dependent Schrödinger equation
,”
Comput. Phys.
5/6
,
596
598
(
1991
). A sequential (not parallel) implement of the Visscher algorithm is described in Ref. 4 Chapter 16.
14.
W.
Christian
, “
Parallel two-dimensional time-dependent Schrödinger equation model
,” <www.compadre.org/Repository/document/ServeFile.cfm?ID=13331> (
2014
).
15.
For a comprehensive review see
R. W.
Robinett
, “
Quantum wave packet revivals
,”
Phys. Rep.
392
,
1
119
(
2004
).
16.
R. W.
Henry
, “
A squeezed-state primer
,”
Am. J. Phys.
56
,
318
328
(
1988
).
17.
D.
Styer
, “
Quantum revivals versus classical periodicity in the infinite square well
,”
Am. J. Phys.
69
,
56
62
(
2001
).
18.
M. A.
Doncheski
,
S.
Heppelmann
,
R. W.
Robinett
, and
D. C.
Tussey
, “
Wave packet construction in two-dimensional quantum billiards: Blueprints for the square, equilateral triangle, and circular cases
,”
Am. J. Phys.
71
,
541
557
(
2003
).
19.
M.
Belloni
and
R. W.
Robinett
, “
The infinite well and Dirac delta function potentials as pedagogical, mathematical and physical models in quantum mechanics
,”
Phys. Rep.
540
(
2
),
25
122
(
2014
).
20.
R. W.
Robinett
, “
Quantum and classical probability distributions for position and momentum
,”
Am. J. Phys.
63
,
823
832
(
1995
).
21.
See for example,
R.
Bluhm
,
V. A.
Kostelecký
, and
J.
Porter
, “
The evolution and revival structure of localized quantum wave packets
,”
Am. J. Phys.
64
,
944
953
(
1996
).
22.
D. L.
Aronstein
and
C. R.
Stroud
, Jr.
, “
Fractional wave-function revivals in the infinite square well
,”
Phys. Rev. A
55
,
4526
4537
(
1997
).
23.
I. Sh.
Averbukh
and
N. F.
Perelman
, “
Fractional revivals: Universality in the long-term evolution of quantum wave packets beyond the correspondence principle dynamics
,”
Phys. Lett. A
139
,
449
453
(
1989
).
24.
See for example,
M. E. J.
Newman
and
G. T.
Barkema
,
Monte Carlo Methods in Statistical Physics
(
Oxford U. P.
,
Oxford, UK
,
1999
); or
H.
Gould
and
J.
Tobochnik
,
Statistical and Thermal Physics: With Computer Applications
(
Princeton U. P.
,
Princeton, NJ
,
2010
).
25.
G. T.
Barkema
and
T.
MacFarland
, “
Parallel simulation of the Ising model
,”
Phys. Rev. E
50
(
2
),
1623
1628
(
1994
).
26.
W.
Christian
, “
Ising 2D spatial decomposition model
,” <www.compadre.org/Repository/document/ServeFile.cfm?ID=13032> (
2013
).
27.
W.
Christian
, “
Ising 3D checkerboard decomposition model
,” <www.compadre.org/Repository/document/ServeFile.cfm?ID=13033> (
2013
).
28.
W.
Christian
, “
Molecular dynamics replicated data model
,” <www.compadre.org/Repository/document/ServeFile.cfm?ID=12987> (
2013
).
29.
K.
Binder
and
D. P.
Landau
,
A Guide to Monte Carlo Simulations in Statistical Physics
, 3rd ed. (
Cambridge U. P.
,
Cambridge
,
2009
).
30.
S.
Plimpton
, “
Fast parallel algorithms for short-range molecular dynamics
,”
J. Comput. Phys.
117
(
1
),
1
19
(
1995
).

Supplementary Material

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.