Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/owensgroup/RXMesh into reor…
Browse files Browse the repository at this point in the history
…dering
  • Loading branch information
Ahdhn committed Aug 19, 2024
2 parents 782eb7f + 0e6cd07 commit d71fe5b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion include/rxmesh/cavity_manager_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,8 @@ CavityManager<blockThreads, cop>::deactivate_boundary_cavities(

assert(e < m_s_owned_mask_e.size());
assert(f < m_s_owned_mask_f.size());
if (!m_s_owned_mask_f(f) || !m_s_owned_mask_e(e)) {
if (!m_s_owned_mask_f(f) || !m_s_owned_mask_e(e) ||
!m_s_owned_mask_v(v0) || !m_s_owned_mask_v(v1)) {
assert(v0 < m_s_owned_cavity_bdry_v.size());
assert(v1 < m_s_owned_cavity_bdry_v.size());
m_s_owned_cavity_bdry_v.set(v0, true);
Expand Down
6 changes: 3 additions & 3 deletions include/rxmesh/kernels/rxmesh_queries.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ __device__ __forceinline__ void e_f_manifold(const uint16_t num_edges,
auto ret = atomicCAS(s_ef + 2 * edge, INVALID16, face_id);
if (ret != INVALID16) {
ret = atomicCAS(s_ef + 2 * edge + 1, INVALID16, face_id);
if (ret != INVALID16) {
printf("\n B= %u", blockIdx.x);
}
//if (ret != INVALID16) {
// printf("\n B= %u", blockIdx.x);
//}
assert(ret == INVALID16);
}
}
Expand Down
16 changes: 16 additions & 0 deletions include/rxmesh/matrix/sparse_matrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,8 @@ struct SparseMatrix
*/
__host__ void analyze_pattern(Solver solver)
{
m_current_solver = solver;

if (!m_use_reorder) {
m_d_solver_row_ptr = m_d_row_ptr;
m_d_solver_col_idx = m_d_col_idx;
Expand Down Expand Up @@ -911,6 +913,13 @@ struct SparseMatrix
*/
__host__ void post_analyze_alloc(Solver solver)
{
if (solver != m_current_solver) {
RXMESH_ERROR(
"SparseMatrix::post_analyze_alloc() input solver is different "
"than current solver used in analyze_pattern()");
return;
}

m_internalDataInBytes = 0;
m_workspaceInBytes = 0;

Expand Down Expand Up @@ -1097,6 +1106,13 @@ struct SparseMatrix
*/
__host__ void factorize(Solver solver)
{
if (solver != m_current_solver) {
RXMESH_ERROR(
"SparseMatrix::post_analyze_alloc() input solver is different "
"than current solver used in analyze_pattern()");
return;
}

if (solver == Solver::CHOL) {
if constexpr (std::is_same_v<T, float>) {
CUSOLVER_ERROR(cusolverSpScsrcholFactor(m_cusolver_sphandle,
Expand Down
2 changes: 1 addition & 1 deletion include/rxmesh/rxmesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ void RXMesh::allocate_extra_patches()
const uint16_t p_edges_capacity = get_per_patch_max_edge_capacity();
const uint16_t p_faces_capacity = get_per_patch_max_face_capacity();

// #pragma omp parallel for
#pragma omp parallel for
for (int p = get_num_patches(); p < static_cast<int>(get_max_num_patches());
++p) {

Expand Down

0 comments on commit d71fe5b

Please sign in to comment.