OpenImpala
Image-based parallel transport property solver
Loading...
Searching...
No Matches
ImageLoader.H
Go to the documentation of this file.
1
9#ifndef IMAGE_LOADER_H
10#define IMAGE_LOADER_H
11
12#include <string>
13#include <filesystem>
14
15#include <AMReX_Box.H>
16#include <AMReX_BoxArray.H>
17#include <AMReX_DistributionMapping.H>
18#include <AMReX_Geometry.H>
19#include <AMReX_REAL.H>
20#include <AMReX_iMultiFab.H>
21
22namespace OpenImpala {
23
29struct ImageData {
30 amrex::Box domain_box;
31 amrex::Geometry geom;
32 amrex::BoxArray ba;
33 amrex::DistributionMapping dm;
34 amrex::iMultiFab mf_phase;
35};
36
55ImageData loadImage(const std::filesystem::path& filepath, const std::string& hdf5_dataset,
56 amrex::Real threshold_val, int box_size, int verbose = 1);
57
58} // namespace OpenImpala
59
60#endif // IMAGE_LOADER_H
Definition CathodeWrite.cpp:12
ImageData loadImage(const std::filesystem::path &filepath, const std::string &hdf5_dataset, amrex::Real threshold_val, int box_size, int verbose)
Loads a 3D image from file and thresholds it into a binary phase field.
Definition ImageLoader.cpp:20
Result of loading and thresholding a 3D image file.
Definition ImageLoader.H:29
amrex::Geometry geom
Geometry (periodic by default).
Definition ImageLoader.H:31
amrex::BoxArray ba
Grid decomposition.
Definition ImageLoader.H:32
amrex::Box domain_box
Domain bounding box.
Definition ImageLoader.H:30
amrex::iMultiFab mf_phase
Phase field (1 component, 1 ghost cell).
Definition ImageLoader.H:34
amrex::DistributionMapping dm
MPI distribution.
Definition ImageLoader.H:33