Skip to content

andrsd/exodusIIcpp

Repository files navigation

qa build codecov License Scc Count Badge

exodusIIcpp

exodusIIcpp is a C++17 wrapper around ExodusII file format.

Features

  • C++ API for reading and writing exodusII files
  • Support for:
    • element blocks,
    • side sets,
    • node sets
  • CMake installation
  • Support for Linux, macOS X

Examples

Reading a file

#include "exodusIIcpp/exodusIIcpp.h"

exodusIIcpp::File exo("file.exo", exodusIIcpp::FileAccess::READ);
exo.read();

auto & x = exo.get_x_coords();
auto & y = exo.get_y_coords();

for (auto & eb : exo.get_element_blocks()) {
  ...
}

for (auto & ns : exo.get_node_sets()) {
  ...
}

for (auto & ss : exo.get_side_sets()) {
  ...
}

Requirements

  • C++17 compiler
  • CMake 3.16+
  • fmt
  • ExodusII
    • usually also depends on NetCDF and HDF5