Skip to main content

Finite element method infrastructure and problem solvers for numerical approximation of PDEs.

Project description

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:

cd [Your_Repository_Name]

2. Environment Setup with uv

We use uv (see here), 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).

    # Create the virtual environment
    uv sync
    
    # Activate the virtual environment (macOS/Linux)
    source .venv/bin/activate
    

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

    .\.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:

    uv pip install -e src
    

💡 Working with VS Code

We recommend using VS Code (see here) 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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

comppdes-0.1.1.tar.gz (120.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comppdes-0.1.1-py3-none-any.whl (149.7 kB view details)

Uploaded Python 3

File details

Details for the file comppdes-0.1.1.tar.gz.

File metadata

  • Download URL: comppdes-0.1.1.tar.gz
  • Upload date:
  • Size: 120.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for comppdes-0.1.1.tar.gz
Algorithm Hash digest
SHA256 066d9a4e22606f0dcdef651bbacc3e90cc85b7f55f5b7c812f29b3eea73e5d23
MD5 42bad1e64295a0ad1299b7bb39caf255
BLAKE2b-256 e446c7e9d368836ede69714df69bc90a8a52ffa185c654e92180c687d9cda7a4

See more details on using hashes here.

File details

Details for the file comppdes-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: comppdes-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 149.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for comppdes-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3364ff44840c3e0ed1f823ce5286a6127ef7c8a9e7cc02282a8dbe0d80603be2
MD5 2c41151f7253dfb7cf466dab11e2c646
BLAKE2b-256 31f341193331175eb6d2c123106e359cefafe67389e6ceb07eeac6c143c117c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page