Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
parallel: [false]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
Expand All @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
parallel: [true]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
ls -l dist/
#python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_8_9_10_11_12:
make_binary_3_10_11_12_13_14:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp39-cp39", "cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313"]
pythonpath: ["cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313", "cp314-cp314"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testrelease_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
python3 setup.py sdist
ls -l dist/
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_8_9_10_11_12:
make_binary_3_10_11_12_13_14:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp39-cp39", "cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313"]
pythonpath: ["cp310-cp310", "cp311-cp311", "cp312-cp312", "cp313-cp313", "cp314-cp314"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
Expand Down
1 change: 1 addition & 0 deletions _build_system/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def configure_install(self):
if bglb.skip_swig:
bglb.clean_swig = False
bglb.run_swig = False
bglb.keep_temp = True

if bglb.ext_only:
bglb.clean_swig = False
Expand Down
1 change: 1 addition & 0 deletions _build_system/build_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
releases=[
release("4.7", "dc9128ef596e84daf1138aa3046b826bba9d259f", None),
release("4.8", "a01719101027383954b69af1777dc828bf795d62", None),
release("4.9", "d9d6526cc1749980a2ba1da16e2c1ca1e07d82ec", None),
]
),
metis=dict(
Expand Down
2 changes: 1 addition & 1 deletion _build_system/build_pymfem.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def update_header_exists(mfem_source):

update_header_exists(bglb.mfem_source)

swigflag = '-Wall -c++ -python -fastproxy -olddefs -keyword'.split(' ')
swigflag = '-Wall -c++ -python -std=c++17 -fastproxy -olddefs -keyword'.split(' ')

pwd = chdir(os.path.join(rootdir, 'mfem', '_ser'))

Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<< Change Log. >>>
2025 12
* PyMFEM4.9
- ordering.i is added and made correponding adjustment in *.i files.

2025 09
* PyMFEM 4.8
- Default branch is set to MFEM 4.8 release
Expand Down
1 change: 1 addition & 0 deletions examples/ex22.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def EvalValue(self, x):
mesh.Print("refined.mesh", 8)
u.real().Save("sol_r.gf", 8)
u.imag().Save("sol_i.gf", 8)
u.Save("sol_z.gf", 8)

# 14. Send the solution by socket to a GLVis server.
if visualization:
Expand Down
1 change: 1 addition & 0 deletions examples/ex22p.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ def EvalValue(self, x):
pmesh.Print("mesh"+smyid, 8)
u.real().Save("sol_r"+smyid, 8)
u.imag().Save("sol_i"+smyid, 8)
u.Save("sol_z"+smyid, 8)

# 14. Send the solution by socket to a GLVis server.
if visualization:
Expand Down
2 changes: 1 addition & 1 deletion mfem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def debug_print(message):

print(message)

__version__ = '4.8.0.1'
__version__ = '4.9.0rc1'

2 changes: 1 addition & 1 deletion mfem/_par/array.i
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define PY_SSIZE_T_CLEAN
%}
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/arrays_by_name.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#ifdef FILE_EXISTS_GENERAL_ARRAYS_BY_NAME
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/attribute_sets.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifdef FILE_EXISTS_MESH_ATTRIBUTE_SETS

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/auxiliary.i
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%include "../common/mfem_config.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/bilinearform.i
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using namespace mfem;
%}

%init %{
import_array();
import_array1(-1);
%}
%include "exception.i"

Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/bilininteg.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

//%include "../common/cpointers.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/blockmatrix.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%}
// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/blockoperator.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%}
// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}
%import "array.i"
%import "vector.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/blockvector.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%}
// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/bounds.i
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifdef FILE_EXISTS_FEM_BOUNDS

%init %{
import_array();
import_array1(-1);
%}
%include "exception.i"
%import "vector.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/coefficient.i
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
%include "../common/mfem_config.i"
// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/common_functions.i
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%mpi4py_typemap(Comm, MPI_Comm);

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
4 changes: 2 additions & 2 deletions mfem/_par/communication.i
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
%include "../common/mfem_config.i"

%init %{
import_array();
import_array1(-1);
%}

%import "../common/io_stream_typemap.i"
Expand All @@ -26,7 +26,7 @@ OSTREAM_TYPEMAP(std::ostream&)
%mpi4py_typemap(Comm, MPI_Comm);
/*
%init %{
import_array();
import_array1(-1);
%}
*/
%include "exception.i"
Expand Down
10 changes: 9 additions & 1 deletion mfem/_par/complex_fem.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
#include "fem/complex_fem.hpp"
#include "linalg/complex_operator.hpp"
#include "numpy/arrayobject.h"
#include "../common/io_stream.hpp"
#include "../common/pyoperator.hpp"
#include "../common/pycoefficient.hpp"
#include "../common/pyintrules.hpp"
#include "../common/pybilininteg.hpp"
#include "../common/pylininteg.hpp"
%}
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand All @@ -37,5 +38,12 @@ import_array();
%include "../common/typemap_macros.i"
LIST_TO_MFEMOBJ_POINTERARRAY_IN(mfem::IntegrationRule const *irs[], mfem::IntegrationRule *, 0)

%import "../common/io_stream_typemap.i"
OSTREAM_TYPEMAP(std::ostream&)
ISTREAM_TYPEMAP(std::istream&)

%include "../common/complex_fem_ext.i"
%include "fem/complex_fem.hpp"

OSTREAM_ADD_DEFAULT_FILE(ParComplexGridFunction, Save)

2 changes: 1 addition & 1 deletion mfem/_par/complex_operator.i
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#endif

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/constraints.i
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#endif

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
5 changes: 4 additions & 1 deletion mfem/_par/datacollection.i
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
%include "../common/mfem_config.i"

%init %{
import_array();
import_array1(-1);
%}

#ifdef MFEM_USE_MPI
Expand All @@ -30,4 +30,7 @@ import_array();
%import "gridfunc.i"
%import "pgridfunc.i"

%ignore mfem::ParaViewDataCollection::GetCoeffFieldMap;
%ignore mfem::ParaViewDataCollection::GetVCoeffFieldMap;

%include "fem/datacollection.hpp"
2 changes: 1 addition & 1 deletion mfem/_par/densemat.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using namespace mfem;
%}
// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/device.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%include "std_string.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/dist_solver.i
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%inline %{
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/doftrans.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}
%include "exception.i"
%import "vector.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/element.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/eltrans.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/estimators.i
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// initialization required to return numpy array from SWIG
%init %{
import_array();
import_array1(-1);
%}

%include "exception.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/fe.i
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%immutable;
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/fe_base.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}
%include "exception.i"
%import "intrules.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/fe_coll.i
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}

%import "mesh.i"
Expand Down
2 changes: 1 addition & 1 deletion mfem/_par/fe_fixed_order.i
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%}

%init %{
import_array();
import_array1(-1);
%}
%include "exception.i"
%import "fe.i"
Expand Down
Loading
Loading