Mfem

Latest version: v4.7.0.1

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

05.07

* vtk.py and datacollection.py was loaded in mfem.ser and mfem.par namespace properly
* istream& wrapping was improved in the same way as ostream&
* mfem-4.2 does not have Save(const char*, precision) yet. Added it in wrapper code.
* Fiexed MixedBilinearForm::AddBdrTraceFaceIntegrator

04.30

* improved std::ostream & wrappring. Methods which takes std::ostream& are
wrapped so that it accept either
1) filename for saving data to file
2) mfem.STDOUT for writing data to stdout
3) StringIO for in-memory data passing

04.18

* update ex10p
* CHypreParVec::__mul__, __imul__ are updated to support multiplying
complex number
* Various fixes in chypre.py
* wrapper class regenerated using mfem 324d66b0c7fc75225e830dcfb02647722bae1fe0
* INSTALL instruction is updated to mention DMFEM_USE_EXCEPTIONS=1

4.6

- new Python version of examples, translated from ex34, 34p, 35p, 36, 36p, 37,
37p, 38
- intrules_cut.i is added
- PyLinFormIntegraor, PyBilinearFormIntegrator, PyNonlinearFormIntegrator are
added as Director classes, which allows for implementing these integrators
using Python (see ex38.py)
- following method of (Par)MixedBilinearForm accept HypreParMatrix as OperatorPtr
- (Par)MixedBilinearForm::FormRectangularSystemMatrix
- (Par)MixedBilinearForm::FormRectangularLinearSystem
- field_diff.py is added under miniapps/gslib (PR195)
- wrappers for Array<char>, Array<long long>, and Array<unsigned char> are added as
uintArray, int8Array, int64Array.
- Since Array<unsigned int> is not explicitly instantiated in Array.cpp, thus some
method such as Print, Sort etc are not avaialbe. As a workaround, GetDataArray is
added to return a numpy array view of underlying memory section.
>>> v = mfem.uintArray(10)
>>> v.GetDataArray()[:] = (1, 105, 20, 3, 50, 4, 2, 15, 8)
>>> v.GetDataArray()[:] = np.sort(a.GetDataArray())
>>> v.ToList()
[1, 2, 3, 4, 8, 15, 20, 50, 105, 300]


- Fixed the return value of FindPointsGSLIB::GetCode() not being properly wrapped.

2023 01.
* Improved mfem.jit decorator to create Numba JITed coefficient.
(note, this involves an incompatible API change)

- parameter is passed as a numpy-like array to a user function (not as
a CPointer object).

- automatically creates two coefficients which return real and imaginary
part, repsectively, when complex=True.

- user function can use other MFEM coefficient as a variable
(using dependency keyword)

- decorator without () is supported
mfem.jit.scalar is the same as
mfem.jit.scalar(td=False, params=None, complex=False,
dependency=None, interface="simple", sdim=None,
debug=False)


* mfem::Array<T>::Append accepts list/tuple
* Added --with-lapack option in setup.py. This option allows for building MFEM
with MFEM_USE_LAPACK option. Use blas-libraries and lapack-libraries to specify
the library locaiton if they are in non-standard location.
* Fixed Vector::__getitem__ so that it raise IndexError if Index is outside
of -size < idx < size-1. This fixes an infinite loop error when mfem.Vector
is used in for loop, like this.

>>> vec = mfem.Vector([1,2,3])
>>> for x in vec:
print(x)

* dependency library version updates
hypre version 2.27.0
libCEED version 0.11
gslib version 1.0.8

* ex33, ex33p is added.
* ex15 is updated to use Numba

2022 03.
* Added --cuda-arch option to specify the compute cuda archtecture

02.27

* Added Cuda-build HYPRE support. Cuda is controlled by two setup.py options
--with-cuda : MFEM_USE_CUDA is on.
--with-cuda-hypre : HYPRE is built with Cuda.
* mfem::Device is forced to be a singleton in Python layer too. This keeps MemoryManager
from being deallocated before other objects are cleaned.
* bool mfem::is_HYPRE_USING_CUDA() is added to check if HYPRE is build with Cuda
* make sure that parallel examples calls mfem::Device
* enabled --parallel option when building extension modules

02.15

* added %import globals.i in sparsemat.i and common_functions.i. This is needed when
MFEM

2022 01.xx
* Generalized multigrid constructor typemap. It now accept not only tuple/list but also
Array<bool> Array<Operator *> and Array<Solver *>, like C++ API does.
* Following are added to return DoFTransformation
FiniteElementSpace::GetElementDoFTransformation
FiniteElementSpace::GetElementVDoFTransformation
FiniteElementSpace::GetBdrElementDoFTransformation
FiniteElementSpace::GetBdrElementVDoFTransformation
* DenseMatrix constructor using numpy array is added
>>> x = mfem.DenseMatrix(np.arange(12.).reshape(3,4))
>>> x.Print()
[row +0]
+0.000000e+00 +1.000000e+00 +2.000000e+00 +3.000000e+00
[row +1]
+4.000000e+00 +5.000000e+00 +6.000000e+00 +7.000000e+00
[row +2]
+8.000000e+00 +9.000000e+00 +1.000000e+01 +1.100000e+01

2021 12.xx
* Improved array interface. ex: Array<T>::__getitem__ accespt slice to return subarray
* gslib support is included
* ex30.py, ex30p.py were added. CoefficientRefiner::SetIntRule accepts tuple/list
* ex25 is added. It demonstrates how to use numba JIT
* Fixed IntegrationPonitArray, IntegrationRulePtrArray. They now returns a proper proxy object
when accessed using index
ex: IntegrationPonitArray[0] -> return IntegrationPoint
IntegrationPonitArray[0:3] -> return IntegrationPointArray (this subarray does not own data)
d = IntegrationPonitArray.GetData() -> return IntegrationPoint*
IntegrationPonitArray((d, num)) -> A constructore borrowing data.
* Additional Array<T> template instatiation Array<Vector *> Array<FiniteElementSpace *> Array<bool>
* const IntegrationRule *irs[] in gridfunc.hpp, pgridfunc.hpp, complex_fem.hpp, coefficient.hpp
are wrapped to accept tuple/list of IntegrationRule (see ex25.py)
* Warning about old numpy interface (NPY_1_7..... ) is addressed.
* GridFunction::Assign (renamed verison of operator ==) accept numpy vector
* ParGridFunction::Assign (renamed verison of operator ==) accept numpy vector


2021 10.xx
* Fixed an issue due to new fe_xxx.hp

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.