Debian Codegraph @

dune/istl/test/bcrsassigntest.cc

raw
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
4 #include <dune/istl/bcrsmatrix.hh>
5
6 using namespace Dune;
7
8 int main (int argc, char** argv)
9 {
10 typedef BCRSMatrix<FieldMatrix<double,2,2> > Mat;
11
12 Mat A(1,1, Mat::random);
13
14 A.setrowsize(0,1);
15
16 A.endrowsizes();
17
18 A.addindex(0, 0);
19
20 A.endindices();
21 A = 0;
22
23 Mat B(2,2, Mat::random);
24
25 B.setrowsize(0,2);
26 B.setrowsize(1,1);
27
28 B.endrowsizes();
29
30 B.addindex(0, 0);
31 B.addindex(0, 1);
32
33 B.addindex(1, 1);
34
35 B.endindices();
36 B = 0;
37
38 B = A;
39
40 return 0;
41 }