491 research outputs found
High performance Python for direct numerical simulations of turbulent flows
Direct Numerical Simulations (DNS) of the Navier Stokes equations is an
invaluable research tool in fluid dynamics. Still, there are few publicly
available research codes and, due to the heavy number crunching implied,
available codes are usually written in low-level languages such as C/C++ or
Fortran. In this paper we describe a pure scientific Python pseudo-spectral DNS
code that nearly matches the performance of C++ for thousands of processors and
billions of unknowns. We also describe a version optimized through Cython, that
is found to match the speed of C++. The solvers are written from scratch in
Python, both the mesh, the MPI domain decomposition, and the temporal
integrators. The solvers have been verified and benchmarked on the Shaheen
supercomputer at the KAUST supercomputing laboratory, and we are able to show
very good scaling up to several thousand cores.
A very important part of the implementation is the mesh decomposition (we
implement both slab and pencil decompositions) and 3D parallel Fast Fourier
Transforms (FFT). The mesh decomposition and FFT routines have been implemented
in Python using serial FFT routines (either NumPy, pyFFTW or any other serial
FFT module), NumPy array manipulations and with MPI communications handled by
MPI for Python (mpi4py). We show how we are able to execute a 3D parallel FFT
in Python for a slab mesh decomposition using 4 lines of compact Python code,
for which the parallel performance on Shaheen is found to be slightly better
than similar routines provided through the FFTW library. For a pencil mesh
decomposition 7 lines of code is required to execute a transform
Simplifying Parallelization of Scientific Codes by a Function-Centric Approach in Python
The purpose of this paper is to show how existing scientific software can be
parallelized using a separate thin layer of Python code where all parallel
communication is implemented. We provide specific examples on such layers of
code, and these examples may act as templates for parallelizing a wide set of
serial scientific codes. The use of Python for parallelization is motivated by
the fact that the language is well suited for reusing existing serial codes
programmed in other languages. The extreme flexibility of Python with regard to
handling functions makes it very easy to wrap up decomposed computational tasks
of a serial scientific application as Python functions. Many
parallelization-specific components can be implemented as generic Python
functions, which may take as input those functions that perform concrete
computational tasks. The overall programming effort needed by this
parallelization approach is rather limited, and the resulting parallel Python
scripts have a compact and clean structure. The usefulness of the
parallelization approach is exemplified by three different classes of
applications in natural and social sciences.Comment: 29 pages, submitted to Computational Science and Discover
Unified Framework for Finite Element Assembly
At the heart of any finite element simulation is the assembly of matrices and
vectors from discrete variational forms. We propose a general interface between
problem-specific and general-purpose components of finite element programs.
This interface is called Unified Form-assembly Code (UFC). A wide range of
finite element problems is covered, including mixed finite elements and
discontinuous Galerkin methods. We discuss how the UFC interface enables
implementations of variational form evaluation to be independent of mesh and
linear algebra components. UFC does not depend on any external libraries, and
is released into the public domain
A finite element analysis of a silicon based double quantum dot structure
We present the results of a finite-element solution of the Laplace equation
for the silicon-based trench-isolated double quantum-dot and the
capacitively-coupled single-electron transistor device architecture. This
system is a candidate for charge and spin-based quantum computation in the
solid state, as demonstrated by recent coherent-charge oscillation experiments.
Our key findings demonstrate control of the electric potential and electric
field in the vicinity of the double quantum-dot by the electric potential
applied to the in-plane gates. This constitutes a useful theoretical analysis
of the silicon-based architecture for quantum information processing
applications
A numerical investigation of a piezoelectric surface acoustic wave interaction with a one-dimensional channel
We investigate the propagation of a piezoelectric surface acoustic wave (SAW)
across a GaAs/AlGaAs heterostructure surface, on which there is
fixed a metallic split-gate. Our method is based on a finite element
formulation of the underlying equations of motion, and is performed in
three-dimensions fully incorporating the geometry and material composition of
the substrate and gates. We demonstrate attenuation of the SAW amplitude as a
result of the presence of both mechanical and electrical gates on the surface.
We show that the incorporation of a simple model for the screening by the
two-dimensional electron gas (2DEG), results in a total electric potential
modulation that suggests a mechanism for the capture and release of electrons
by the SAW. Our simulations suggest the absence of any significant turbulence
in the SAW motion which could hamper the operation of SAW based quantum devices
of a more complex geometry.Comment: 8 pages, 8 figure
Pulse-induced acoustoelectric vibrations in surface-gated GaAs-based quantum devices
We present the results of a numerical investigation which show the excitation
of acoustoelectric modes of vibration in GaAs-based heterostructures due to
sharp nano-second electric-field pulses applied across surface gates. In
particular, we show that the pulses applied in quantum information processing
applications are capable of exciting acoustoelectric modes of vibration
including surface acoustic modes which propagate for distances greater than
conventional device dimensions. We show that the pulse-induced acoustoelectric
vibrations are capable of inducing significant undesired perturbations to the
evolution of quantum systems.Comment: To be published in Phys. Rev.
- …
