Hello everyone

I'm trying to make a block sparsity pattern for an uncoupled system, only
the blocks in the diagonal have nonzero elements.

I can't find how to make a "null" sparsity block.

----------------------

// I defined the spasity pattern of the nonzero blocks

 CompressedSparsityPattern c_sparsity(dof_handler.n_dofs());

 DoFTools::make_sparsity_pattern (dof_handler, c_sparsity);

// Then the block sparsity pattern

 sparsity_pattern.reinit(nd,nd);

// then each block

  for (int i=0; i<nd; ++i) {
    for (int j=0; j<nd; ++j) {
      if (i==j) {
    sparsity_pattern.block(i,j).copy_from(c_sparsity);
      } else {

sparsity_pattern.block(i,j).reinit(dof_handler.n_dofs(),dof_handler.n_dofs(),0);
// here I should define a "null" block
      }
    }
  }
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to