Skip to content

Commit

Permalink
Changed to using a new host-side stiffness matrix rather than re-usin…
Browse files Browse the repository at this point in the history
…g original when importing from mat file.
  • Loading branch information
GPayne committed Aug 24, 2015
1 parent 9c62cd4 commit 1339a83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/examples/example3.cu
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,15 @@ int main(int argc, char** argv)
if( importRhsVectorFromFile(bFilename, &test, b_h, verbose) < 0 )
return 0;

Matrix_ell_h A_h_imported;
//Import stiffness matrix (A)
if( importStiffnessMatrixFromFile(aFilename, &A_h, verbose) < 0 )
if( importStiffnessMatrixFromFile(aFilename, &A_h_imported, verbose) < 0 )
return 0;

if( verbose )
std::cout << "Calling setup_solver." << std::endl;
//The final call to the solver
setup_solver(cfg, tetmeshPtr, &A_h, &x_h, &b_h, verbose);
setup_solver(cfg, tetmeshPtr, &A_h_imported, &x_h, &b_h, verbose);
//At this point, you can do what you need with the matrices.
if (writeMatlabArray("output.mat", x_h)) {
std::cerr << "failed to write matlab file." << std::endl;
Expand Down

0 comments on commit 1339a83

Please sign in to comment.