Metadata-Version: 2.4
Name: comppdes
Version: 0.1.1
Summary: Finite element method infrastructure and problem solvers for numerical approximation of PDEs.
Author-email: Leon Schmid <leon.schmid@uni-jena.de>
License: MIT
License-File: LICENSE
Requires-Python: >=3.13.5
Requires-Dist: imageio>=2.37.2
Requires-Dist: kaleido>=1.2.0
Requires-Dist: nbformat>=4.2.0
Requires-Dist: numba>=0.63.1
Requires-Dist: numpy>=2.3.5
Requires-Dist: plotly>=6.5.1
Requires-Dist: scipy>=1.16.3
Provides-Extra: dev
Requires-Dist: ipykernel>=7.1.0; extra == 'dev'
Requires-Dist: jupyter>=1.1.1; extra == 'dev'
Requires-Dist: pytest>=9.0.2; extra == 'dev'
Provides-Extra: netgen
Requires-Dist: ngsolve>=6.2.2601; extra == 'netgen'
Description-Content-Type: text/markdown

# Numerics Code Snippets Repository: A GitLab Reference Hub

In this repository several different code snippets are available, as well as a beginner tutorial on the usage of python specifically in numerics.

There are also different solutions to exercises from lectures available.

## Getting Started

#### 1\. Repository Access: Clone or Download

Use the `git clone` command to download the entire repository to your local machine.

| Method | Command |
| :--- | :--- |
| **Clone via HTTPS (Recommended)** | `git clone [see HTTPS link in repos]` |
| **Download ZIP** | *(Download from the GitLab web interface)* |

Navigate into the cloned directory after the process is complete:

```bash
cd [Your_Repository_Name]
```

-----

#### 2\. Environment Setup with `uv`

We use **`uv`** (see [here](https://astral.sh/uv)), a Python package installer and environment manager.

  * **A. Install `uv`:**

    Choose the method that works best for your operating system.

    | Operating System | Command |
    | :--- | :--- |
    | **Universal (if `pip` is available)** | `pip install uv` |
    | **macOS (Homebrew)** | `brew install uv` |
    | **macOS/Linux (Shell Script)** | `curl -LsSf https://astral.sh/uv/install.sh \| sh` |
    | **Windows (PowerShell)** | `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 \| iex"` |

  * **B. Create and Activate Virtual Environment:**

    These commands create a virtual environment (`.venv`) and install all required packages listed in the dependency file (e.g., `pyproject.toml`).

    ```bash
    # Create the virtual environment
    uv sync
    ```

    ```bash
    # Activate the virtual environment (macOS/Linux)
    source .venv/bin/activate
    ```

    > **Note for Windows Users:** If you are using PowerShell, run the following to activate:

    ```bash
    .\.venv\Scripts\Activate.ps1
    ```

  * **C. Install Local Source Root Folder (if necessary):**

    The repository contains local modules you need to import (e.g., in the `src` folder). Install the source package in editable mode:

    ```bash
    uv pip install -e src
    ```

-----

### 💡 Working with VS Code

We recommend using **VS Code** (see [here](https://code.visualstudio.com/download)) for a seamless experience.

1.  Open the repository folder in VS Code.
2.  Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`).
3.  Type "**Python: Select Interpreter**" and select the newly created virtual environment, typically found at:
    `./.venv/bin/python` (macOS/Linux) or `./.venv/Scripts/python.exe` (Windows).

-----

### Remark

A significant portion of the code is based on the book:

  * ***Numerical Approximation of Partial Differential Equation*** by Sören Bartels (ISBN 978-3-319-32353-4)
