Publications Details

Publications / Report

PHYSLIB: A C++ tensor class library

Budge, Kent G.

C++ is the first object-oriented programming language which produces sufficiently efficient code for consideration in computation-intensive physics and engineering applications. In addition, the increasing availability of massively parallel architectures requires novel programming techniques which may prove to be relatively easy to implement in C++. For these reasons, Division 1541 at Sandia National Laboratories is devoting considerable resources to the development of C++ libraries. This document describes the first of these libraries to be released, PHYSLIB, which defines classes representing Cartesian vectors and (second-order) tensors. This library consists of the header file physlib.h, the inline code file physlib.inl, and the source file physlib.C. The library is applicable to both three-dimensional and two-dimensional problems; the user selects the 2-D version of the library by defining the symbol TWO D in the header file physlib.h and recompiling physlib.C and his own code. Alternately, system managers may wish to provide duplicate header and object modules of each dimensionality. This code was produced under the auspices of Sandia National Laboratories, a federally-funded research center administered for the United States Department of Energy on a non-profit basis by AT T. This code is available to US citizens, and institutions under research, government use and/or commercial license agreements.