Skip to content

Commit

Permalink
added () operator to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
EamonnGlynn committed Jul 14, 2024
1 parent b33651f commit 531e23c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pmpo_MPMesh_assembly.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ void MPMesh::assemblyVtx1() {
int vID = elm2VtxConn(elm,i+1)-1; //vID = vertex id
for(int j=0;j<numEntries;j++){
double fieldComponentVal = mpData(mp,j) * weight(mp, 0);
double[4] CoordDiffs = {1, vtxCoords(vID,0) - mpPositions(mp,0), vtxCoords(vID,1) - mpPositions(mp,1), vtxCoords(vID,2) - mpPositions(mp,2)};
double[4] CoordDiffs = {1,
vtxCoords(vID,0) - mpPositions(mp,0),
vtxCoords(vID,1) - mpPositions(mp,1),
vtxCoords(vID,2) - mpPositions(mp,2)};
//add to the matrix
for(int k=0;k<4;k++){
for(int l=0;l<4;l++){
Expand Down
3 changes: 3 additions & 0 deletions src/pmpo_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ class Matrix {
return x;
}

KOKKOS_INLINE_FUNCTION
double operator()(int i, int j) const { return data_[i][j];}


};

Expand Down

0 comments on commit 531e23c

Please sign in to comment.