]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Additional tests for CompressedSimpleSparsityPattern.
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Sep 2008 14:32:32 +0000 (14:32 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 3 Sep 2008 14:32:32 +0000 (14:32 +0000)
git-svn-id: https://svn.dealii.org/trunk@16734 0785d39b-7218-0410-832d-ea1e28bc413d

22 files changed:
tests/lac/Makefile
tests/lac/chunk_sparsity_pattern_07.cc
tests/lac/chunk_sparsity_pattern_08.cc
tests/lac/compressed_simple_sparsity_pattern_01.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_01/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_02.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_02/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_03.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_03/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_04.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_04/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_05.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_05/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_10.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_10/cmp/generic [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_11.cc [new file with mode: 0644]
tests/lac/compressed_simple_sparsity_pattern_11/cmp/generic [new file with mode: 0644]
tests/lac/sparsity_pattern_07.cc
tests/lac/sparsity_pattern_08.cc
tests/lac/sparsity_pattern_12.cc [new file with mode: 0644]
tests/lac/sparsity_pattern_12/cmp/generic [new file with mode: 0644]
tests/lac/sparsity_pattern_common.h

index a583cc33b53566c1b68902197c30c2ffefba3148..809a1c0cb59df3e483cac8e87c023088199a3dae 100644 (file)
@@ -29,6 +29,7 @@ tests_x = vector-vector vector_memory \
        sparsity_pattern_* \
        chunk_sparsity_pattern_* \
        compressed_sparsity_pattern_* \
+       compressed_simple_sparsity_pattern_* \
        compressed_set_sparsity_pattern_* \
        sparse_matrices matrices \
        block_sparsity_pattern_01 \
index c71b9346f51e2fdeead58d18e0108f143697983e..60d3d6bc762e3d579966ed4789d4c0d39557cfdc 100644 (file)
@@ -29,7 +29,7 @@ int main ()
   for (unsigned int i=0; i<sizeof(chunk_sizes)/sizeof(chunk_sizes[0]); ++i)
     {
       chunk_size = chunk_sizes[i];
-      copy_from_2<ChunkSparsityPattern> ();
+      copy_from_2<ChunkSparsityPattern, CompressedSparsityPattern> ();
     }
 }
 
index 561c095a30020d41ac29283f10305a19e2a630d6..65351c972314d4b7ab7eabba60233ce43f5d4157 100644 (file)
@@ -29,7 +29,7 @@ int main ()
   for (unsigned int i=0; i<sizeof(chunk_sizes)/sizeof(chunk_sizes[0]); ++i)
     {
       chunk_size = chunk_sizes[i];
-      copy_from_3<ChunkSparsityPattern> ();
+      copy_from_2<ChunkSparsityPattern, CompressedSetSparsityPattern> ();
     }
 }
 
