Skip to content

Commit

Permalink
fixed debug warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 15, 2024
1 parent 9b93bef commit 7a0975b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
16 changes: 10 additions & 6 deletions src/pumipic_adjacency.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1100,9 +1100,11 @@ bool search_mesh_2d(o::Mesh& mesh, // (in) mesh
auto searchElm = elem_ids[pid];
auto bridge = lastEdge[pid];
auto e2f_first = e2f_offsets[bridge];
auto e2f_last = e2f_offsets[bridge+1];
auto upFaces = e2f_last - e2f_first;
assert(upFaces==2);
#ifdef _DEBUG
auto e2f_last = e2f_offsets[bridge+1];
auto upFaces = e2f_last - e2f_first;
assert(upFaces==2);
#endif
auto faceA = e2f_vals[e2f_first];
auto faceB = e2f_vals[e2f_first+1];
assert(faceA != faceB);
Expand Down Expand Up @@ -1212,9 +1214,11 @@ OMEGA_H_DEVICE o::LO search_mesh_2d_pt(const o::Read<o::I8> side_is_exposed,
const o::LO searchElm = elem_id;
const o::LO bridge = lastEdge;
const o::LO e2f_first = e2f_offsets[bridge];
const o::LO e2f_last = e2f_offsets[bridge+1];
const o::LO upFaces = e2f_last - e2f_first;
assert(upFaces == 2);
#ifdef _DEBUG
const o::LO e2f_last = e2f_offsets[bridge+1];
const o::LO upFaces = e2f_last - e2f_first;
assert(upFaces == 2);
#endif
const o::LO faceA = e2f_vals[e2f_first];
const o::LO faceB = e2f_vals[e2f_first+1];
assert(faceA != faceB);
Expand Down
8 changes: 5 additions & 3 deletions src/pumipic_adjacency.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,11 @@ namespace pumipic {
auto searchElm = elem_ids[pid];
auto bridge = lastExit[pid];
auto e2f_first = e2f_offsets[bridge];
auto e2f_last = e2f_offsets[bridge+1];
auto upFaces = e2f_last - e2f_first;
assert(upFaces==2);
#ifdef _DEBUG
auto e2f_last = e2f_offsets[bridge+1];
auto upFaces = e2f_last - e2f_first;
assert(upFaces==2);
#endif
auto faceA = e2f_vals[e2f_first];
auto faceB = e2f_vals[e2f_first+1];
assert(faceA != faceB);
Expand Down
1 change: 0 additions & 1 deletion support/ppPrint.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ namespace pumipic {
#endif
}


}

0 comments on commit 7a0975b

Please sign in to comment.