  The STARWALL/CAS3D/OPTIM code package is a powerful tool to study the linear
MHD stability of 3D, ideal equilibria in the presence of multiply-connected
ideal and/or resistive conducting structures, and their feedback stabilization
by external currents. Robust feedback stabilization of resistive wall modes can
be modelled with the OPTIM code. Resistive MHD studies are possible combining
STARWALL with the linear, resistive 2D CASTOR code as well as nonlinear MHD
simulations combining STARWALL with the JOREK code.
  In the present paper, a detailed description of the STARWALL code is given
and some of its applications are presented to demonstrate the methods used.
Conducting structures are treated in the thin wall approximation and depending
on their complexity they are discretized by a spectral method or by triangular
finite elements. As an example, a configuration is considered consisting of an
ideal plasma surrounded by a vacuum domain containing a resistive wall and
bounded by an external wall. Ideal linear MHD modes and resistive wall modes in
the presence of multiply-connected walls are studied. In order to treat the
vertical mode self-consistently the STARWALL code has been completed by adding
the so-called Luest-Martensen term generated by a constant normal displacement
of the plasma.
  The appendix contains the computation of the 2D Fourier transform of singular
inductance integrals, and the derivation of an asymptotic expansion for large
Fourier harmonics.

Plasma Physics