Skip to content

Commit

Permalink
Removing the set_resolutions option to resolve mandatory receptor iss…
Browse files Browse the repository at this point in the history
…ues (#1267)

* Removed the input file option set_resolutions to avoid mandatory receptor issues related to Tioga's dependency on the shape of partition boundaries. Cell and node resolutions are calculated in Nalu-Wind prior to being passed to Tioga, which consistently marks outer boundary adjacent shared nodes as mandatory fringes across all ranks.

* Removed the adjustResolutionsForFringes_ flag and the flag checks
  • Loading branch information
itopcuoglu committed Jun 17, 2024
1 parent 83c6597 commit 2dfa52e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 35 deletions.
5 changes: 5 additions & 0 deletions include/overset/TiogaBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ class TiogaBlock
void update_element_volumes();

/** Adjust resolutions of mandatory fringe entities
*
* The entities connected to overset sidesets have their
* nodal/cell resolutions adjusted so that TIOGA will never consider these
* cells as donors. This adjustment is necessary to avoid fringe/field
* mismatch across domain partition boundaries.
*/
void adjust_cell_resolutions();

Expand Down
15 changes: 0 additions & 15 deletions include/overset/TiogaOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,8 @@ class TiogaOptions
*/
void set_options(TIOGA::tioga&);

bool set_resolutions() const { return setResolutions_; }

bool reduce_fringes() const { return reduceFringes_; }

/** Adjust resolutions for mandatory fringe nodes
*
* If true, then the entities connected to overset sidesets have their
* nodal/cell resolutions adjusted so that TIOGA will never consider these
* cells as donors. This adjustment is necessary to avoid fringe/field
* mismatch across domain partition boundaries.
*/
bool adjust_resolutions() const { return adjustResolutionsForFringes_; }

double cell_res_mult() const { return cellResMult_; }
double node_res_mult() const { return nodeResMult_; }

Expand Down Expand Up @@ -94,10 +83,6 @@ class TiogaOptions

//! Flag indicating whether user has set the mexclude variable
bool hasMexclude_{false};

//! Flag indicating whether the node/cell resolutions should be adjusted for
//! mandatory fringes
bool adjustResolutionsForFringes_{true};
};

} // namespace tioga_nalu
Expand Down
5 changes: 2 additions & 3 deletions src/overset/TiogaBlock.C
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,8 @@ TiogaBlock::register_block(TIOGA::tioga& tg)
tg.set_cell_iblank(meshtag_, bdata_.iblank_cell_.h_view.data());

// Register cell/node resolutions for TIOGA
if (tiogaOpts_.set_resolutions())
tg.setResolutions(
meshtag_, bdata_.node_res_.h_view.data(), bdata_.cell_res_.h_view.data());
tg.setResolutions(
meshtag_, bdata_.node_res_.h_view.data(), bdata_.cell_res_.h_view.data());
}

void
Expand Down
8 changes: 0 additions & 8 deletions src/overset/TiogaOptions.C
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ TiogaOptions::load(const YAML::Node& node)
if (node["symmetry_direction"])
symmetryDir_ = node["symmetry_direction"].as<int>();

if (node["set_resolutions"])
setResolutions_ = node["set_resolutions"].as<bool>();

if (node["reduce_fringes"])
reduceFringes_ = node["reduce_fringes"].as<bool>();

Expand All @@ -41,11 +38,6 @@ TiogaOptions::load(const YAML::Node& node)
if (node["node_resolution_multiplier"]) {
nodeResMult_ = node["node_resolution_multiplier"].as<double>();
}

if (node["adjust_mandatory_fringe_resolutions"]) {
adjustResolutionsForFringes_ =
node["adjust_mandatory_fringe_resolutions"].as<bool>();
}
}

void
Expand Down
14 changes: 5 additions & 9 deletions src/overset/TiogaSTKIface.C
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,15 @@ TiogaSTKIface::register_mesh()
for (auto& tb : blocks_) {
tb->update_coords();
tb->update_element_volumes();
if (tiogaOpts_.adjust_resolutions())
tb->adjust_cell_resolutions();
tb->adjust_cell_resolutions();
}

if (tiogaOpts_.adjust_resolutions()) {
auto* nodeVol =
meta_.get_field(stk::topology::NODE_RANK, "tioga_nodal_volume");
stk::mesh::parallel_max(bulk_, {nodeVol});
}
auto* nodeVol =
meta_.get_field(stk::topology::NODE_RANK, "tioga_nodal_volume");
stk::mesh::parallel_max(bulk_, {nodeVol});

for (auto& tb : blocks_) {
if (tiogaOpts_.adjust_resolutions())
tb->adjust_node_resolutions();
tb->adjust_node_resolutions();
tb->register_block(tg_);
}
}
Expand Down

0 comments on commit 2dfa52e

Please sign in to comment.