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, 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;
  • 1. Core Library Reference: Main flow routines
  • [2. Core Library Reference: Describing incident fields][IncFields]
  • [3. Core Library Reference: Ancillary routines][Ancillary]
  • [4. Core Library Reference: Utility sublibraries][SublibraryAPI]
  • [5. Core Library Reference: C++ examples][CXXExamples]
  • [6. Core Library Reference: Python examples][PythonExamples]