Skip to content

Commit d6816d7

Browse files
psakievichPhilip Sakievich
andauthored
Address remaining diffs noted #821 (#824)
* Add syncs to WallMask * Bug fix for ordinals other than 0 for slip stress model * Remove unnecessary mod/sync Co-authored-by: Philip Sakievich <psakiev@sanida.gov>
1 parent ce4eb7f commit d6816d7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/edge_kernels/MomentumABLWallShearStressEdgeKernel.C

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,13 @@ MomentumABLWallShearStressEdgeKernel<BcAlgTraits>::execute(
5757
const auto& v_areavec = scratchViews.get_scratch_view_2D(exposedAreaVec_);
5858
const auto& v_wallshearstress = scratchViews.get_scratch_view_2D(wallShearStress_);
5959

60-
const int* ipNodeMap = meFC_->ipNodeMap();
61-
6260
for (int ip = 0; ip < BcAlgTraits::numFaceIp_; ++ip) {
6361

6462
// Decide which node the shear stress will be applied to
6563
// rowBase is the first row in the matrix associated with the velocity for this node
66-
const int rowBase = slip_
67-
? (ipNodeMap[ip] * BcAlgTraits::nDim_)
68-
: (meSCS_->opposingNodes(elemFaceOrdinal, ip) * BcAlgTraits::nDim_);
64+
const int rowBase =
65+
slip_ ? (meSCS_->ipNodeMap(elemFaceOrdinal)[ip] * BcAlgTraits::nDim_)
66+
: (meSCS_->opposingNodes(elemFaceOrdinal, ip) * BcAlgTraits::nDim_);
6967

7068
DoubleType amag = 0.0;
7169
for (int d=0; d < BcAlgTraits::nDim_; ++d) {

src/ngp_algorithms/MomentumABLWallFuncMaskUtil.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MomentumABLWallFuncMaskUtil::execute()
3333
const auto& meta = realm_.meta_data();
3434
const auto ngpMesh = realm_.ngp_mesh();
3535
const auto& fieldMgr = realm_.ngp_field_manager();
36-
const auto myNodeMask = fieldMgr.get_field<double>(maskNodeIndex_);
36+
auto myNodeMask = fieldMgr.get_field<double>(maskNodeIndex_);
3737

3838
const stk::mesh::Selector sel = (meta.locally_owned_part() | meta.globally_shared_part()) &
3939
stk::mesh::selectUnion(partVec_) &
@@ -45,6 +45,7 @@ MomentumABLWallFuncMaskUtil::execute()
4545
KOKKOS_LAMBDA(const Traits::MeshIndex& meshIdx) {
4646
myNodeMask.get(meshIdx, 0) = 0;
4747
});
48+
myNodeMask.modify_on_device();
4849
}
4950

5051
}

0 commit comments

Comments
 (0)