Skip to content
/ DPG Public

DPG methods implemented as shared lib add-on to NGsolve

Notifications You must be signed in to change notification settings

jayggg/DPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This codebase will not be maintained further. All facilities that were made available here for implementing DPG methods are now available directly in recent versions of NGSolve. Users wanting to try out DPG methods should proceed to use the python or c++ interfaces of NGSolve.

DPG methods in NGSolve

This repository provides facilities to experiment with Discontinuous Petrov Galerkin (DPG) methods. The C++ codes here can be compiled to make a shared library that can be added onto the NGSolve package. Python codes that interface with the C++ objects are also provided. Large parts of the code in this repository can be understood independently of the DPG method.

CONTRIBUTORS: Dow Drake, Jay Gopalakrishnan, Lukas Kogler, Nicole Olivares, Joachim Schoberl.

SEND comments or bug reports to Jay Gopalakrishnan [email protected].

Install

  • Do make sure you have the dependencies installed before proceeding: A working installation of NGSolve and Netgen is required. Please follow the instructions online for installing the development version of these packages. (Please ensure that the compile script ngscxx is in your path after a successful install of NGSolve.)
  • Clone this repository: git clone https:/jayggg/DPG
  • Navigate to the cloned folder DPG and type make. This should compile the C++ files on Linux or Mac systems (where GNU or other make is already installed) and should create the shared library called libDPG.

Some examples using python interface

Starting version 6.1, NGsolve provides a Python3 interface (called NGSpy) to many of its facilities, including symbolic forms. DPG methods can be implemented directly using these new symbolic facilities, or by loading the precompiled DPG library from python using CDLL. (The latter is at times faster for complex forms.) If you want to explore implementing DPG methods using NGSPy, start with these examples:

  • laplaceadaptive.py: In a terminal where PYTHONPATH is set to find the NGsolve libs, navigate to python folder and type netgen laplaceadaptive.py to see a demo of automatic adaptivity using DPG methods for the Laplace equation. This example uses pure NGSpy, and there is no need to compile or load libDPG.

  • periodicmaxwell.py: Solve a 3D Maxwell problem, with x and y periodicity, using libDPG (which includes an implementation of periodic H(curl) spaces).

Some examples using PDE file interface

NGSolve uses PDE files (with extension .pde) to specify inputs detailing boundary value problems. The DPG library can be utilized using this interface. Please see comments in individual .pde file examples within folder pde. You may want to explore these pde-file examples:

Index

Other software options for DPG methods

Check out other DPG implementations by our friends:

About

DPG methods implemented as shared lib add-on to NGsolve

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •