Hi,
This post is a follow-up to my previous post found here: Implementing Lifting Operator in DG.
I am currently working on implementing a local discontinuous Galerkin (LDG) method for the Laplace equation with homogeneous Dirichlet boundary conditions. The method and formulation are described in the following image.
A key point of this method involves a direct use of the discrete gradient operator in the discrete formulation, which requires solving local problems (5) to compute the lifting operators.
I have written two codes using the NGSolve Python interface, which I’ve attached for reference.
LDG_new.py (12.4 KB)
LDG_poisson.py (4.7 KB)
In LDG_poisson.py
, I solve the lifting operator globally, mainly using the symbolic integrator in NGSolve. Moreover, LDG_new.py
solves the lifting operator more locally, utilizing various NumPy functions. While both codes are working, they are quite inefficient.
I would greatly appreciate any suggestions for improving the efficiency of the code. I am curious whether it is feasible to achieve reasonable performance using the Python interface, which is quite convenient, or if it would be more effective to transition to the base code in C++.
Thank you in advance for your suggestions!