Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix in Linear Reconstruction dynamic array replace by static array #73

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR Changes 1
dhyan1272 committed Dec 23, 2024
commit fe06f1a8847117bfec96806e51585158f82bda49
3 changes: 1 addition & 2 deletions src/pmpo_MPMesh.cpp
Original file line number Diff line number Diff line change
@@ -339,8 +339,7 @@ void MPMesh::push(){
else
p_MPs->rebuild(); //rebuild pumi-pic
p_MPs->updateMPElmID(); //update mpElm IDs slices
reconstructSlices();

reconstructSlices();
}
while (anyIsMigrating);

12 changes: 0 additions & 12 deletions src/pmpo_MPMesh_assembly.hpp
Original file line number Diff line number Diff line change
@@ -150,7 +150,6 @@ void MPMesh::assemblyVtx1() {
//Solve Ax=b for each vertex
Kokkos::View<double*[vec4d_nEntries]> VtxCoeffs("VtxCoeffs", p_mesh->getNumVertices());
Kokkos::parallel_for("solving Ax=b", numVtx, KOKKOS_LAMBDA(const int vtx){

Vec4d v0 = {VtxMatrices(vtx,0,0), VtxMatrices(vtx,0,1), VtxMatrices(vtx,0,2), VtxMatrices(vtx,0,3)};
Vec4d v1 = {VtxMatrices(vtx,1,0), VtxMatrices(vtx,1,1), VtxMatrices(vtx,1,2), VtxMatrices(vtx,1,3)};
Vec4d v2 = {VtxMatrices(vtx,2,0), VtxMatrices(vtx,2,1), VtxMatrices(vtx,2,2), VtxMatrices(vtx,2,3)};
@@ -165,18 +164,8 @@ void MPMesh::assemblyVtx1() {
CholeskySolve4d_UnitRHS(A_regularized, coeff);
for (int i=0; i<vec4d_nEntries; i++)
VtxCoeffs(vtx,i)=coeff[i];

});

/*
Kokkos::fence(); // Ensures synchronization
cudaError_t err = cudaGetLastError();
if (err != cudaSuccess) {
std::cerr << "CUDA error: " << cudaGetErrorString(err) << std::endl;
}
assert(cudaDeviceSynchronize() == cudaSuccess);
*/

//Reconstruct
auto reconstruct = PS_LAMBDA(const int& elm, const int& mp, const int& mask) {
if(mask) { //if material point is 'active'/'enabled'
@@ -205,7 +194,6 @@ void MPMesh::assemblyVtx1() {
for(int k=0; k<numEntries; k++)
meshField(vtx, k) = reconVals(vtx,k);
});

}

template <MeshFieldIndex meshFieldIndex>
3 changes: 1 addition & 2 deletions src/pmpo_materialPoints.hpp
Original file line number Diff line number Diff line change
@@ -215,8 +215,7 @@ class MaterialPoints {
auto tgtPosXYZ = MPs->get<MPF_Tgt_Pos_XYZ>();
auto rotLatLonIncr = MPs->get<MPF_Rot_Lat_Lon_Incr>();

auto is_rotated = getRotatedFlag();

auto is_rotated = getRotatedFlag();
auto updateRotLatLon = PS_LAMBDA(const int& elm, const int& mp, const int& mask){
if(mask){
auto rotLat = curPosRotLatLon(mp,0) + rotLatLonIncr(mp,0); // phi