/ngsolve-examples

Primary LanguageJupyter Notebook

NGSolve Examples

Minimal working examples for NGSolve finite element computations.

Environment Setup

conda activate ngsolve-env

Files

  • ngsolve_poisson_solver.py - Basic Poisson solver with VTK output
  • ngsolve_unitsquare_test.py - Test script for UnitSquareMesh alternatives
  • ngsolve_diagnostics.py - Installation diagnostics and available functions
  • ngsolve_jupyter_notebook.ipynb - Classic Jupyter notebook example
  • ngsolve_interactive_slider.ipynb - JupyterLab with interactive widgets

Usage

Command Line

python ngsolve_poisson_solver.py

Jupyter

jupyter notebook  # or jupyter lab

Notes

  • Uses netgen.geom2d.unit_square instead of UnitSquareMesh (NGSolve 6.2.2506 compatibility)
  • VTK output compatible with ParaView
  • Interactive widgets require ipywidgets