From f982cc7914ebd2579e8f56ac40e1ef7bb1f04946 Mon Sep 17 00:00:00 2001 From: Eamonn Date: Sun, 14 Jul 2024 15:45:19 -0400 Subject: [PATCH] minor bug fixes --- src/pmpo_MPMesh_assembly.hpp | 1 + src/pmpo_utils.hpp | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/pmpo_MPMesh_assembly.hpp b/src/pmpo_MPMesh_assembly.hpp index 5af52597..8137179b 100644 --- a/src/pmpo_MPMesh_assembly.hpp +++ b/src/pmpo_MPMesh_assembly.hpp @@ -102,6 +102,7 @@ void MPMesh::assemblyVtx1() { auto elm2VtxConn = p_mesh->getElm2VtxConn(); auto mpData = p_MPs->getData(); const int numEntries = mpSliceToNumEntries(); + auto weight = p_MPs->getData(); p_mesh->fillMeshField(0.0); auto meshField = p_mesh->getMeshField(); diff --git a/src/pmpo_utils.hpp b/src/pmpo_utils.hpp index b838946e..e966d69b 100644 --- a/src/pmpo_utils.hpp +++ b/src/pmpo_utils.hpp @@ -216,7 +216,7 @@ class Matrix { | v3[0] v3[1] v3[2] v3[3] | */ private: - Kokkos::View data_; + std::vector> data_; int rows_; int cols_; @@ -224,31 +224,31 @@ class Matrix { KOKKOS_INLINE_FUNCTION Matrix(Vec4d v0, Vec4d v1, Vec4d v2, Vec4d v3){ - data_ = Kokkos::View("Matrix", 4, 4); + data_ = std::vector>(4, std::vector(4, 0)); rows_ = 4; cols_ = 4; for (int i=0; i<4; i++){ - data_(0, i) = v0[i]; - data_(1, i) = v1[i]; - data_(2, i) = v2[i]; - data_(3, i) = v3[i]; + data_[0][i] = v0[i]; + data_[1][i] = v1[i]; + data_[2][i] = v2[i]; + data_[3][i] = v3[i]; } } KOKKOS_INLINE_FUNCTION - Kokkos::View solve(Kokkos::View b){ + std::vector solve(std::vector b){ //create a view to store the solution x, initialize to 0 - Kokkos::View x("x", rows_); + std::vector x(rows_, 0); for(int i=0; i=0; i--){ double sum = 0; for(int j = i+1; j