Skip to content

Commit 2010d21

Browse files
committed
Removed warnings
1 parent 36837b3 commit 2010d21

File tree

4 files changed

+8
-147
lines changed

4 files changed

+8
-147
lines changed

src/pmpo_MPMesh_assembly.hpp

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -103,33 +103,10 @@ void MPMesh::resetPreComputeFlag(){
103103
isPreComputed = false;
104104
}
105105

106-
void MPMesh::computeMatricesAndSolve(){
107-
}
108-
109106
template <MeshFieldIndex meshFieldIndex>
110107
void MPMesh::assemblyVtx1() {
111108
}
112109

113-
void MPMesh::subAssemblyCoeffs(int vtxPerElm, int nCells, double* m11, double* m12, double* m13, double* m14,
114-
double* m22, double* m23, double* m24,
115-
double* m33, double* m34,
116-
double* m44){
117-
}
118-
119-
void MPMesh::solveMatrixAndRegularize(int nVertices, double* m11, double* m12, double* m13, double* m14,
120-
double* m22, double* m23, double* m24,
121-
double* m33, double* m34,
122-
double* m44){
123-
}
124-
125-
template <MeshFieldIndex meshFieldIndex>
126-
void MPMesh::subAssemblyVtx1(int vtxPerElm, int nCells, int comp, double* array) {
127-
}
128-
129-
// An improvement on the above method by doing the full assembly on GPUs
130-
void MPMesh::assembleField(int vtxPerElm, int nCells, int nVerticesSolve, int nVertices, double* array_sub, double* array_full){
131-
}
132-
133110
//Start Communication routine
134111
void MPMesh::startCommunication(){
135112

@@ -405,9 +382,6 @@ void MPMesh::reconstruct_coeff_full(){
405382
invertMatrix(vtxMatrices, radius);
406383
}
407384

408-
void MPMesh::solveMatrix(const Kokkos::View<double**>& vtxMatrices, double& radius, bool scaling){
409-
}
410-
411385
void MPMesh::invertMatrix(const Kokkos::View<double**>& vtxMatrices, const double& radius){
412386

413387
static int count_deb = 1;
@@ -610,9 +584,9 @@ void MPMesh::reconstruct_full() {
610584
communicate_and_take_halo_contributions(meshField, numVertices, numEntries, 0, 0);
611585
pumipic::RecordTime("Communicate Field Values" + std::to_string(self), timer.seconds());
612586

587+
//Debug
613588
Kokkos::fence();
614589
assert(cudaDeviceSynchronize() == cudaSuccess);
615-
//Debug Delete
616590
Kokkos::parallel_for("printSymmetricBlock", numVertices, KOKKOS_LAMBDA(const int vtx){
617591
if (vtx == 2630) {
618592
printf("Field in %d: ", vtx);
@@ -700,8 +674,7 @@ void MPMesh::communicate_and_take_halo_contributions(const Kokkos::View<double**
700674
Kokkos::fence();
701675
pumipic::RecordTime("Communication-GPU reduction-E-" + std::to_string(numEntries) + "-" + std::to_string(self), timer.seconds());
702676

703-
if (p_MPs->getOpMode() != polyMPO::MP_DEBUG)
704-
return;
677+
/*
705678
if(self==1){
706679
for (int i=0; i< totalSize; i++){
707680
if(flatDataVec[i*numEntries]==0) continue;
@@ -711,6 +684,7 @@ void MPMesh::communicate_and_take_halo_contributions(const Kokkos::View<double**
711684
printf("\n");
712685
}
713686
}
687+
*/
714688
}
715689

716690
void MPMesh::communicateFields(const std::vector<std::vector<double>>& fieldData, const int numEntities, const int numEntries, int mode,
@@ -762,7 +736,7 @@ void MPMesh::communicateFields(const std::vector<std::vector<double>>& fieldData
762736

763737
else if(mode == 1){
764738
// Owner sends to halos
765-
for (auto iProc=0; iProc<ownerOwnerLocalIDs.size(); iProc++) {
739+
for (size_t iProc=0; iProc<ownerOwnerLocalIDs.size(); iProc++) {
766740
for (auto& ownerID : ownerOwnerLocalIDs[iProc]) {
767741
for (int iDouble = 0; iDouble < numEntries; iDouble++)
768742
sendDataVec[iProc].push_back(fieldData[ownerID][iDouble]);

src/pmpo_c.cpp

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,68 +1249,19 @@ void polympo_setReconstructionOfStress_f(MPMesh_ptr p_mpmesh, const int order, c
12491249
(void)meshEntType;
12501250
}
12511251

1252-
//TO DO DELETE
1253-
//With MPI communication done via MPAS
1254-
void polympo_vtxSubAssemblyIceArea_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int comp, double* array){
1255-
checkMPMeshValid(p_mpmesh);
1256-
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1257-
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
1258-
PMT_ALWAYS_ASSERT(vtxPerElm <= maxVtxsPerElm);
1259-
PMT_ALWAYS_ASSERT(nCells == p_mesh->getNumElements());
1260-
PMT_ALWAYS_ASSERT(comp == 0 || comp== 1); //either first or second component
1261-
mpmesh->subAssemblyVtx1<polyMPO::MeshF_VtxMass>(vtxPerElm, nCells, comp, array);
1262-
}
1263-
1264-
void polympo_vtxSubAssemblyVelocity_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int comp, double* array){
1265-
checkMPMeshValid(p_mpmesh);
1266-
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1267-
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
1268-
PMT_ALWAYS_ASSERT(vtxPerElm <= maxVtxsPerElm);
1269-
PMT_ALWAYS_ASSERT(nCells == p_mesh->getNumElements());
1270-
PMT_ALWAYS_ASSERT(comp == 0 || comp== 1); //either first or second component
1271-
mpmesh->subAssemblyVtx1<polyMPO::MeshF_Vel>(vtxPerElm, nCells, comp, array);
1272-
}
1273-
1274-
void polympo_subAssemblyCoeffs_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, double* m11, double* m12, double* m13, double* m14,
1275-
double* m22, double* m23, double* m24,
1276-
double* m33, double* m34,
1277-
double* m44){
1278-
checkMPMeshValid(p_mpmesh);
1279-
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
1280-
PMT_ALWAYS_ASSERT(vtxPerElm <= maxVtxsPerElm);
1281-
PMT_ALWAYS_ASSERT(nCells == p_mesh->getNumElements());
1282-
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1283-
mpmesh->subAssemblyCoeffs(vtxPerElm, nCells, m11, m12, m13, m14, m22, m23, m24, m33, m34, m44);
1284-
}
1285-
1286-
void polympo_regularize_and_solve_matrix_f(MPMesh_ptr p_mpmesh, int nVertices, double* m11, double* m12, double* m13, double* m14,
1287-
double* m22, double* m23, double* m24,
1288-
double* m33, double* m34,
1289-
double* m44){
1290-
checkMPMeshValid(p_mpmesh);
1291-
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
1292-
PMT_ALWAYS_ASSERT(nVertices == p_mesh->getNumVertices());
1293-
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1294-
mpmesh->solveMatrixAndRegularize(nVertices, m11, m12, m13, m14, m22, m23, m24, m33, m34, m44);
1295-
}
1296-
12971252
void polympo_applyReconstruction_f(MPMesh_ptr p_mpmesh){
12981253
checkMPMeshValid(p_mpmesh);
12991254
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
13001255
mpmesh->reconstructSlices();
13011256
}
13021257

1303-
void polympo_fullAssemblyIceArea_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int nVerticesSolve, int nVertices,
1304-
double* array_sub, double* array_full){
1258+
//For reconstruction
1259+
void polympo_reconstruct_coeff_with_MPI_f(MPMesh_ptr p_mpmesh){
13051260
checkMPMeshValid(p_mpmesh);
1306-
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
13071261
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1308-
PMT_ALWAYS_ASSERT(nVertices == p_mesh->getNumVertices());
1309-
mpmesh->assembleField(vtxPerElm, nCells, nVerticesSolve, nVertices, array_sub, array_full);
1262+
mpmesh->reconstruct_coeff_full();
13101263
}
1311-
//
13121264

1313-
//Only these are needed
13141265
void polympo_reconstruct_iceArea_with_MPI_f(MPMesh_ptr p_mpmesh){
13151266
checkMPMeshValid(p_mpmesh);
13161267
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
@@ -1323,13 +1274,7 @@ void polympo_reconstruct_velocity_with_MPI_f(MPMesh_ptr p_mpmesh){
13231274
mpmesh->reconstruct_full<polyMPO::MeshF_Vel>();
13241275
}
13251276

1326-
void polympo_reconstruct_coeff_with_MPI_f(MPMesh_ptr p_mpmesh){
1327-
checkMPMeshValid(p_mpmesh);
1328-
auto mpmesh = ((polyMPO::MPMesh*)p_mpmesh);
1329-
mpmesh->reconstruct_coeff_full();
1330-
}
1331-
//Till here
1332-
1277+
//Owning Process and Global IDs
13331278
void polympo_setOwningProc_f(MPMesh_ptr p_mpmesh, const int nCells, const int* array){
13341279
checkMPMeshValid(p_mpmesh);
13351280
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;

src/pmpo_c.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,6 @@ void polympo_setReconstructionOfStrainRate_f(MPMesh_ptr p_mpmesh, const int orde
113113
void polympo_setReconstructionOfStress_f(MPMesh_ptr p_mpmesh, const int order, const int meshEntType);
114114
void polympo_applyReconstruction_f(MPMesh_ptr p_mpmesh);
115115

116-
//Reconstruction using MPAS
117-
void polympo_vtxSubAssemblyIceArea_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int comp, double* array);
118-
void polympo_vtxSubAssemblyVelocity_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int comp, double* array);
119-
void polympo_subAssemblyCoeffs_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, double* m11, double* m12, double* m13, double* m14,
120-
double* m22, double* m23, double* m24,
121-
double* m33, double* m34,
122-
double* m44);
123-
void polympo_regularize_and_solve_matrix_f(MPMesh_ptr p_mpmesh, int nVetices, double* m11, double* m12, double* m13, double* m14,
124-
double* m22, double* m23, double* m24,
125-
double* m33, double* m34,
126-
double* m44);
127-
128-
//Method 1
129-
void polympo_fullAssemblyIceArea_f(MPMesh_ptr p_mpmesh, int vtxPerElm, int nCells, int nVerticesSolve, int nVertices,
130-
double* array_sub, double* array_full);
131-
132116
void polympo_reconstruct_coeff_with_MPI_f(MPMesh_ptr p_mpmesh);
133117
void polympo_reconstruct_iceArea_with_MPI_f(MPMesh_ptr p_mpmesh);
134118
void polympo_reconstruct_velocity_with_MPI_f(MPMesh_ptr p_mpmesh);

src/pmpo_fortran.f90

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -925,47 +925,6 @@ subroutine polympo_setReconstructionOfStress(mpMesh, order, meshEntType) &
925925
integer(c_int), value :: order, meshEntType
926926
end subroutine
927927

928-
929-
subroutine polympo_vtxSubAssemblyIceArea(mpMesh, vtxPerElm, nCells, comp, array) &
930-
bind(C, NAME='polympo_vtxSubAssemblyIceArea_f')
931-
use :: iso_c_binding
932-
type(c_ptr), value :: mpMesh
933-
integer(c_int), value :: vtxPerElm, nCells, comp
934-
type(c_ptr), value :: array
935-
end subroutine
936-
937-
subroutine polympo_vtxSubAssemblyVelocity(mpMesh, vtxPerElm, nCells, comp, array) &
938-
bind(C, NAME='polympo_vtxSubAssemblyVelocity_f')
939-
use :: iso_c_binding
940-
type(c_ptr), value :: mpMesh
941-
integer(c_int), value :: vtxPerElm, nCells, comp
942-
type(c_ptr), value :: array
943-
end subroutine
944-
945-
subroutine polympo_subAssemblyCoeffs(mpMesh, vtxPerElm, nCells, m11, m12, m13, m14, m22, m23, m24, m33, m34, m44) &
946-
bind(C, NAME='polympo_subAssemblyCoeffs_f')
947-
use :: iso_c_binding
948-
type(c_ptr), value :: mpMesh
949-
integer(c_int), value :: vtxPerElm, nCells
950-
type(c_ptr), value :: m11, m12, m13, m14, m22, m23, m24, m33, m34, m44
951-
end subroutine
952-
953-
subroutine polympo_regularize_and_solve_matrix(mpMesh, nVertices, m11, m12, m13, m14, m22, m23, m24, m33, m34, m44) &
954-
bind(C, NAME='polympo_regularize_and_solve_matrix_f')
955-
use :: iso_c_binding
956-
type(c_ptr), value :: mpMesh
957-
integer(c_int), value :: nVertices
958-
type(c_ptr), value :: m11, m12, m13, m14, m22, m23, m24, m33, m34, m44
959-
end subroutine
960-
961-
subroutine polympo_fullAssemblyIceArea(mpMesh, vtxPerElm, nCells, nVerticesSolve, nVertices, array_sub, array_full) &
962-
bind(C, NAME='polympo_fullAssemblyIceArea_f')
963-
use :: iso_c_binding
964-
type(c_ptr), value :: mpMesh
965-
integer(c_int), value :: vtxPerElm, nCells, nVerticesSolve, nVertices
966-
type(c_ptr), value :: array_sub, array_full
967-
end subroutine
968-
969928
subroutine polympo_reconstruct_coeff_with_MPI(mpMesh) &
970929
bind(C, NAME='polympo_reconstruct_coeff_with_MPI_f')
971930
use :: iso_c_binding
@@ -984,7 +943,6 @@ subroutine polympo_reconstruct_velocity_with_MPI(mpMesh) &
984943
type(c_ptr), value :: mpMesh
985944
end subroutine
986945

987-
988946
!---------------------------------------------------------------------------
989947
!> @brief directly call the reconstruct of the MP fields to mesh fields
990948
!> @param mpmesh(in/out) MPMesh object

0 commit comments

Comments
 (0)