{ "cells": [ { "cell_type": "markdown", "id": "c4d904b9", "metadata": {}, "source": [ "# Working with polygons" ] }, { "cell_type": "markdown", "id": "00502889", "metadata": {}, "source": [ "At the core of each `SuperScreen` simulation is an instance of the `superscreen.Device` class, which represents the superconducting structure to be modeled. A `Device` is composed of one or more `Layers` that each lie in a plane parallel to the $x-y$ plane (at position `layer.z0`) and have a specified penetration depth $\\Lambda$. Each layer contains one or more superconducting `films`, and each `film` contains zero or more `holes`. `Films` and `holes` are represented by instances of the `superscreen.Polygon` class, which defines a 2D polygonal region." ] }, { "cell_type": "code", "execution_count": 1, "id": "714bb687", "metadata": {}, "outputs": [], "source": [ "# Automatically install superscreen from GitHub only if running in Google Colab\n", "if \"google.colab\" in str(get_ipython()):\n", " %pip install --quiet git+https://github.com/loganbvh/superscreen.git" ] }, { "cell_type": "code", "execution_count": 2, "id": "18a89f72", "metadata": {}, "outputs": [], "source": [ "%config InlineBackend.figure_formats = {\"retina\", \"png\"}\n", "%matplotlib inline\n", "\n", "import os\n", "\n", "os.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\"\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "plt.rcParams[\"figure.figsize\"] = (4, 4)\n", "plt.rcParams[\"font.size\"] = 10\n", "\n", "import superscreen as sc" ] }, { "cell_type": "code", "execution_count": 3, "id": "b6328a0c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| Software | Version |
|---|---|
| SuperScreen | 0.13.0 |
| Numpy | 2.4.4 |
| Numba | 0.65.1 |
| SciPy | 1.17.1 |
| matplotlib | 3.10.9 |
| IPython | 9.13.0 |
| Python | 3.14.4 | packaged by conda-forge | (main, Apr 8 2026, 02:33:53) [Clang 20.1.8 ] |
| OS | posix [darwin] |
| Number of CPUs | Physical: 10, Logical: 10 |
| BLAS Info | Generic |
| Tue Apr 28 20:43:40 2026 EDT | |