Skip to main content

Core finite element method infrastructure for numerical approximation of PDEs, i.e. computational 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.0.tar.gz (120.6 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.0-py3-none-any.whl (116.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for comppdes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a71a43075d7c887d10badff1e8b48c1e23ff9ff3f67da5f01c7e96f1d5a82d3
MD5 e43fa974f9b0bbe3abb2cade5707d7de
BLAKE2b-256 097913890aebef348f4e21052a27882752945b4bff3cf448e17319ffd356541b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for comppdes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5579e91a875b46162b5f70bb1d799f7b4e10bb4a2c8924a27fa0fbbe44c17e27
MD5 263b2f78e0d6b4467bbfc630bbc26e9b
BLAKE2b-256 7cd058f1abc643594272009c9e30c4b5bb9550adda8e3e570358c30679822808

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