include/pops/coupling/amr/amr_regrid_coupler.hpp File ReferenceΒΆ
|
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
|
amr_regrid_finest: Berger-Rigoutsos regrid of the finest level (responsibility b). More...
#include <pops/amr/tagging/cluster.hpp>#include <pops/amr/hierarchy/refinement_ratio.hpp>#include <pops/amr/regridding/regrid.hpp>#include <pops/amr/tagging/tag_box.hpp>#include <pops/core/foundation/types.hpp>#include <pops/numerics/time/amr/reflux/amr_reflux_mf.hpp>#include <pops/mesh/index/box2d.hpp>#include <pops/mesh/layout/box_array.hpp>#include <pops/mesh/layout/distribution_mapping.hpp>#include <pops/mesh/execution/for_each.hpp>#include <pops/mesh/storage/multifab.hpp>#include <pops/mesh/layout/refinement.hpp>#include <pops/parallel/comm.hpp>#include <algorithm>#include <utility>#include <vector>
Include dependency graph for amr_regrid_coupler.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Namespaces | |
| namespace | pops |
Functions | |
| std::pair< BoxArray, DistributionMapping > | pops::regrid_compute_fine_layout (TagBox grown, const Box2D &pdom, int pk, int margin, bool coarse_replicated=true) |
Compute the fine layout (BoxArray + DistributionMapping) of a Berger-Rigoutsos regrid from the grown tags ALREADY dilated (grow_tags) on the PARENT domain pdom. | |
| MultiFab | pops::regrid_field_on_layout (const BoxArray &fb, const DistributionMapping &dmap, const MultiFab &par, const MultiFab &old, int pk, int ngf, bool coarse_replicated=true) |
Rebuild ONE fine MultiFab on the IMPOSED layout fb / dmap (the same one for all blocks in multi-block): (a) piecewise-constant interpolation from the parent par where the new patch is not covered by the old fine, (b) carry-over of the existing fine data old where the old patch covers the new one. | |
| template<class Crit > | |
| void | pops::amr_regrid_finest (std::vector< AmrLevelMP > &L, std::vector< MultiFab > &aux, const Box2D &dom, Crit crit, int grow, int margin, int aux_ncomp=kAuxBaseComps, bool coarse_replicated=true) |
Regrid the finest level (L.back()) by Berger-Rigoutsos on the criterion crit applied to the parent: rebuilds the patches (fine data carry-over otherwise parent interp) + the aux. | |
Detailed Description
amr_regrid_finest: Berger-Rigoutsos regrid of the finest level (responsibility b).
Free function template on the criterion, modeled on the STYLE of amr/regrid.hpp (regrid_level) but NOT merged: different invariants (level fk coords = parent x2, nesting margin clamp, carry-over of the old fine). Body moved as-is from AmrCouplerMP::regrid: same tagging, clustering, clamp, parent interp then fine carry-over, swap + aux realloc. Does not assume single-rank (DistributionMapping built with n_ranks()). Under a DISTRIBUTED coarse level, the global OR of the tags (all_reduce_or) guarantees IDENTICAL fine patches on all ranks (otherwise incompatible dmaps).
Generated by