Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
AMReX_EB_chkpt_file.H
Go to the documentation of this file.
1#ifndef AMREX_EB_CHKPT_FILE_H_
2#define AMREX_EB_CHKPT_FILE_H_
3
4#include <AMReX_MultiFab.H>
5
12namespace amrex::EB2 {
13
16{
17private:
18 std::string m_restart_file;
19
20 std::string m_volfrac_name = "volfrac";
21 std::string m_centroid_name = "centroid";
22 std::string m_bndryarea_name = "bndryarea";
23 std::string m_bndrycent_name = "bndrycent";
24 std::string m_bndrynorm_name = "bndrynorm";
25 std::string m_levelset_name = "levelset";
26
27 amrex::Vector<std::string> m_areafrac_name
28 = {AMREX_D_DECL("areafrac_x", "areafrac_y", "areafrac_z")};
29 amrex::Vector<std::string> m_facecent_name
30 = {AMREX_D_DECL("facecent_x", "facecent_y", "facecent_z")};
31 amrex::Vector<std::string> m_edgecent_name
32 = {AMREX_D_DECL("edgecent_x", "edgecent_y", "edgecent_z")};
33
35 void writeHeader (const BoxArray& cut_ba, const BoxArray& covered_ba, const Geometry& geom,
36 const IntVect& ngrow, bool extend_domain_face, int max_grid_size) const;
37
39 void writeToFile (const MultiFab& mf, const std::string& mf_name) const;
40
41
42public:
44 ChkptFile (std::string fname);
45
51 void read_from_chkpt_file (BoxArray& cut_grids, BoxArray& covered_grids,
58 MultiFab& levelset, int ng_gfab, const Geometry& geom,
59 const IntVect& ngrow_finest, bool extend_domain_face, int max_grid_size) const;
60
64 void write_to_chkpt_file (const BoxArray& cut_grids,
65 const BoxArray& covered_grids,
66 const MultiFab& volfrac,
67 const MultiFab& centroid, const MultiFab& bndryarea,
68 const MultiFab& bndrycent, const MultiFab& bndrynorm,
69 const Array<MultiFab,AMREX_SPACEDIM>& areafrac,
70 const Array<MultiFab,AMREX_SPACEDIM>& facecent,
71 const Array<MultiFab,AMREX_SPACEDIM>& edgecent,
72 const MultiFab& levelset, const Geometry& geom,
73 const IntVect& ngrow, bool extend_domain_face, int max_grid_size) const;
74};
75
76}
77
78#endif
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
A collection of Boxes stored in an Array.
Definition AMReX_BoxArray.H:568
Calculates the distribution of FABs to MPI processes.
Definition AMReX_DistributionMapping.H:43
Helper that serializes EB geometry to disk for restartability.
Definition AMReX_EB_chkpt_file.H:16
void read_from_chkpt_file(BoxArray &cut_grids, BoxArray &covered_grids, DistributionMapping &dmap, MultiFab &volfrac, MultiFab &centroid, MultiFab &bndryarea, MultiFab &bndrycent, MultiFab &bndrynorm, Array< MultiFab, 3 > &areafrac, Array< MultiFab, 3 > &facecent, Array< MultiFab, 3 > &edgecent, MultiFab &levelset, int ng_gfab, const Geometry &geom, const IntVect &ngrow_finest, bool extend_domain_face, int max_grid_size) const
Read EB data from a checkpoint file.
Definition AMReX_EB_chkpt_file.cpp:104
void write_to_chkpt_file(const BoxArray &cut_grids, const BoxArray &covered_grids, const MultiFab &volfrac, const MultiFab &centroid, const MultiFab &bndryarea, const MultiFab &bndrycent, const MultiFab &bndrynorm, const Array< MultiFab, 3 > &areafrac, const Array< MultiFab, 3 > &facecent, const Array< MultiFab, 3 > &edgecent, const MultiFab &levelset, const Geometry &geom, const IntVect &ngrow, bool extend_domain_face, int max_grid_size) const
Write EB data to disk so the hierarchy can be reconstructed later.
Definition AMReX_EB_chkpt_file.cpp:305
Rectangular problem domain geometry.
Definition AMReX_Geometry.H:74
A collection (stored as an array) of FArrayBox objects.
Definition AMReX_MultiFab.H:40
This class is a thin wrapper around std::vector. Unlike vector, Vector::operator[] provides bound che...
Definition AMReX_Vector.H:28
std::array< T, N > Array
Definition AMReX_Array.H:26
Definition AMReX_FabArrayBase.H:33