Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the set_resolutions option to resolve mandatory receptor issues #1267

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]) {
psakievich marked this conversation as resolved.
Show resolved Hide resolved
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
Loading