Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
lebuller committed Jan 16, 2024
1 parent 8d9a2df commit be1eca6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions grid/src/Cabana_Grid_HypreSemiStructuredSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,23 +328,16 @@ class HypreSemiStructuredSolver
error = HYPRE_SStructGraphAssemble( _graph );
checkHypreError( error );

// Create the matrix.
// Create the matrix. must be done after graph is assembled
error = HYPRE_SStructMatrixCreate( _comm, _graph, &_A );
checkHypreError( error );

// Set the SStruct matrix object type
error = HYPRE_SStructMatrixSetObjectType( _A, object_type );
checkHypreError( error );
}

/*!
\brief Prepare the hypre matrix to have it's values set
*/
void initializeHypreMatrix()
{
// Initialize the matrix.
auto error = HYPRE_SStructMatrixInitialize( _A );
checkHypreError( error );
// Prepare the matrix for setting values
error = HYPRE_SStructMatrixInitialize( _A ) checkHypreError( error );
}

/*!
Expand Down
2 changes: 1 addition & 1 deletion grid/src/Cabana_Grid_HypreStructuredSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class HypreStructuredSolver
checkHypreError( error );
}

// Create the matrix.
// Create the matrix object. Must be done after the stencil is setup
error = HYPRE_StructMatrixCreate( _comm, _grid, _stencil, &_A );
checkHypreError( error );
error = HYPRE_StructMatrixSetSymmetric( _A, is_symmetric );
Expand Down

0 comments on commit be1eca6

Please sign in to comment.