// document bug in assembling a LA::MPI::SparseMatrix
+// this was due to handing a wrong IndexSet to the ConstraintMatrix
#include "../tests.h"
#include <deal.II/lac/generic_linear_algebra.h>
IndexSet relevant;
DoFTools::extract_locally_relevant_dofs (dof_handler, relevant);
- CompressedSimpleSparsityPattern sp (owned);
+ // this causes a crash in PETSc, but is ignored in Trilinos:
+ //CompressedSimpleSparsityPattern sp (owned);
+ CompressedSimpleSparsityPattern sp (relevant);
typename LA::MPI::SparseMatrix matrix;
DoFTools::make_sparsity_pattern (dof_handler, sp,
cm, false,
matrix.compress(VectorOperation::add);
+ if (myid==0)
+ {
+ deallog << matrix(21,39) << std::endl;
+ }
+
// done
if (myid==0)
deallog << "OK" << std::endl;
-DEAL:0:PETSc::numproc=4
-DEAL:0:PETSc::(0,0) = 0.00000
-DEAL:0:PETSc::(1,1) = 5.20000
+DEAL:0:PETSc::numproc=2
+DEAL:0:PETSc::101.000
DEAL:0:PETSc::OK
-DEAL:0:Trilinos::numproc=4
-DEAL:0:Trilinos::(0,0) = 0.00000
-DEAL:0:Trilinos::(1,1) = 5.20000
+DEAL:0:Trilinos::numproc=2
+DEAL:0:Trilinos::101.000
DEAL:0:Trilinos::OK
-
-
-
-