Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreMarchand20 committed Jan 29, 2024
1 parent 0720c62 commit 731a2fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/htool/basic_types/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ class Matrix {
the number of columns is set to _nbc_.
*/
void resize(const int nbr, const int nbc, T value = 0) {
if (m_is_owning_data) {
if (m_data != nullptr and m_is_owning_data) {
delete[] m_data;
m_data = nullptr;

Check warning on line 214 in include/htool/basic_types/matrix.hpp

View check run for this annotation

Codecov / codecov/patch

include/htool/basic_types/matrix.hpp#L213-L214

Added lines #L213 - L214 were not covered by tests
}
m_data = new T[nbr * nbc];
m_number_of_rows = nbr;
Expand Down
2 changes: 1 addition & 1 deletion include/htool/solvers/ddm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class DDM {
mytime[1] = MPI_Wtime() - time;

time = MPI_Wtime();
hpddm_op->buildTwo(MPI_COMM_WORLD, coarse_operator.release());
hpddm_op->buildTwo(MPI_COMM_WORLD, coarse_operator.data());
mytime[2] = MPI_Wtime() - time;

// Timing
Expand Down

0 comments on commit 731a2fa

Please sign in to comment.