M. T. Homer Reid MIT Home Page
Physics Problems Research teaching My Music About Me Miscellany


libscuff: The core library underlying the scuff-em suite

The back engine implementing the computational algorithms that underlie the scuff-em suite is a C++ library called libscuff. If you find that the standalone application programs distributed with scuff-em are not sufficiently flexible for your computational needs, you may wish to write your own codes that access the core library directly.

The most direct way to access the core library is of course to write your own C/C++ codes that link against the libscuff library binary (libscuff.a or libscuff.so), but the scuff-em distribution also comes with wrappers that allow you to access the core library from python.

The primary entity in libscuff is a C++ class named RWGGeometry. (The name derives from the fact that libscuff uses a set of basis functions known as "RWG functions" for representing surface currents.) An RWGGeometry stores all necessary data on a scattering geometry described by a .scuffgeo file, and provides class methods for setting up, solving, and procssing the solutions of scattering problems in that geometry.

The functions provided by libscuff may be broadly classified into three categories: main flow routines, which handle each of the major steps in the process of setting up and solving electromagnetic scattering problems; ancillary routines on RWGGeometry structures, which offer various additional functionality such as visualization; and lower-level support routines, which allow you to manipulate some of the constituent entities (such as matrices and vectors) involved in scattering problems.

The libscuff API may be accessed from C++ or python programs. In the former case, source files should include the lines

    #include <libscuff.h>
    using namespace scuff;

and should be linked with -lscuff.

python code should include the line

    import scuff;

These code snippets indicate the colors that will be used to illustrate C++ and python examples throughout the core library documentation.

scuff-em Core Library
1. Core Library Reference: Main Flow Routines
2. Core Library Reference: Describing Incident Fields
3. Core Library Reference: Ancillary Routines
4. Core Library Reference: Matrices and Vectors
5. c++ Examples
6. python Examples

Core Library

libscuff: The Core Library of the scuff-EM Suite, by Homer Reid
Last Modified: 11/16/16