For a step-by-step example, see the JOREK-STARWALL tutorial: resistive-wall tearing mode.