Re: OONSTD: scenario of use

MHENDER@watson.ibm.com
Tue, 8 Sep 98 17:41:18 EDT

Bob Tisdale wrote

>So, when should we expect to see your proposal?

That'll teach me. Fair enough. I got very excited back when C++ was
gaining momentum, and designed and implemented such a thing. We've been
using it for about three years, adding things, and trying to see what
things are necessary and what aren't. Learned a lot, some of it useful.
There is a web page describing it at http://www.research.ibm.com/nao.
I've almost finished a second, expanded version, and the web pages will
(hopefully) be updated soon. The design is below, shortened quite a bit,
but I think the main points are there.

First, this is a little off track of what this forum has been discussing
(standards for matrix, array and vector classes?). If we're not sure
we're ready yet for standards for those, I'm sure we're not ready yet for
these.

I think that there are two things here that need standardization here:
the interfaces to data structures used in writing NA tools, and the
interface to NA codes. They are related, of course. My experience
trying to <em>use</em> other peoples codes is that most of my time is
spent writing conversions and preparing to call the tool. It becomes
even harder if I try to combine than one tool, or to switch between tools
at run time.

As a user I'm focused on the outside of a code. I don't want to have to
figure out things like how to set entry (10,50) in a banded matrix that
is passed to a routine that performs an LU decomposition. If I decide
that a sparse structure is better, or an iterative solver, I want to be able
to make minimal changes to my code and have it work first time. We've been
talking about interfaces for matrices that provide this type of function. We
need to do the same thing for passing things like functions and grids to
numerical tools, and make ODE integrators, PDE solvers, and such things
that are as easy to use as LA tools. Look at ODE integrators like
lsode, musl and acdc. Not much agreement as to the interface.

The object of the design is to cover as many of the objects that show
up in NA as possible, in enough abstraction that common operations
can be applied uniformly across large classes of objects, in enough
detail that we don't need to introduce many subclasses to do usual
things.

We've used the object interfaces listed below for a number of things:
nonlinear optimization packages, a prototyping system for finite
difference schemes for reservoir modeling, and a couple of internal
things. Works pretty well, but there sure were a lot of gotchas in the
implementation as a C++ class library.

Mike Henderson
mhender@watson.ibm.com
http://www.research.ibm.com/nao/
----------------------------------------------------------------------

All abstract base classes -

Geometry: (I implemented it as one class, Manifold, with Region and
Mapped Region derived, providing defaults for most of
the mf's.)

Region -

Get Dimension
Test for inclusion
Get Boundary information (see below) optional
Get Differential Information (see below) optional
Get Mesh Information (see below) optional

Mapped Region -

A Region (the base space)
+mf's for Region
Get Target Dimension
Get Target Space
Map a point from base space to target space.
Project a point in target onto base (two flavors, nearest and
orthogonal to given space)
Get Boundary information (see below) optional
Get Differential Information (see below) optional
Get Mesh Information (see below) optional

Manifold -

Get number of charts in atlas (list of Mapped Regions)
+mf's for each chart.
Get list of charts that overlap another
Map between overlapping charts
Project a point in target onto base (two flavors, nearest and
orthogonal to given space)
Get Boundary information (see below) optional
Get Differential Information (see below) optional
Get Mesh Information (see below) optional

>Differential information -

Get basis for the tangent space
Get basis for normal space
Get inner product of tangents/normals (Metric)
Get derivative of tangents/normals (Connection)

>Boundary information -

Get Number of Boundary Segments
Get Boundary Segment

>Mesh information - a set of cellular complexes

Get Number of Component meshes
Get Number of Vertices Total/Component
Get Vertex
Get Number of Cells of given dimension
Get Number of faces of a cell of given dimension
Get faces of a cell of given dimension
Get Number of cells adjacent to a face of given dimension
Get cells adjacent to a face of given dimension

Function Space:

Get domain (a manifold/mapped region/region)
Get range ( ditto )
Test for inclusion

If "finite dimensional":

Get number of basis functions
Get basis functions
Project a function onto this function space

Function:

Get FunctionSpace
Evaluate the function
Get the derivative of the function

If "discrete":

Get Coordinates in basis for FS
Get the derivative as a Vector (list of coordinates)

Operator Space:

Get domain (a manifold/mapped region/region)
Get range ( ditto )
Test for inclusion

Operator:

Get OperatorSpace
Apply the operator to a function
Get the derivative of the Operator

If "finite dimensional" (domain and range of OS are finite)

Get the derivative as a Matrix (a linear operator).

Problem: (meant to collect related data into an object that can
be passed to a solver)

ODEInitialValueProblem
ODETwoPointBoundaryValueProblem
DAInitialValueProblem
DATwoPointBoundaryValueProblem
NonlinearOptimizationProblem
LinearEigenvalueProblem
NonlinerEigenvalueProblem
NonlinerOperatorEquation

Algorithm: (meant to collect routines with the same signature,
routines have different parameters, set w/ ctor or mf's)

LinearEquationIterativeSolver
NonlinearEquationIterativeSolver
ODEIntegrator
DAEIntegrator
TPBVPSolver
NonlinearOptimizer
NumberGenerator
ContinuationMethod