diff --git a/tests/lac/compressed_simple_sparsity_pattern_01.cc b/tests/lac/compressed_simple_sparsity_pattern_01.cc
new file mode 100644 (file)
index 0000000..06bb6c5
--- /dev/null
@@ -0,0 +1,32 @@
+//--------------------------  compressed_simple_sparsity_pattern_01.cc  ----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//--------------------------  compressed_simple_sparsity_pattern_01.cc  ----------------------
+
+
+// check CompressedSimpleSparsityPattern::row_length
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_01/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  row_length<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_01/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_01/cmp/generic
new file mode 100644 (file)
index 0000000..57a525d
--- /dev/null
@@ -0,0 +1,199 @@
+
+DEAL::196 196 14 924
+DEAL::3
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::3
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::4
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::5
+DEAL::4
+DEAL::3
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::4
+DEAL::3
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_02.cc b/tests/lac/compressed_simple_sparsity_pattern_02.cc
new file mode 100644 (file)
index 0000000..b7629c2
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_02.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_02.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::print_gnuplot
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_02/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  print_gnuplot<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_02/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_02/cmp/generic
new file mode 100644 (file)
index 0000000..f5212b6
--- /dev/null
@@ -0,0 +1,927 @@
+
+DEAL::196 196 14 924
+0 0
+1 0
+14 0
+0 -1
+1 -1
+2 -1
+15 -1
+1 -2
+2 -2
+3 -2
+16 -2
+2 -3
+3 -3
+4 -3
+17 -3
+3 -4
+4 -4
+5 -4
+18 -4
+4 -5
+5 -5
+6 -5
+19 -5
+5 -6
+6 -6
+7 -6
+20 -6
+6 -7
+7 -7
+8 -7
+21 -7
+7 -8
+8 -8
+9 -8
+22 -8
+8 -9
+9 -9
+10 -9
+23 -9
+9 -10
+10 -10
+11 -10
+24 -10
+10 -11
+11 -11
+12 -11
+25 -11
+11 -12
+12 -12
+13 -12
+26 -12
+12 -13
+13 -13
+27 -13
+0 -14
+14 -14
+15 -14
+28 -14
+1 -15
+14 -15
+15 -15
+16 -15
+29 -15
+2 -16
+15 -16
+16 -16
+17 -16
+30 -16
+3 -17
+16 -17
+17 -17
+18 -17
+31 -17
+4 -18
+17 -18
+18 -18
+19 -18
+32 -18
+5 -19
+18 -19
+19 -19
+20 -19
+33 -19
+6 -20
+19 -20
+20 -20
+21 -20
+34 -20
+7 -21
+20 -21
+21 -21
+22 -21
+35 -21
+8 -22
+21 -22
+22 -22
+23 -22
+36 -22
+9 -23
+22 -23
+23 -23
+24 -23
+37 -23
+10 -24
+23 -24
+24 -24
+25 -24
+38 -24
+11 -25
+24 -25
+25 -25
+26 -25
+39 -25
+12 -26
+25 -26
+26 -26
+27 -26
+40 -26
+13 -27
+26 -27
+27 -27
+41 -27
+14 -28
+28 -28
+29 -28
+42 -28
+15 -29
+28 -29
+29 -29
+30 -29
+43 -29
+16 -30
+29 -30
+30 -30
+31 -30
+44 -30
+17 -31
+30 -31
+31 -31
+32 -31
+45 -31
+18 -32
+31 -32
+32 -32
+33 -32
+46 -32
+19 -33
+32 -33
+33 -33
+34 -33
+47 -33
+20 -34
+33 -34
+34 -34
+35 -34
+48 -34
+21 -35
+34 -35
+35 -35
+36 -35
+49 -35
+22 -36
+35 -36
+36 -36
+37 -36
+50 -36
+23 -37
+36 -37
+37 -37
+38 -37
+51 -37
+24 -38
+37 -38
+38 -38
+39 -38
+52 -38
+25 -39
+38 -39
+39 -39
+40 -39
+53 -39
+26 -40
+39 -40
+40 -40
+41 -40
+54 -40
+27 -41
+40 -41
+41 -41
+55 -41
+28 -42
+42 -42
+43 -42
+56 -42
+29 -43
+42 -43
+43 -43
+44 -43
+57 -43
+30 -44
+43 -44
+44 -44
+45 -44
+58 -44
+31 -45
+44 -45
+45 -45
+46 -45
+59 -45
+32 -46
+45 -46
+46 -46
+47 -46
+60 -46
+33 -47
+46 -47
+47 -47
+48 -47
+61 -47
+34 -48
+47 -48
+48 -48
+49 -48
+62 -48
+35 -49
+48 -49
+49 -49
+50 -49
+63 -49
+36 -50
+49 -50
+50 -50
+51 -50
+64 -50
+37 -51
+50 -51
+51 -51
+52 -51
+65 -51
+38 -52
+51 -52
+52 -52
+53 -52
+66 -52
+39 -53
+52 -53
+53 -53
+54 -53
+67 -53
+40 -54
+53 -54
+54 -54
+55 -54
+68 -54
+41 -55
+54 -55
+55 -55
+69 -55
+42 -56
+56 -56
+57 -56
+70 -56
+43 -57
+56 -57
+57 -57
+58 -57
+71 -57
+44 -58
+57 -58
+58 -58
+59 -58
+72 -58
+45 -59
+58 -59
+59 -59
+60 -59
+73 -59
+46 -60
+59 -60
+60 -60
+61 -60
+74 -60
+47 -61
+60 -61
+61 -61
+62 -61
+75 -61
+48 -62
+61 -62
+62 -62
+63 -62
+76 -62
+49 -63
+62 -63
+63 -63
+64 -63
+77 -63
+50 -64
+63 -64
+64 -64
+65 -64
+78 -64
+51 -65
+64 -65
+65 -65
+66 -65
+79 -65
+52 -66
+65 -66
+66 -66
+67 -66
+80 -66
+53 -67
+66 -67
+67 -67
+68 -67
+81 -67
+54 -68
+67 -68
+68 -68
+69 -68
+82 -68
+55 -69
+68 -69
+69 -69
+83 -69
+56 -70
+70 -70
+71 -70
+84 -70
+57 -71
+70 -71
+71 -71
+72 -71
+85 -71
+58 -72
+71 -72
+72 -72
+73 -72
+86 -72
+59 -73
+72 -73
+73 -73
+74 -73
+87 -73
+60 -74
+73 -74
+74 -74
+75 -74
+88 -74
+61 -75
+74 -75
+75 -75
+76 -75
+89 -75
+62 -76
+75 -76
+76 -76
+77 -76
+90 -76
+63 -77
+76 -77
+77 -77
+78 -77
+91 -77
+64 -78
+77 -78
+78 -78
+79 -78
+92 -78
+65 -79
+78 -79
+79 -79
+80 -79
+93 -79
+66 -80
+79 -80
+80 -80
+81 -80
+94 -80
+67 -81
+80 -81
+81 -81
+82 -81
+95 -81
+68 -82
+81 -82
+82 -82
+83 -82
+96 -82
+69 -83
+82 -83
+83 -83
+97 -83
+70 -84
+84 -84
+85 -84
+98 -84
+71 -85
+84 -85
+85 -85
+86 -85
+99 -85
+72 -86
+85 -86
+86 -86
+87 -86
+100 -86
+73 -87
+86 -87
+87 -87
+88 -87
+101 -87
+74 -88
+87 -88
+88 -88
+89 -88
+102 -88
+75 -89
+88 -89
+89 -89
+90 -89
+103 -89
+76 -90
+89 -90
+90 -90
+91 -90
+104 -90
+77 -91
+90 -91
+91 -91
+92 -91
+105 -91
+78 -92
+91 -92
+92 -92
+93 -92
+106 -92
+79 -93
+92 -93
+93 -93
+94 -93
+107 -93
+80 -94
+93 -94
+94 -94
+95 -94
+108 -94
+81 -95
+94 -95
+95 -95
+96 -95
+109 -95
+82 -96
+95 -96
+96 -96
+97 -96
+110 -96
+83 -97
+96 -97
+97 -97
+111 -97
+84 -98
+98 -98
+99 -98
+112 -98
+85 -99
+98 -99
+99 -99
+100 -99
+113 -99
+86 -100
+99 -100
+100 -100
+101 -100
+114 -100
+87 -101
+100 -101
+101 -101
+102 -101
+115 -101
+88 -102
+101 -102
+102 -102
+103 -102
+116 -102
+89 -103
+102 -103
+103 -103
+104 -103
+117 -103
+90 -104
+103 -104
+104 -104
+105 -104
+118 -104
+91 -105
+104 -105
+105 -105
+106 -105
+119 -105
+92 -106
+105 -106
+106 -106
+107 -106
+120 -106
+93 -107
+106 -107
+107 -107
+108 -107
+121 -107
+94 -108
+107 -108
+108 -108
+109 -108
+122 -108
+95 -109
+108 -109
+109 -109
+110 -109
+123 -109
+96 -110
+109 -110
+110 -110
+111 -110
+124 -110
+97 -111
+110 -111
+111 -111
+125 -111
+98 -112
+112 -112
+113 -112
+126 -112
+99 -113
+112 -113
+113 -113
+114 -113
+127 -113
+100 -114
+113 -114
+114 -114
+115 -114
+128 -114
+101 -115
+114 -115
+115 -115
+116 -115
+129 -115
+102 -116
+115 -116
+116 -116
+117 -116
+130 -116
+103 -117
+116 -117
+117 -117
+118 -117
+131 -117
+104 -118
+117 -118
+118 -118
+119 -118
+132 -118
+105 -119
+118 -119
+119 -119
+120 -119
+133 -119
+106 -120
+119 -120
+120 -120
+121 -120
+134 -120
+107 -121
+120 -121
+121 -121
+122 -121
+135 -121
+108 -122
+121 -122
+122 -122
+123 -122
+136 -122
+109 -123
+122 -123
+123 -123
+124 -123
+137 -123
+110 -124
+123 -124
+124 -124
+125 -124
+138 -124
+111 -125
+124 -125
+125 -125
+139 -125
+112 -126
+126 -126
+127 -126
+140 -126
+113 -127
+126 -127
+127 -127
+128 -127
+141 -127
+114 -128
+127 -128
+128 -128
+129 -128
+142 -128
+115 -129
+128 -129
+129 -129
+130 -129
+143 -129
+116 -130
+129 -130
+130 -130
+131 -130
+144 -130
+117 -131
+130 -131
+131 -131
+132 -131
+145 -131
+118 -132
+131 -132
+132 -132
+133 -132
+146 -132
+119 -133
+132 -133
+133 -133
+134 -133
+147 -133
+120 -134
+133 -134
+134 -134
+135 -134
+148 -134
+121 -135
+134 -135
+135 -135
+136 -135
+149 -135
+122 -136
+135 -136
+136 -136
+137 -136
+150 -136
+123 -137
+136 -137
+137 -137
+138 -137
+151 -137
+124 -138
+137 -138
+138 -138
+139 -138
+152 -138
+125 -139
+138 -139
+139 -139
+153 -139
+126 -140
+140 -140
+141 -140
+154 -140
+127 -141
+140 -141
+141 -141
+142 -141
+155 -141
+128 -142
+141 -142
+142 -142
+143 -142
+156 -142
+129 -143
+142 -143
+143 -143
+144 -143
+157 -143
+130 -144
+143 -144
+144 -144
+145 -144
+158 -144
+131 -145
+144 -145
+145 -145
+146 -145
+159 -145
+132 -146
+145 -146
+146 -146
+147 -146
+160 -146
+133 -147
+146 -147
+147 -147
+148 -147
+161 -147
+134 -148
+147 -148
+148 -148
+149 -148
+162 -148
+135 -149
+148 -149
+149 -149
+150 -149
+163 -149
+136 -150
+149 -150
+150 -150
+151 -150
+164 -150
+137 -151
+150 -151
+151 -151
+152 -151
+165 -151
+138 -152
+151 -152
+152 -152
+153 -152
+166 -152
+139 -153
+152 -153
+153 -153
+167 -153
+140 -154
+154 -154
+155 -154
+168 -154
+141 -155
+154 -155
+155 -155
+156 -155
+169 -155
+142 -156
+155 -156
+156 -156
+157 -156
+170 -156
+143 -157
+156 -157
+157 -157
+158 -157
+171 -157
+144 -158
+157 -158
+158 -158
+159 -158
+172 -158
+145 -159
+158 -159
+159 -159
+160 -159
+173 -159
+146 -160
+159 -160
+160 -160
+161 -160
+174 -160
+147 -161
+160 -161
+161 -161
+162 -161
+175 -161
+148 -162
+161 -162
+162 -162
+163 -162
+176 -162
+149 -163
+162 -163
+163 -163
+164 -163
+177 -163
+150 -164
+163 -164
+164 -164
+165 -164
+178 -164
+151 -165
+164 -165
+165 -165
+166 -165
+179 -165
+152 -166
+165 -166
+166 -166
+167 -166
+180 -166
+153 -167
+166 -167
+167 -167
+181 -167
+154 -168
+168 -168
+169 -168
+182 -168
+155 -169
+168 -169
+169 -169
+170 -169
+183 -169
+156 -170
+169 -170
+170 -170
+171 -170
+184 -170
+157 -171
+170 -171
+171 -171
+172 -171
+185 -171
+158 -172
+171 -172
+172 -172
+173 -172
+186 -172
+159 -173
+172 -173
+173 -173
+174 -173
+187 -173
+160 -174
+173 -174
+174 -174
+175 -174
+188 -174
+161 -175
+174 -175
+175 -175
+176 -175
+189 -175
+162 -176
+175 -176
+176 -176
+177 -176
+190 -176
+163 -177
+176 -177
+177 -177
+178 -177
+191 -177
+164 -178
+177 -178
+178 -178
+179 -178
+192 -178
+165 -179
+178 -179
+179 -179
+180 -179
+193 -179
+166 -180
+179 -180
+180 -180
+181 -180
+194 -180
+167 -181
+180 -181
+181 -181
+195 -181
+168 -182
+182 -182
+183 -182
+169 -183
+182 -183
+183 -183
+184 -183
+170 -184
+183 -184
+184 -184
+185 -184
+171 -185
+184 -185
+185 -185
+186 -185
+172 -186
+185 -186
+186 -186
+187 -186
+173 -187
+186 -187
+187 -187
+188 -187
+174 -188
+187 -188
+188 -188
+189 -188
+175 -189
+188 -189
+189 -189
+190 -189
+176 -190
+189 -190
+190 -190
+191 -190
+177 -191
+190 -191
+191 -191
+192 -191
+178 -192
+191 -192
+192 -192
+193 -192
+179 -193
+192 -193
+193 -193
+194 -193
+180 -194
+193 -194
+194 -194
+195 -194
+181 -195
+194 -195
+195 -195
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_03.cc b/tests/lac/compressed_simple_sparsity_pattern_03.cc
new file mode 100644 (file)
index 0000000..2b5ec03
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_03.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_03.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::print
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_03/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  print<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_03/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_03/cmp/generic
new file mode 100644 (file)
index 0000000..2d9e13c
--- /dev/null
@@ -0,0 +1,199 @@
+
+DEAL::196 196 14 924
+[0,0,1,14]
+[1,0,1,2,15]
+[2,1,2,3,16]
+[3,2,3,4,17]
+[4,3,4,5,18]
+[5,4,5,6,19]
+[6,5,6,7,20]
+[7,6,7,8,21]
+[8,7,8,9,22]
+[9,8,9,10,23]
+[10,9,10,11,24]
+[11,10,11,12,25]
+[12,11,12,13,26]
+[13,12,13,27]
+[14,0,14,15,28]
+[15,1,14,15,16,29]
+[16,2,15,16,17,30]
+[17,3,16,17,18,31]
+[18,4,17,18,19,32]
+[19,5,18,19,20,33]
+[20,6,19,20,21,34]
+[21,7,20,21,22,35]
+[22,8,21,22,23,36]
+[23,9,22,23,24,37]
+[24,10,23,24,25,38]
+[25,11,24,25,26,39]
+[26,12,25,26,27,40]
+[27,13,26,27,41]
+[28,14,28,29,42]
+[29,15,28,29,30,43]
+[30,16,29,30,31,44]
+[31,17,30,31,32,45]
+[32,18,31,32,33,46]
+[33,19,32,33,34,47]
+[34,20,33,34,35,48]
+[35,21,34,35,36,49]
+[36,22,35,36,37,50]
+[37,23,36,37,38,51]
+[38,24,37,38,39,52]
+[39,25,38,39,40,53]
+[40,26,39,40,41,54]
+[41,27,40,41,55]
+[42,28,42,43,56]
+[43,29,42,43,44,57]
+[44,30,43,44,45,58]
+[45,31,44,45,46,59]
+[46,32,45,46,47,60]
+[47,33,46,47,48,61]
+[48,34,47,48,49,62]
+[49,35,48,49,50,63]
+[50,36,49,50,51,64]
+[51,37,50,51,52,65]
+[52,38,51,52,53,66]
+[53,39,52,53,54,67]
+[54,40,53,54,55,68]
+[55,41,54,55,69]
+[56,42,56,57,70]
+[57,43,56,57,58,71]
+[58,44,57,58,59,72]
+[59,45,58,59,60,73]
+[60,46,59,60,61,74]
+[61,47,60,61,62,75]
+[62,48,61,62,63,76]
+[63,49,62,63,64,77]
+[64,50,63,64,65,78]
+[65,51,64,65,66,79]
+[66,52,65,66,67,80]
+[67,53,66,67,68,81]
+[68,54,67,68,69,82]
+[69,55,68,69,83]
+[70,56,70,71,84]
+[71,57,70,71,72,85]
+[72,58,71,72,73,86]
+[73,59,72,73,74,87]
+[74,60,73,74,75,88]
+[75,61,74,75,76,89]
+[76,62,75,76,77,90]
+[77,63,76,77,78,91]
+[78,64,77,78,79,92]
+[79,65,78,79,80,93]
+[80,66,79,80,81,94]
+[81,67,80,81,82,95]
+[82,68,81,82,83,96]
+[83,69,82,83,97]
+[84,70,84,85,98]
+[85,71,84,85,86,99]
+[86,72,85,86,87,100]
+[87,73,86,87,88,101]
+[88,74,87,88,89,102]
+[89,75,88,89,90,103]
+[90,76,89,90,91,104]
+[91,77,90,91,92,105]
+[92,78,91,92,93,106]
+[93,79,92,93,94,107]
+[94,80,93,94,95,108]
+[95,81,94,95,96,109]
+[96,82,95,96,97,110]
+[97,83,96,97,111]
+[98,84,98,99,112]
+[99,85,98,99,100,113]
+[100,86,99,100,101,114]
+[101,87,100,101,102,115]
+[102,88,101,102,103,116]
+[103,89,102,103,104,117]
+[104,90,103,104,105,118]
+[105,91,104,105,106,119]
+[106,92,105,106,107,120]
+[107,93,106,107,108,121]
+[108,94,107,108,109,122]
+[109,95,108,109,110,123]
+[110,96,109,110,111,124]
+[111,97,110,111,125]
+[112,98,112,113,126]
+[113,99,112,113,114,127]
+[114,100,113,114,115,128]
+[115,101,114,115,116,129]
+[116,102,115,116,117,130]
+[117,103,116,117,118,131]
+[118,104,117,118,119,132]
+[119,105,118,119,120,133]
+[120,106,119,120,121,134]
+[121,107,120,121,122,135]
+[122,108,121,122,123,136]
+[123,109,122,123,124,137]
+[124,110,123,124,125,138]
+[125,111,124,125,139]
+[126,112,126,127,140]
+[127,113,126,127,128,141]
+[128,114,127,128,129,142]
+[129,115,128,129,130,143]
+[130,116,129,130,131,144]
+[131,117,130,131,132,145]
+[132,118,131,132,133,146]
+[133,119,132,133,134,147]
+[134,120,133,134,135,148]
+[135,121,134,135,136,149]
+[136,122,135,136,137,150]
+[137,123,136,137,138,151]
+[138,124,137,138,139,152]
+[139,125,138,139,153]
+[140,126,140,141,154]
+[141,127,140,141,142,155]
+[142,128,141,142,143,156]
+[143,129,142,143,144,157]
+[144,130,143,144,145,158]
+[145,131,144,145,146,159]
+[146,132,145,146,147,160]
+[147,133,146,147,148,161]
+[148,134,147,148,149,162]
+[149,135,148,149,150,163]
+[150,136,149,150,151,164]
+[151,137,150,151,152,165]
+[152,138,151,152,153,166]
+[153,139,152,153,167]
+[154,140,154,155,168]
+[155,141,154,155,156,169]
+[156,142,155,156,157,170]
+[157,143,156,157,158,171]
+[158,144,157,158,159,172]
+[159,145,158,159,160,173]
+[160,146,159,160,161,174]
+[161,147,160,161,162,175]
+[162,148,161,162,163,176]
+[163,149,162,163,164,177]
+[164,150,163,164,165,178]
+[165,151,164,165,166,179]
+[166,152,165,166,167,180]
+[167,153,166,167,181]
+[168,154,168,169,182]
+[169,155,168,169,170,183]
+[170,156,169,170,171,184]
+[171,157,170,171,172,185]
+[172,158,171,172,173,186]
+[173,159,172,173,174,187]
+[174,160,173,174,175,188]
+[175,161,174,175,176,189]
+[176,162,175,176,177,190]
+[177,163,176,177,178,191]
+[178,164,177,178,179,192]
+[179,165,178,179,180,193]
+[180,166,179,180,181,194]
+[181,167,180,181,195]
+[182,168,182,183]
+[183,169,182,183,184]
+[184,170,183,184,185]
+[185,171,184,185,186]
+[186,172,185,186,187]
+[187,173,186,187,188]
+[188,174,187,188,189]
+[189,175,188,189,190]
+[190,176,189,190,191]
+[191,177,190,191,192]
+[192,178,191,192,193]
+[193,179,192,193,194]
+[194,180,193,194,195]
+[195,181,194,195]
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_04.cc b/tests/lac/compressed_simple_sparsity_pattern_04.cc
new file mode 100644 (file)
index 0000000..f208e7f
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_04.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_04.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::copy operator with offdiagonals
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_04/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  copy_with_offdiagonals_1<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_04/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_04/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_05.cc b/tests/lac/compressed_simple_sparsity_pattern_05.cc
new file mode 100644 (file)
index 0000000..5b229d1
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_05.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_05.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::copy constructor with offdiagonals
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_05/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  copy_with_offdiagonals_2<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_05/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_05/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_10.cc b/tests/lac/compressed_simple_sparsity_pattern_10.cc
new file mode 100644 (file)
index 0000000..da4c2da
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_10.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_10.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::matrix_position
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_10/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  matrix_position<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_10/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_10/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/lac/compressed_simple_sparsity_pattern_11.cc b/tests/lac/compressed_simple_sparsity_pattern_11.cc
new file mode 100644 (file)
index 0000000..783dd55
--- /dev/null
@@ -0,0 +1,32 @@
+//-------------------------  compressed_simple_sparsity_pattern_11.cc  -----------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-------------------------  compressed_simple_sparsity_pattern_11.cc  -----------------------
+
+
+// check CompressedSimpleSparsityPattern::block_read/write
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("compressed_simple_sparsity_pattern_11/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  block_read_write<CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/compressed_simple_sparsity_pattern_11/cmp/generic b/tests/lac/compressed_simple_sparsity_pattern_11/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
index 0227592d9aabb25f67eea0d1e751c910a721160d..ff34141ae4b5374941ce22ef16f81beb282fd9f3 100644 (file)
@@ -25,7 +25,7 @@ int main ()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  copy_from_2<SparsityPattern> ();
+  copy_from_2<SparsityPattern, CompressedSparsityPattern> ();
 }
 
   
