Skip to content

MFEM 4.8 support #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

MFEM 4.8 support #266

wants to merge 19 commits into from

Conversation

sshiraiwa
Copy link
Member

@sshiraiwa sshiraiwa commented Apr 12, 2025

This PR does

  • changed requirement swig >= 4.3
  • fixed bilinearform.i issue due to change in BilinearForm::Print
  • fixed trasfer.i not knowing mfem::Device (due to the new use of MemoryType in hpp)
  • fixed eltrans.i issue by ignoring kernel_dispatch macro
  • addressed fe_base.i by failing C++ STL template expansion. This is because poly1d is exported from header.
  • changed default MFEM build to v4.8

This PR also include (#254), which does

  1. address recent addition of kernel_dispatch.hpp in MFEM C++.
  • kernel_dispatch.hpp doesn't need to be exposed to Python. But, we need MFEM_REGISTER_KERNELS macro to be
    defined somehow. In this PR, MFEM_REGISTER_KERNELS is replaced to be empty macro. So that SWIG does not
    see the lines containing this macro.
  1. Add CoefficentArray, VectorCoefficientArray, and MatrixCoefficientArray (represent Array<* Coefficient> and so on)
  • Changed Array constructor behavior when list of SWIG-wrapped MFEM objects is passed. SWIG objects passed as an item in list/tuple looses owner ship to underlying C++ MFEM object. Internally, we create a new Array (depending on the length of container) and set each Array element one by one (after setting thisown to False).
  1. Renamed other Array< * MFEM object>.
  • They are used to be named like VectorPtrArray. We simplify it as VectorArray.
  1. SparseMatrixArray2D, DenseMatrixArray2D, HypreParMatrixArray2D are added
  • HypreParMatrixArray2D can be used with mfem.HypreParMatrixFromBlocks
  • DenseMatrixArray2D appears in BlockNonlinearFormIntegrator
  • SparseMatrixArray2D is used wtih MixedBilinearForm::GetBlocks

@sshiraiwa sshiraiwa added this to the PyMFEM 4.8 milestone Apr 12, 2025
@sshiraiwa
Copy link
Member Author

sshiraiwa commented Apr 12, 2025

To Do

  • Fix examples
  • Check with numpy 2.2
  • need to handle bessel (used in ex25) differently, so that we can remove numba-scipy from dependency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant