73 {
74 LOG_UNIT_TEST;
75
78
80
82
83
84
85 _matrix->add(beginning_index, beginning_index + 1, 1);
86 _matrix->set(beginning_index + 1, beginning_index, 1);
87
88
89 LIBMESH_ASSERT_NUMBERS_EQUAL(0, (*
_matrix)(beginning_index, beginning_index + 1),
_tolerance);
90 LIBMESH_ASSERT_NUMBERS_EQUAL(0, (*
_matrix)(beginning_index + 1, beginning_index),
_tolerance);
91
92
93 {
96
97
99
100 CPPUNIT_ASSERT(!
_matrix->closed());
101
103 CPPUNIT_ASSERT(
_matrix->closed());
104
106 {
107 if (i)
109 else
111 }
112 }
113
114
115 {
119
122
123 CPPUNIT_ASSERT(!
_matrix->closed());
124
126 CPPUNIT_ASSERT(
_matrix->closed());
127
129 {
132 else
134 }
135 }
136
138 std::iota(rows.begin(), rows.end(), beginning_index);
139
140
141 {
143
146 ++local_index, ++global_index)
147 dense(local_index, local_index) = global_index;
148
150
151
152 _matrix->add_matrix(dense, rows, rows);
153
154
155
157
160
161
163
164 diagonal->init(
_matrix->diagonal());
165
166 _matrix->get_diagonal(*diagonal);
167
168
170
172
173 copy = std::move(*diagonal);
174
175
176 _matrix->add_matrix(dense, rows);
178
181
182
184
187
189
191 LIBMESH_ASSERT_NUMBERS_EQUAL(i, copy(i, i),
_tolerance);
192 }
193
194
195 {
198 }
199
200
201 {
205 {
206 if (i == j)
208 else
210 }
211 }
212 }
Defines a dense matrix for use in Finite Element-type computations.
Diagonal matrix class whose underlying storage is a vector.
static std::unique_ptr< NumericVector< T > > build(const Parallel::Communicator &comm, SolverPackage solver_package=libMesh::default_solver_package(), ParallelType parallel_type=AUTOMATIC)
Builds a NumericVector on the processors in communicator comm using the linear solver package specifi...