index e72385f564f123eb65845b3e12b85f941b58e79a..9b1d9281ed7106ad9fc03e0fcd0c42356b0eb3ce 100644 (file)
@@ -25,7 +25,7 @@ int main ()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  copy_from_3<SparsityPattern> ();
+  copy_from_2<SparsityPattern, CompressedSetSparsityPattern> ();
 }
 
   
diff --git a/tests/lac/sparsity_pattern_12.cc b/tests/lac/sparsity_pattern_12.cc
new file mode 100644 (file)
index 0000000..4f69388
--- /dev/null
@@ -0,0 +1,32 @@
+//----------------------------  sparsity_pattern_12.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  sparsity_pattern_12.cc  ---------------------------
+
+
+// check SparsityPattern::copy_from
+
+#include "sparsity_pattern_common.h"
+
+int main ()
+{
+  std::ofstream logfile("sparsity_pattern_12/output");
+  logfile.setf(std::ios::fixed);
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  copy_from_2<SparsityPattern, CompressedSimpleSparsityPattern> ();
+}
+
+
+
diff --git a/tests/lac/sparsity_pattern_12/cmp/generic b/tests/lac/sparsity_pattern_12/cmp/generic
new file mode 100644 (file)
index 0000000..abdb63d
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::196 196 14 924
+DEAL::OK
index ddb9cb159f504fddfaf70966b5f45793aad7e4db..6c14ab7b73c367ff292c06faa6b9f52c2e64abe0 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  sparsity_pattern_01.cc  ---------------------------
+//---------------------------  sparsity_pattern_common.h  -------------------------
 //    $Id: sparsity_pattern_01.cc 15674 2008-01-24 17:40:56Z kanschat $
 //    Version: $Name$ 
 //
