Conversation
…can pass list/tuple
…r/SparseMatrix/DenseMatrix/DenseTensor returns numpy array via GetDataArray
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Python wrappers for MFEM's Discontinuous Petrov-Galerkin (DPG) miniapp utilities and includes a complete Python implementation of the parallel Maxwell DPG example. The key changes include:
- New Python DPG Maxwell example (pmaxwell.py) with support for various problem types (plane wave, Fichera oven, PML)
- Python wrappers for DPG utility classes (weakform, complexweakform, blockstaticcond, etc.)
- Wrappers for particleset and particlevector modules
- Fixes to GetDataArray methods to prevent premature object destruction
- Build system updates to enable miniapp compilation
- Support for non-square matrix coefficients
Reviewed changes
Copilot reviewed 51 out of 51 changed files in this pull request and generated 23 comments.
Show a summary per file
| File | Description |
|---|---|
| miniapps/dpg/pmaxwell.py | Complete Python implementation of parallel Maxwell DPG example with multiple problem types |
| miniapps/dpg/meshes/*.mesh | Mesh files for DPG examples (scatter.mesh, fichera-waveguide.mesh) |
| mfem/ser.py, mfem/par.py | Added imports for new dpg, particleset, particlevector modules |
| mfem/_ser/dpg.i, mfem/_par/dpg.i | SWIG interface files for DPG utilities wrapping |
| mfem/_ser/vector.i, mfem/_par/vector.i | Fixed GetDataArray to prevent premature destructor calls |
| mfem/_ser/densemat.i, mfem/_par/densemat.i | Fixed GetDataArray for DenseMatrix and DenseTensor |
| mfem/_ser/sparsemat.i, mfem/_par/sparsemat.i | Fixed GetDataArray, GetJArray, GetIArray for SparseMatrix |
| mfem/common/numba_coefficient*.* | Removed square matrix requirement for MatrixCoefficient |
| mfem/_ser/setup.py, mfem/_par/setup.py | Added build_miniapps configuration and library dependencies |
| _build_system/*.py | Build system updates for miniapp support |
| docs/changelog.txt | Documentation of changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… (2). we still need to maintain Python proxy class, since it holds coefficeints
…ient under integrator is saved
…ient under integrator is saved
…nfig or mfem.par.config (not MFEM_USE_SINGLE itself is not supported yet)
…d having mfem::ODESover::ImplicitVariableType, which is protected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes
particleset.hpp, particlevector.hpp wrapper
fixed GetDataArray of Vector/DenseMatrix/DenseTensor/SparseMatrix so that
destructore is not pre-maturely called when return value is not stored to
a variable.
miniapp/dpg/utils/*.hpp is wrapped.
Python version of pmaxwell.py in miniapp/dpg directory
fixed ex21, ex21p (mfem/mfem@99c858c)
fixed missing include in schwarz.i