Skip to content

benzwick/paraview-mfem-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ParaView MFEM Reader

ParaView plugin for reading MFEM files.

This plugin can be used to read MFEM mesh (.mesh and .mesh.gz) files as well as other mesh formats supported by MFEM such as Gmsh (.msh) files. It can also be used to read MFEM data collection (.mfem_root) files that contain a mesh and associated fields.

Installing

This plugin requires PyMFEM to be installed within the ParaView Python environment. Please see the references below for additional details.

  1. Set variables:

     export PV_PY_VER=3.7.4
     export PV_NP_VER=1.16.4
     export PV_SIX_VER=1.11.0
     export PV_PY_PREFIX=/opt/paraview/pvpy-${PV_PY_VER}
     export PV_PY_VENV=${PV_PY_PREFIX}-venv
    
  2. Install Python:

     wget https://www.python.org/ftp/python/${PV_PY_VER}/Python-${PV_PY_VER}.tgz
     tar xzvf Python-${PV_PY_VER}.tgz
     cd Python-${PV_PY_VER}
     ./configure --enable-optimizations --prefix=${PV_PY_PREFIX}
     make
     make install
     cd ..
    
  3. Create virtual environment:

     ${PV_PY_PREFIX}/bin/python3 -m venv ${PV_PY_VENV}
    
  4. Install packages into virtual environment:

     source ${PV_PY_PREFIX}-venv/bin/activate
     pip uninstall -y numpy
     pip install --ignore-installed numpy==$PV_NP_VER
     pip uninstall -y six
     pip install --ignore-installed six==$PV_SIX_VER
     pip install mfem
    
  5. Before starting ParaView (note that python3.7 is used here):

     export PYTHONPATH=${PV_PY_VENV}/lib/python3.7/site-packages
    
  6. Load the MFEMReader.py module in ParaView via ToolsManage PluginsLoad New. You can optionally check the Auto Load option.

You should now be able to open MFEM files using FileOpen.

References

About

ParaView plugin for reading MFEM mesh files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages