Skip to content

Commit

Permalink
Update more STK throw symbols.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel committed Apr 17, 2024
1 parent da0d9f6 commit 8c2dba7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion include/TpetraLinearSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ copy_kokkos_unordered_map(
fail_count += insert_result.failed() ? 1 : 0;
}
}
ThrowRequire(fail_count == 0);
STK_ThrowRequire(fail_count == 0);
}

int getDofStatus_impl(stk::mesh::Entity node, const Realm& realm);
Expand Down
2 changes: 1 addition & 1 deletion include/matrix_free/LinSysInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct linsys_info
static stk::mesh::NgpField<gid_type>
get_gid_field(const stk::mesh::MetaData& meta)
{
ThrowRequire(meta.get_field(stk::topology::NODE_RANK, gid_name));
STK_ThrowRequire(meta.get_field(stk::topology::NODE_RANK, gid_name));
return stk::mesh::get_updated_ngp_field<gid_type>(
*meta.get_field(stk::topology::NODE_RANK, gid_name));
}
Expand Down
5 changes: 3 additions & 2 deletions include/matrix_free/MomentumOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ class MomentumResidualOperator
dirichlet_bc_active_ = dirichlet_offsets_in.extent_int(0) > 0;
dirichlet_bc_offsets_ = dirichlet_offsets_in;
bc_ = bc;
ThrowRequire(bc.up1.extent_int(0) == dirichlet_bc_offsets_.extent_int(0));
ThrowRequire(bc.ubc.extent_int(0) == bc.up1.extent_int(0));
STK_ThrowRequire(
bc.up1.extent_int(0) == dirichlet_bc_offsets_.extent_int(0));
STK_ThrowRequire(bc.ubc.extent_int(0) == bc.up1.extent_int(0));
}

private:
Expand Down
12 changes: 6 additions & 6 deletions include/tabular_props/LU.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ class LU
// Writable element access
inline double& operator()(int row, int col)
{
ThrowRequire(row <= dim_);
ThrowRequire(col <= dim_);
STK_ThrowRequire(row <= dim_);
STK_ThrowRequire(col <= dim_);
isReady_ = false;
return AA_(row, col);
};

// Read-only element access
inline double operator()(int row, int col) const
{
ThrowRequire(row <= dim_);
ThrowRequire(col <= dim_);
STK_ThrowRequire(row <= dim_);
STK_ThrowRequire(col <= dim_);
return AA_(row, col);
};

// Read-only element access that works. Compiler refuses to use
// the overloaded const operator() when possible for some reason.
inline double value(int row, int col) const
{
ThrowRequire(row <= dim_);
ThrowRequire(col <= dim_);
STK_ThrowRequire(row <= dim_);
STK_ThrowRequire(col <= dim_);
return AA_(row, col);
};

Expand Down

0 comments on commit 8c2dba7

Please sign in to comment.