@@ -9,7 +9,8 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  sparsity_pattern_01.cc  ---------------------------
+//---------------------------  sparsity_pattern_common.h  -------------------------
+
 
 
 // check
@@ -18,6 +19,7 @@
 #include <base/logstream.h>
 #include <lac/sparsity_pattern.h>
 #include <lac/compressed_sparsity_pattern.h>
+#include <lac/compressed_simple_sparsity_pattern.h>
 #include <lac/compressed_set_sparsity_pattern.h>
 #include <lac/chunk_sparsity_pattern.h>
 #include <lac/full_matrix.h>
@@ -55,6 +57,10 @@ void do_reinit (CompressedSparsityPattern &sp)
   sp.reinit((N-1)*(N-1), (N-1)*(N-1));
 }
 
+void do_reinit (CompressedSimpleSparsityPattern &sp)
+{
+  sp.reinit((N-1)*(N-1), (N-1)*(N-1));
+}
 
 void do_reinit (CompressedSetSparsityPattern &sp)
 {
@@ -166,7 +172,13 @@ void copy_with_offdiagonals_1<CompressedSparsityPattern> ()
   deallog << "OK" << std::endl;
 }
 
-
+template <>
+void copy_with_offdiagonals_1<CompressedSimpleSparsityPattern> ()
+{
+                   // this sparsity pattern doesn't have this
+                   // function
+  deallog << "OK" << std::endl;
+}
 
 template <>
 void copy_with_offdiagonals_1<CompressedSetSparsityPattern> ()
