|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
Fire grid data structure and construction. More...
#include <AMReX_BoxArray.H>#include <AMReX_DistributionMapping.H>#include <AMReX_Geometry.H>#include <AMReX_MultiFab.H>#include <AMReX_MFIter.H>

Go to the source code of this file.
Classes | |
| struct | FireGrid |
| 2D horizontal fire computational grid More... | |
Functions | |
| FireGrid | create_fire_grid (const amrex::BoxArray &ba_atm, const amrex::DistributionMapping &dm_atm, const amrex::Geometry &geom_atm, int C) |
| Construct a refined 2D fire grid over one atmospheric level's boxes. More... | |
| void | fire_fill_boundary (amrex::MultiFab &mf, const amrex::Geometry &geom) |
| void | fill_fire_from_atm_k0 (amrex::MultiFab &fire_mf, const amrex::MultiFab &atm_k0, const FireGrid &fg) |
Fire grid data structure and construction.
Defines a 2D grid for fire simulation on the horizontal plane, refined by factor C relative to one atmospheric AMR level (erf.fire.anchor_level, the finest level by default). The fire grid covers that level's boxes, keeps their x-y decomposition and their MPI owners, and its index space starts at zero at the lower corner of the region they cover.
| FireGrid create_fire_grid | ( | const amrex::BoxArray & | ba_atm, |
| const amrex::DistributionMapping & | dm_atm, | ||
| const amrex::Geometry & | geom_atm, | ||
| int | C | ||
| ) |
Construct a refined 2D fire grid over one atmospheric level's boxes.
| [in] | ba_atm | BoxArray of the atmospheric level |
| [in] | dm_atm | DistributionMapping of the atmospheric level |
| [in] | geom_atm | Geometry of the atmospheric level |
| [in] | C | Refinement factor (erf.fire.grid_ratio) |
Algorithm:
|
inline |
Copy a k = 0 atmospheric field onto the fire grid: every fire cell takes the value of the atmospheric column it lies in, (i / C + atm_lo[0], j / C + atm_lo[1]). Box n of the fire grid refines box n of the atmospheric level and has the same owner, so one MFIter serves both MultiFabs.

|
inline |
Exchange the ghost cells of a fire-grid MultiFab and fill the ones outside a non-periodic face of the domain by copying the nearest interior value.
FillBoundary alone leaves those cells untouched, so with an inflow-outflow atmosphere (the fire grid inherits its periodicity) the gradient stencil of the level set read whatever the allocator had left there. Whether that was benign depended on the box layout: one box per rank happened to run, two boxes on a rank blew the level set up at the inflow face within three steps. Every fire-grid exchange goes through here.
Referenced by FireCoupler::read_checkpoint(), and FireCoupler::update_flux_buffer().

