Difference between revisions of "Get Xdmf"

From XdmfWeb
Jump to navigationJump to search
(Added more detailed instructions for downloading and building Xdmf.)
m (Updated syntax highlighting language.)
Line 6: Line 6:
  
 
* Clone the Git repository:
 
* Clone the Git repository:
<source lang="sh">
+
<source lang="bash">
 
git clone git://xdmf.org/Xdmf.git
 
git clone git://xdmf.org/Xdmf.git
 
</source>
 
</source>
 
* Create and enter the directory for building the code:
 
* Create and enter the directory for building the code:
<source lang="sh">
+
<source lang="bash">
 
cd Xdmf
 
cd Xdmf
 
mkdir build  
 
mkdir build  
Line 16: Line 16:
 
</source>
 
</source>
 
* Prepare the CMake-based build. There are two options
 
* Prepare the CMake-based build. There are two options
*# Use the following command and select options using a text-based menu system:<source lang="sh">ccmake ..</source>
+
*# Use the following command and select options using a text-based menu system:<source lang="bash">ccmake ..</source>
 
*# If you are familiar with CMake, you may set various configuration options on the command line. For example, a typical command line for building Xdmf with Python bindings may look like the following:
 
*# If you are familiar with CMake, you may set various configuration options on the command line. For example, a typical command line for building Xdmf with Python bindings may look like the following:
   <source lang="sh">
+
   <source lang="bash">
 +
  export XDMF_INSTALL_DIR=/opt/Xdmf/
 
   cmake .. -DCMAKE_INSTALL_PREFIX=${XDMF_INSTALL_DIR} \
 
   cmake .. -DCMAKE_INSTALL_PREFIX=${XDMF_INSTALL_DIR} \
 
             -DBUILD_SHARED_LIBS=1 -DXDMF_WRAP_PYTHON=1 -Wno-dev
 
             -DBUILD_SHARED_LIBS=1 -DXDMF_WRAP_PYTHON=1 -Wno-dev
 
   </source>
 
   </source>
 
* Make and install Xdmf:
 
* Make and install Xdmf:
<source lang="sh">
+
<source lang="bash">
 
make  
 
make  
 
make install
 
make install

Revision as of 17:51, 20 May 2016

The old version of this page can be found at [1]

Xdmf depends on HDF5 and has a header only dependency on Boost. You must obtain and build those projects before you can build Xdmf. To use Xdmf from Python or Java you will also need Swig.

Use the following procedure and commands to download, build, and install Xdmf. These instructions assume that the environment variable XDMF_INSTALL_DIR contains the path where you want to install Xdmf.

  • Clone the Git repository:

<source lang="bash"> git clone git://xdmf.org/Xdmf.git </source>

  • Create and enter the directory for building the code:

<source lang="bash"> cd Xdmf mkdir build cd build </source>

  • Prepare the CMake-based build. There are two options
    1. Use the following command and select options using a text-based menu system:<source lang="bash">ccmake ..</source>
    2. If you are familiar with CMake, you may set various configuration options on the command line. For example, a typical command line for building Xdmf with Python bindings may look like the following:
  <source lang="bash">
  export XDMF_INSTALL_DIR=/opt/Xdmf/
  cmake .. -DCMAKE_INSTALL_PREFIX=${XDMF_INSTALL_DIR} \
           -DBUILD_SHARED_LIBS=1 -DXDMF_WRAP_PYTHON=1 -Wno-dev
  </source>
  • Make and install Xdmf:

<source lang="bash"> make make install </source>


To use xdmf from wrapped languages you will need to configure XDMF_WRAP_PYTHON, or XDMF_WRAP_JAVA on in ccmake.

Xdmf is mirrored in VTK which has reader and writer classes the call into XDMF to do file IO. To use XDMF within VTK, simply turn on Module_vtkIOXdmf2 or Module_vtkIOXdmf3 on the advanced options page of you VTK configuration.