22 #ifndef AMR_MULTI_GRID_LEVEL
23 #define AMR_MULTI_GRID_LEVEL
27 #include <AMReX_IntVect.H>
33 #include <unordered_map>
35 template <
class MatrixType,
class VectorType>
47 typedef amrex::FabArray<basefab_t>
mask_t;
67 typedef std::unordered_map<go_t, scalar_t>
umap_t;
100 const amrex::BoxArray& _grids,
101 const amrex::DistributionMapping& _dmap,
105 const Teuchos::RCP<comm_t>& comm);
199 void buildMap(
const Teuchos::RCP<comm_t>& comm);
203 const amrex::DistributionMapping&
dmap;
209 Teuchos::RCP<matrix_t>
R_p;
210 Teuchos::RCP<matrix_t>
I_p;
216 Teuchos::RCP<matrix_t>
G_p[AMREX_SPACEDIM];
amrex::Geometry AmrGeometry_t
Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > dmap_t
amrex::IntVect AmrIntVect_t
amrex::MultiFab AmrField_t
Teuchos::MpiComm< int > comm_t
Teuchos::RCP< matrix_t > G_p[AMREX_SPACEDIM]
gradient matrices in x, y, and z to compute electric field
std::unordered_map< go_t, scalar_t > umap_t
std::unique_ptr< AmrField_t > AmrField_u
amrex::FabArray< basefab_t > mask_t
amr::local_ordinal_t lo_t
Teuchos::RCP< vector_t > rho_p
charge density
scalar_t invdx_m[AMREX_SPACEDIM]
inverse cell size in particle rest frame
std::unique_ptr< mask_t > mask
interior, phys boundary, interface, covered
bool isValid(const AmrIntVect_t &iv) const
Teuchos::RCP< matrix_t > UnCovered_p
uncovered cells
bool applyBoundary(const AmrIntVect_t &iv, umap_t &map, const scalar_t &value)
std::shared_ptr< AmrField_t > AmrField_s
amrex::BaseFab< int > basefab_t
Teuchos::RCP< vector_t > residual_p
residual over all cells
AmrIntVect_t rr_m
refinement
Teuchos::RCP< matrix_t > Awf_p
composite Poisson matrix
Teuchos::RCP< vector_t > phi_p
potential vector
std::unique_ptr< mask_t > crsemask
Teuchos::RCP< matrix_t > Bfine_p
boundary from fine cells
Teuchos::RCP< vector_t > error_p
error over all cells
amr::AmrField_t AmrField_t
std::vector< go_t > indices_t
Type for matrix indices.
const amrex::BoxArray & grids
boxes of this level
std::unique_ptr< mask_t > refmask
covered (i.e. refined) or not-covered
amr::AmrIntVect_t AmrIntVect_t
const amrex::DistributionMapping & dmap
AMReX core distribution map.
Teuchos::RCP< matrix_t > Bcrse_p
boundary from coarse cells
bool isBoundary(const AmrIntVect_t &iv) const
Teuchos::RCP< matrix_t > Anf_p
no fine Poisson matrix
amr::AmrGeometry_t AmrGeometry_t
const AmrIntVect_t & refinement() const
go_t nr_m[AMREX_SPACEDIM]
number of grid points
const AmrGeometry_t & geom
geometry of this problem
const scalar_t * invCellSize() const
amr::global_ordinal_t go_t
Teuchos::RCP< matrix_t > R_p
restriction matrix
boundary_t bc_mp[AMREX_SPACEDIM]
boundary conditions
std::shared_ptr< AmrBoundary< AmrMultiGridLevel< MatrixType, VectorType > > > boundary_t
std::vector< scalar_t > coefficients_t
Type for matrix entries.
const scalar_t * cellSize() const
Teuchos::RCP< matrix_t > I_p
interpolation matrix
AmrMultiGridLevel(const Vector_t &meshScaling, const amrex::BoxArray &_grids, const amrex::DistributionMapping &_dmap, const AmrGeometry_t &_geom, const AmrIntVect_t &rr, const boundary_t *bc, const Teuchos::RCP< comm_t > &comm)
scalar_t dx_m[AMREX_SPACEDIM]
cell size in particle rest frame
go_t serialize(const AmrIntVect_t &iv) const
void buildMap(const Teuchos::RCP< comm_t > &comm)
Teuchos::RCP< dmap_t > map_p
Tpetra core map.