Skip to content

Commit

Permalink
Small bugfix from PR #263 (#265)
Browse files Browse the repository at this point in the history
Compiling the most recent version of master on my computer gave the
following error, introduced in PR #263:

![image](https://github.com/user-attachments/assets/5188f7c1-baae-40d6-b531-72a54ca78c95)

I removed the semicolons and can confirm that the code builds in both
release and debug mode.
  • Loading branch information
cpethrick authored Aug 27, 2024
1 parent a5b077d commit fad742c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/linear_solver/NNLS_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ bool NNLS_solver::solve(){
}
}

Epetra_CrsMatrix NNLS_solver::allocateMatrixToSingleCore(const Epetra_CrsMatrix &A){
Epetra_CrsMatrix NNLS_solver::allocateMatrixToSingleCore(const Epetra_CrsMatrix &A)
{
// Gather Matrix Information
const int A_rows = A.NumGlobalRows();
const int A_cols = A.NumGlobalCols();
Expand All @@ -373,9 +374,10 @@ Epetra_CrsMatrix NNLS_solver::allocateMatrixToSingleCore(const Epetra_CrsMatrix
A_temp.Import(A, A_importer, Epetra_CombineMode::Insert);
A_temp.FillComplete(single_core_col_A,single_core_row_A);
return A_temp;
};
}

Epetra_Vector NNLS_solver::allocateVectorToSingleCore(const Epetra_Vector &b){
Epetra_Vector NNLS_solver::allocateVectorToSingleCore(const Epetra_Vector &b)
{
// Gather Vector Information
const int rank = Comm_.MyPID();
const int b_size = b.GlobalLength();
Expand All @@ -389,7 +391,7 @@ Epetra_Vector NNLS_solver::allocateVectorToSingleCore(const Epetra_Vector &b){
// Load the data from vector b (Multi core) into b_temp (Single core)
b_temp.Import(b, b_importer, Epetra_CombineMode::Insert);
return b_temp;
};
}

Epetra_Vector NNLS_solver::allocateVectorToMultipleCores(const Epetra_Vector &c)
{
Expand All @@ -404,5 +406,5 @@ Epetra_Vector NNLS_solver::allocateVectorToMultipleCores(const Epetra_Vector &c)
c_temp.Import(c, c_importer, Epetra_CombineMode::Insert);
return c_temp;

};
}
} // PHiLiP namespace

0 comments on commit fad742c

Please sign in to comment.