// ---------------------------------------------------------------------
-
-// Bug: filtered DataOut is not picking the correct cells
-// This is due to wrong index computation in data_out.cc.
+// this test documents two unrelated bugs in DataOut when used with a Filter (by deriving from DataOut):
+// 1. The patch index computation in data_out.cc is wrong and causes an SIGV (or an Assert after adding that):
/*
466: --------------------------------------------------------
466: An error occurred in line <306> of file </ssd/branch_port_the_testsuite/deal.II/source/numerics/data_out.cc> in function
466: The name and call sequence of the exception was:
466: ExcInternalError()
*/
+// 2. DataOut used begi_active() instead of first_cell() in two places which caused a wrong patch to be generated when the first active cell is not picked by the filter.
#include "../tests.h"
#include <deal.II/lac/vector.h>
// DataOut<dim> data_out;
// we pick only subdomain==0 which will
- // skip the first of four cells
+ // skip the first of the four cells
FilteredDataOut<dim> data_out(0);
data_out.attach_dof_handler (dof_handler);
[Version: 3]
1
cell_data
-4
+3
[deal.II intermediate Patch<2,2>]
-0.0 0.0 0.50 0.0 0.50 0.50 0.0 0.50
-4294967295 1 4294967295 2
+0.50 0.0 1.0 0.0 1.0 0.50 0.50 0.50
+4294967295 4294967295 4294967295 2
0 1
0
1 4
[deal.II intermediate Patch<2,2>]
-0.50 0.0 1.0 0.0 1.0 0.50 0.50 0.50
-0 4294967295 4294967295 3
+0.0 0.50 0.50 0.50 0.50 1.0 0.0 1.0
+4294967295 2 4294967295 4294967295
1 1
0
1 4
[deal.II intermediate Patch<2,2>]
-0.0 0.50 0.50 0.50 0.50 1.0 0.0 1.0
-4294967295 3 0 4294967295
+0.50 0.50 1.0 0.50 1.0 1.0 0.50 1.0
+1 4294967295 0 4294967295
2 1
0
1 4
2.0 2.0 2.0 2.0
-[deal.II intermediate Patch<2,2>]
-0.50 0.50 1.0 0.50 1.0 1.0 0.50 1.0
-2 4294967295 1 4294967295
-3 1
-0
-1 4
-3.0 3.0 3.0 3.0
-
-
0
DEAL::OK