Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Oct 5, 2023
1 parent 21bc763 commit 13135b3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/bvals/bvals_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ int BoundaryBase::CreateBvalsMPITag(int lid, int bufid) {

// TODO(felker): break-up this long function

void BoundaryBase::SearchAndSetNeighbors(Mesh *mesh,
MeshBlockTree &tree, int *ranklist, int *nslist,
void BoundaryBase::SearchAndSetNeighbors(
Mesh *mesh, MeshBlockTree &tree, int *ranklist, int *nslist,
const std::unordered_set<LogicalLocation> &newly_refined) {
Kokkos::Profiling::pushRegion("SearchAndSetNeighbors");
MeshBlockTree *neibt;
Expand Down
3 changes: 2 additions & 1 deletion src/mesh/amr_loadbalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,8 @@ void Mesh::RedistributeAndRefineMeshBlocks(ParameterInput *pin, ApplicationInput
#endif
// Re-initialize the mesh with our temporary ownership/neighbor configurations.
// No buffers are different when we switch to the final precedence order.
SetSameLevelNeighbors(block_list, leaf_grid_locs, this->GetRootGridInfo(), nbs, false, 0, newly_refined);
SetSameLevelNeighbors(block_list, leaf_grid_locs, this->GetRootGridInfo(), nbs, false,
0, newly_refined);
BuildGMGHierarchy(nbs, pin, app_in);
Initialize(false, pin, app_in);

Expand Down
11 changes: 6 additions & 5 deletions src/mesh/mesh-gmg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ void Mesh::PopulateLeafLocationMap() {
}
}

void Mesh::SetSameLevelNeighbors(BlockList_t &block_list, const LogicalLocMap_t &loc_map,
RootGridInfo root_grid, int nbs, bool gmg_neighbors,
int composite_logical_level,
const std::unordered_set<LogicalLocation> &newly_refined) {
void Mesh::SetSameLevelNeighbors(
BlockList_t &block_list, const LogicalLocMap_t &loc_map, RootGridInfo root_grid,
int nbs, bool gmg_neighbors, int composite_logical_level,
const std::unordered_set<LogicalLocation> &newly_refined) {
for (auto &pmb : block_list) {
auto loc = pmb->loc;
auto gid = pmb->gid;
Expand Down Expand Up @@ -109,7 +109,8 @@ void Mesh::SetSameLevelNeighbors(BlockList_t &block_list, const LogicalLocMap_t
for (auto &nb : *neighbor_list)
allowed_neighbors.insert(nb.loc);
for (auto &nb : *neighbor_list) {
nb.ownership = DetermineOwnership(nb.loc, allowed_neighbors, root_grid, newly_refined);
nb.ownership =
DetermineOwnership(nb.loc, allowed_neighbors, root_grid, newly_refined);
nb.ownership.initialized = true;
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/mesh/mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ class Mesh {
void RedistributeAndRefineMeshBlocks(ParameterInput *pin, ApplicationInput *app_in,
int ntot);
void BuildGMGHierarchy(int nbs, ParameterInput *pin, ApplicationInput *app_in);
void SetSameLevelNeighbors(BlockList_t &block_list, const LogicalLocMap_t &loc_map,
RootGridInfo root_grid, int nbs, bool gmg_neighbors,
int composite_logical_level = 0,
const std::unordered_set<LogicalLocation> &newly_refined = {});
void
SetSameLevelNeighbors(BlockList_t &block_list, const LogicalLocMap_t &loc_map,
RootGridInfo root_grid, int nbs, bool gmg_neighbors,
int composite_logical_level = 0,
const std::unordered_set<LogicalLocation> &newly_refined = {});
// defined in either the prob file or default_pgen.cpp in ../pgen/
static void InitUserMeshDataDefault(Mesh *mesh, ParameterInput *pin);
std::function<void(Mesh *, ParameterInput *)> InitUserMeshData =
Expand Down

0 comments on commit 13135b3

Please sign in to comment.