61 for (
const auto i :
make_range(beginning_index, end_index))
62 for (
const auto j :
make_range(beginning_index, end_index))
64 const Real sgn = j % 2 ? 1 : -1;
66 gold_values[i - beginning_index] += j;
71 for (
const auto i :
make_range(beginning_index, end_index))
72 for (
const auto j :
make_range(beginning_index, end_index))
77 LIBMESH_ASSERT_NUMBERS_EQUAL(gold_values[i - beginning_index], (*
_matrix)(i, i),
_tolerance);
81 for (
const auto i :
make_range(beginning_index, end_index))
83 const Real sgn = i % 2 ? 1 : -1;
84 _matrix->set(i, i, sgn * gold_values[i - beginning_index]);
89 for (
const auto i :
make_range(beginning_index, end_index))
90 LIBMESH_ASSERT_NUMBERS_EQUAL(gold_values[i - beginning_index], (*
_matrix)(i, i),
_tolerance);
95 CPPUNIT_ASSERT_EQUAL(copy->m(),
_matrix->m());
96 CPPUNIT_ASSERT_EQUAL(copy->n(),
_matrix->n());
97 CPPUNIT_ASSERT_EQUAL(copy->local_m(),
_matrix->local_m());
98 CPPUNIT_ASSERT_EQUAL(copy->row_start(),
_matrix->row_start());
99 CPPUNIT_ASSERT_EQUAL(copy->row_stop(),
_matrix->row_stop());
101 for (
const auto i :
make_range(beginning_index, end_index))
102 for (
const auto j :
make_range(beginning_index, end_index))
106 auto zero_copy =
_matrix->zero_clone();
108 CPPUNIT_ASSERT_EQUAL(zero_copy->m(),
_matrix->m());
109 CPPUNIT_ASSERT_EQUAL(zero_copy->n(),
_matrix->n());
110 CPPUNIT_ASSERT_EQUAL(zero_copy->local_m(),
_matrix->local_m());
111 CPPUNIT_ASSERT_EQUAL(zero_copy->row_start(),
_matrix->row_start());
112 CPPUNIT_ASSERT_EQUAL(zero_copy->row_stop(),
_matrix->row_stop());
114 for (
const auto i :
make_range(beginning_index, end_index))
115 for (
const auto j :
make_range(beginning_index, end_index))
116 LIBMESH_ASSERT_NUMBERS_EQUAL(0, (*zero_copy)(i, j),
_tolerance);
numeric_index_type _local_size
dof_id_type numeric_index_type
std::unique_ptr< LumpedMassMatrix< Number > > _matrix
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...