Hello

In a 2d problem with all periodic bc, I was able to use WorkStream for assembly.

But when I switch to MeshWorker, I get error about constraints (when running in 
parallel, serial is ok)

An error occurred in line <2248> of file 
</Users/praveen/Applications/deal.II/9.5.1/install/include/deal.II/lac/affine_constraints.h>
 in function
    types::global_dof_index 
dealii::AffineConstraints<>::calculate_line_index(const size_type) const 
[number = double]
The violated condition was: 
    local_lines.is_element(line_n)
Additional information: 
    The index set given to this constraints object indicates constraints
    for degree of freedom 0 should not be stored by this object, but a
    constraint is being added.

Everything is same, cell worker, copier are same for both WorkStream and 
MeshWorker, so I cannot see why only MeshWorker gives this problem.

Here is how I setup my constraints

  // Setup affine constraints
  constraints.clear();
  constraints.reinit(locally_relevant_dofs);
  setup_periodic_constraints();
  constraints.close();

//------------------------------------------------------------------------------
template <int dim>
void
CGSEM<dim>::setup_periodic_constraints()
{
  if(parameters.periodic_x == true ||
     parameters.periodic_y == true ||
     parameters.periodic_z == true)
  {
    pcout << "Setup periodic constraints ...\n";
  }
  else
  {
    return;
  }

  typedef typename DoFHandler<dim>::cell_iterator Iter;
  std::vector<GridTools::PeriodicFacePair<Iter>> periodicity_vector;

  // Periodic along x
  if(parameters.periodic_x == true)
    GridTools::collect_periodic_faces(dof_handler,
                                      0,
                                      1,
                                      0,
                                      periodicity_vector);

  // Periodic along y
  if(parameters.periodic_y == true)
    GridTools::collect_periodic_faces(dof_handler,
                                      2,
                                      3,
                                      1,
                                      periodicity_vector);
  // Periodic along z
  if(dim == 3 && parameters.periodic_z == true)
    GridTools::collect_periodic_faces(dof_handler,
                                      4,
                                      5,
                                      2,
                                      periodicity_vector);

  DoFTools::make_periodicity_constraints<dim, dim>(periodicity_vector, 
constraints);
}

Thanks
praveen

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/56D7D0F1-B3CA-4E9B-8CB0-AEADA3CF34F0%40gmail.com.

Reply via email to