Skip to content

Commit

Permalink
Reverting PRs Exawind#1238 and Exawind#1240. Removing the set_resolut…
Browse files Browse the repository at this point in the history
…ions option has made correcting iblanks at shared nodes obsolete, so the corrections are removed.
  • Loading branch information
itopcuoglu committed Jun 26, 2024
1 parent 2dfa52e commit a6ce6c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 58 deletions.
8 changes: 1 addition & 7 deletions include/overset/TiogaBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,8 @@ class TiogaBlock

/** Update iblanks after connectivity updates
*/
void update_iblanks();
/** Update fringe and hole node vectors
*/
void update_fringe_and_hole_nodes(
void update_iblanks(
std::vector<stk::mesh::Entity>&, std::vector<stk::mesh::Entity>&);
/** Update the Tioga view of iblanks prior to donor-to-receptor interpolation
*/
void update_tioga_iblanks();

/** Update element iblanks after connectivity updates
*/
Expand Down
42 changes: 3 additions & 39 deletions src/overset/TiogaBlock.C
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ TiogaBlock::update_connectivity()
}

void
TiogaBlock::update_iblanks()
TiogaBlock::update_iblanks(
std::vector<stk::mesh::Entity>& holeNodes,
std::vector<stk::mesh::Entity>& fringeNodes)
{
sierra::nalu::ScalarIntFieldType* ibf =
meta_.get_field<int>(stk::topology::NODE_RANK, "iblank");
Expand All @@ -239,25 +241,7 @@ TiogaBlock::update_iblanks()
int* ib = stk::mesh::field_data(*ibf, *b);
for (size_t in = 0; in < b->size(); in++) {
ib[in] = ibnode(ip++);
}
}
}

void
TiogaBlock::update_fringe_and_hole_nodes(
std::vector<stk::mesh::Entity>& holeNodes,
std::vector<stk::mesh::Entity>& fringeNodes)
{
sierra::nalu::ScalarIntFieldType* ibf =
meta_.get_field<int>(stk::topology::NODE_RANK, "iblank");

stk::mesh::Selector mesh_selector = get_node_selector(blkParts_);
const stk::mesh::BucketVector& mbkts =
bulk_.get_buckets(stk::topology::NODE_RANK, mesh_selector);

for (auto b : mbkts) {
int* ib = stk::mesh::field_data(*ibf, *b);
for (size_t in = 0; in < b->size(); in++) {
if (ib[in] == 0) {
holeNodes.push_back((*b)[in]);
} else if (ib[in] == -1) {
Expand All @@ -267,26 +251,6 @@ TiogaBlock::update_fringe_and_hole_nodes(
}
}

void
TiogaBlock::update_tioga_iblanks()
{
sierra::nalu::ScalarIntFieldType* ibf =
meta_.get_field<int>(stk::topology::NODE_RANK, "iblank");

stk::mesh::Selector mesh_selector = get_node_selector(blkParts_);
const stk::mesh::BucketVector& mbkts =
bulk_.get_buckets(stk::topology::NODE_RANK, mesh_selector);

auto& ibnode = bdata_.iblank_.h_view;
int ip = 0;
for (auto b : mbkts) {
int* ib = stk::mesh::field_data(*ibf, *b);
for (size_t in = 0; in < b->size(); in++) {
ibnode(ip++) = ib[in];
}
}
}

void
TiogaBlock::update_iblank_cell()
{
Expand Down
15 changes: 3 additions & 12 deletions src/overset/TiogaSTKIface.C
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ TiogaSTKIface::post_connectivity_work(const bool isDecoupled)
{
for (auto& tb : blocks_) {
// Update IBLANK information at nodes and elements
tb->update_iblanks();
tb->update_iblanks(
oversetManager_.holeNodes_, oversetManager_.fringeNodes_);
tb->update_iblank_cell();

// For each block determine donor elements that needs to be ghosted to other
Expand All @@ -173,17 +174,7 @@ TiogaSTKIface::post_connectivity_work(const bool isDecoupled)
sierra::nalu::ScalarIntFieldType* ibf =
meta_.get_field<int>(stk::topology::NODE_RANK, "iblank");
std::vector<const stk::mesh::FieldBase*> pvec{ibf};
stk::mesh::parallel_min(bulk_, {ibf});

for (auto& tb : blocks_) {
// Call update_iblanks again to assign holeNodes and fringeNodes vectors
// after iblanks on shared nodes are corrected
tb->update_fringe_and_hole_nodes(
oversetManager_.holeNodes_, oversetManager_.fringeNodes_);
// Return the corrected iblank field to Tioga prior to donor-to-receptor
// interpolation
tb->update_tioga_iblanks();
}
stk::mesh::copy_owned_to_shared(bulk_, pvec);

post_connectivity_sync();

Expand Down

0 comments on commit a6ce6c5

Please sign in to comment.