@@ -220,6 +232,16 @@ void copy_with_offdiagonals_2<CompressedSparsityPattern> ()
 
 
 
+template <>
+void copy_with_offdiagonals_2<CompressedSimpleSparsityPattern> ()
+{
+                   // this sparsity pattern doesn't have this
+                   // function
+  deallog << "OK" << std::endl;
+}
+
+
+
 template <>
 void copy_with_offdiagonals_2<CompressedSetSparsityPattern> ()
 {
@@ -270,6 +292,26 @@ do_copy_from (const CompressedSparsityPattern &sparsity,
 }
 
 
+template <typename SP>
+void
+do_copy_from (const CompressedSimpleSparsityPattern &sparsity,
+          SP &sp4)
+{
+  std::list<std::set<unsigned int,std::greater<unsigned int> > > sparsity_x;
+  for (unsigned int i=0; i<sparsity.n_rows(); ++i)
+    {
+      sparsity_x.push_back
+    (std::set<unsigned int,std::greater<unsigned int> >());
+
+      for (unsigned int j=0; j<sparsity.n_cols(); ++j)
+    if (sparsity.exists(i,j))
+      sparsity_x.back().insert (j);
+    }
+
+  do_copy_from (sparsity_x, sp4);
+}
+
+
 template <typename SP>
 void
 do_copy_from (const CompressedSetSparsityPattern &sparsity,
@@ -363,46 +405,10 @@ void copy_from_1 ()
 
 
 
-template <typename SP>
+template <typename SP, typename CSP>
 void copy_from_2 ()
 {
-  CompressedSparsityPattern sparsity_pattern;
-  build_sparsity (sparsity_pattern);
-
-  SP sp4;
-  do_copy_from (sparsity_pattern, sp4);
-
-                                  // now check for equivalence of original
-                                  // and copy if both only store explicitly
-                                  // added elements. otherwise, check that
-                                  // the presence of an element in the source
-                                  // implies an element in the copy
-  if ((sparsity_pattern.stores_only_added_elements() == true)
-      &&
-      (sp4.stores_only_added_elements() == true))
-    Assert (sparsity_pattern.n_nonzero_elements() ==
-           sp4.n_nonzero_elements(),
-           ExcInternalError());
-  for (unsigned int i=0; i<sparsity_pattern.n_rows(); ++i)
-    for (unsigned int j=0; j<sparsity_pattern.n_cols(); ++j)
-      if ((sparsity_pattern.stores_only_added_elements() == true)
-         &&
-         (sp4.stores_only_added_elements() == true))
-       Assert (sparsity_pattern.exists(i,j) == sp4.exists (i,j),
-               ExcInternalError())
-      else
-       if (sparsity_pattern.exists(i,j))
-         Assert (sp4.exists (i,j), ExcInternalError());
-
-  deallog << "OK" << std::endl;
-}
-
-
-
-template <typename SP>
-void copy_from_3 ()
-{
-  CompressedSetSparsityPattern sparsity_pattern;
+  CSP sparsity_pattern;
   build_sparsity (sparsity_pattern);
 
   SP sp4;
@@ -518,6 +524,15 @@ void matrix_position<CompressedSparsityPattern> ()
 
 
 
+template <>
+void matrix_position<CompressedSimpleSparsityPattern> ()
+{
+                   // this class doesn't have that function
+  deallog << "OK" << std::endl;
+}
+
+
+
 template <>
 void matrix_position<CompressedSetSparsityPattern> ()
 {
@@ -571,6 +586,16 @@ void block_read_write<CompressedSparsityPattern> ()
 
 
 
+template <>
+void block_read_write<CompressedSimpleSparsityPattern> ()
+{
+                   // not implemented for this sparsity
+                   // pattern
+  deallog << "OK" << std::endl;
+}
+
+
+
 template <>
 void block_read_write<CompressedSetSparsityPattern> ()
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.