OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
binary_reader.hpp File Reference

Read field data from binary files. More...

#include "types.hpp"
#include <mpi.h>
#include <iostream>
Include dependency graph for binary_reader.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  pfc::BinaryReader
 

Detailed Description

Read field data from binary files.

This file defines the BinaryReader class for reading field data from binary files using MPI-IO. Used for:

  • Loading checkpoints
  • Reading initial conditions from files
  • Restarting simulations

The reader handles parallel I/O with proper domain decomposition, allowing each MPI rank to read only its local portion of the data.

Usage:

reader.set_domain(global_size, local_size, local_offset);
reader.read("checkpoint.bin", field_data);
Definition binary_reader.hpp:42
See also
results_writer.hpp for writing binary files
initial_conditions/file_reader.hpp for using this in initial conditions
Author
OpenPFC Contributors
Date
2025