We develop, distribute, and maintain peer-reviewed software with three
purposes:
- Disseminate our research on solvers and advanced
processes in a reproducible manner.
- Enable our industry partners to freely evaluate,
utilize, reproduce, extend, and distribute,
commercially or otherwise, our innovations.
- Further our research into the science of how
simulation software is developed, maintained, and distributed.
Our Software Research Mission
A quintessential target area for innovation today is to bridge the gap
between mathematical semantics, physical notions, and computer
programming languages. Owing to the physical complexity inherent to
reservoir engineering problems, simulator developers have long
recognized the pains and needs in this area. The goal of this research
direction is to rethink and reengineer the way that we develop,
deliver, and maintain simulation software in order to realize a future
where:
- Customization and ubiquitous interoperability are
instantaneous and cost-free.
- Domain-expert users are able to make rapid
modifications to the Physics directly.
We aim to accomplish our mission as the culmination of three major
directions:
Discrete Problem Programming Toolkit (DPPT)
A Discrete Problem
is a software abstraction that implements the fully discretized
equations that are solved by a simulator in order to obtain discrete
approximations to the state variables in space and time.
As illustrated
in the figures above, a Discrete Problem
must offer a two-way interface that is well-engineered to admit a wide
and growing plethora of numerical solution methods while simultaneously
preventing the exposure of its internal particulars. A standardized
interface will ensure effortless interchangeability of Discrete Problem
implementations, thereby supporting both the Tailor- and
General-Purpose paradigms.
At a minimum, a
conforming Discrete Problem interface
should be able to produce a discrete residual system and Jacobian
matrix that are evaluated at given input states. Generic designs allow
the parameterization of the Physics to any conforming numerical
datastructures. The interface must
also accommodate requests to adapt the internal specifics of the
discrete numerical approximation.
Our research in this area focuses on
developing a universal interface, and more importantly, on providing a
software toolkit that cuts the development cost of any Discrete Problem
to a minimum. This is to be accomplished by the automation of the
activities entailed in developing a Discrete Problem .
The Discrete Problem Programming Toolkit (DPPT) is a multilayered
library of highly configurable generic datastructures and algorithms.
Modules within different layers can be used to develop a generic Discrete Problem using
different semantics and levels of abstraction. Below
is a depiction of the DPPT modules that are arranged in three layers.
1.
Base Layer
The DPPT base layer offers several modules that implement efficient
numerical datastructures and algorithms. The semantics are closely tied
to standard library concepts when efficiency is not sacrificed. For
example, while standard library memory allocators cannot maintain
state, our alternatives bypass these concept requirements in order to
admit multithreaded pools. A beta point of departure for these modules
is available in the faSTL library.
- Numerical
datastructures
- Dense collections including numeric arrays and
vectors.
- Indirection devices (iterators) that separate the
storage pattern of variables in memory from their logical ordering.
- Sparse collections including block sparse matrices
and vectors.
- Algebraic expression encodings using multiple
implementations including expression templates.
- Memory
managements
- Heap allocators offering configurable pools and
multithreading.
- Casting and construction utilities.
- Thread
Management
- Interchangeable Policies for threading using
multiple protocols including OpenMP, POSIX, and standard library
protocols.
- Numerical
algorithms
- Polyalgorithmic sparse and dense linear combination
kernels including recent algorithmic developments and expression
templates.
- Forced vectorization using inline SIMD instructions
including SSE and intrinsics (platform dependent).
- Miscellaneous: bit hacks, unrolling, and tiling .
2.
Middle Layer
The middle layer offers modules that generically implement all aspects
of discretizing and linearizing vector calculus operators. The
semantics are mathematical. Configuration choices for all orthogonal
aspects can be made by changing single tags within user code. For
example, the following listing calculates the discrete nonlinear
Laplacian and its analytical Jacobian matrix using single point
upwinding and the MPFA O-method on a Cartesian topology that is ordered
according to a Hilbert space-filling curve:
Variableset<
memoryLayout, ADvector > U;
DiscreteContinuum mesh(
UniformCartesianBuilder< PeanoHilbert > build( "datafile.txt" ) );
Laplacian< Omethod > ( mesh,
U[TRANS].begin(), U[POTENTIAL].begin(), F.begin() );
- Discrete
Operators: Implementations of finite element and finite volume
approximations to nonlinear differential operators.
These are independent of the mesh topology and variable layout in
memory, and they are parameterized by the desired numerical scheme.
- Discrete
Continuum:
A generic representation of discrete spatial domains that may
intersect. Alternate implementations are available in certain
topologies for low-memory requirements in cases of massive meshes.
These instances are built using input mesh data that are generated
externally.
- Automatic
Variables: Building on the initial success of the Automatically
Differentiable Expression
Templates Library (ADETL), we are continuing to develop a module that
efficiently automates the analytical computation of derivatives of all
expressions that occur in the callstack of a discrete Reservoir
Simulation problem. The ADETL was designed to be extendable but it
provides a limited scope of datastructures and algorithms to act as a
proof of concept.
Our work is to integrate and extend emerging AD algorithms and
implementations to accommodate the wide range of expressions that are
encountered in reservoir simulation.
- Detailed profiling analysis and benchmarks for
various stages in the computation of linearized equations.
- Improved automatic activation of variables for
variable switching and reordering.
- Tailor approaches to univariate, multivariate
dense, and multivariate sparse derivatives.
- Facilities to convert types and to operate on
arguments with heterogeneous expressions.
- Polyalgorithmic forward and reverse mode AD with
recommendations for appropriate use in different calculations.
- Improved performance by anhialating expression
construction costs.
- Compressed AD using seed matrices to dramatically
improve runtime costs in cases with predictable sparsity coutcomes.
3.
Top Layer
The top layer module will offer abstractions for general partial
differential equations such as the nonlinear transient
advection-reaction-diffusion equations, Helmholtz and Poisson forms,
and
the time-dependent second-order wave equation.
We are designing and developing datastructure-neutral implementations
of
timestepping, nonlinear, and linear solution algorithms. The prime
purpose for GenSOL is to provide a convenient platform with which to
reproduce, analyze, compare, and even use all of our contributions in
the solvers area.
Automated
Simulator Generator System
Efforts such as our proposed DPPT promise to cut down on the costs of
computer programming for the development of the physics portion of a
simulator. Such efforts are exclusively tied to the underlying
programming language. Moreover, they are typically only used by expert
developers, barring the domain expert from direct participation.
Problem Solving Environments such as "multiphysics packages" (e.g.
COMSOL and the MRST) provide the means to develop physical models and
simulation tools without the need for advanced programming language
semantics. The efficiency and scalability of these tools however,
remain far from ideal relative to compiled software. The purpose of the
ASGS direction is simply to bridge this gap. We propose to develop a
system that can translate domain-specific and high-level mathematical
markup into C++ using the DPPT constructs. The schematic below
illustrates this process.
The ASGS will ultimately enable cost-free customization of the physics
within simulators. Domain experts can use a graphical equation editor
to write, share, and disseminate "new models", while vendors will be
able to provide software that implements these models without incurring
additional costs. The responsibility of devising well-posed physical
models will be in the hands of the domain expert.
|