hp::DoFHandler does not support parallel::distributed::Triangulation

50 views
Skip to first unread message

zhen-lin Wang

unread,
Feb 22, 2017, 12:51:34 AM2/22/17
to deal.II User Group
Hi all, 

I found that hp::DoFHandler does not support parallel::distributed::Triangulation currently. The error shows like:
-----------

An error occurred in line <1669> of file </Applications/deal.II.brew.app/Contents/Resources/brew/src/dealii/8.4.2/source/hp/dof_handler.cc> in function

    dealii::hp::DoFHandler<2, 2>::DoFHandler(const Triangulation<dim, spacedim> &) [dim = 2, spacedim = 2]

The violated condition was: 

    (dynamic_cast<const parallel::distributed::Triangulation< dim, spacedim >*> (&tria) == 0)

The name and call sequence of the exception was:

    ExcMessage ("The given triangulation is parallel distributed but " "this class does not currently support this.")
-----------
 I wondThe problem I am doing needs Fe_Nothing and I want to parallelize the code with BlockSparseMatrix and BlockVector. I follow the step55 which using parallel::distributed::Triangulation. I wonder can I use regular Triangular and hp::DoFHandler but still follow step55 for the rest of the part?

Thanks,

Zhenlin Wang

Denis Davydov

unread,
Feb 22, 2017, 3:53:26 AM2/22/17
to deal.II User Group
you can always partition regular triangulation by 
GridTools::partition_triangulation (n_mpi_processes, triangulation); 
and adjust your assembly loops to
if (cell->subdomain_id == this_mpi_process)
to parallelize with MPI. The downside is that all your processes will now own the **complete mesh**.
There are also some other minor downsides like serial SolutionTransfer and not straight-forward serialization/restart.

Regards,
Denis.

Jean-Paul Pelteret

unread,
Feb 22, 2017, 10:08:21 AM2/22/17
to deal.II User Group
Hi Zhenlin,

I concur with Denis - I regularly use the method that he's outlined in conjunction with hp::DoFHandler.

Regards,
Jean-Paul

zhen-lin Wang

unread,
Feb 22, 2017, 11:05:00 AM2/22/17
to deal.II User Group
Thank you Denis, that is what I am planing do to. Hope it will work out finally.

Bests,
Zhenlin
在 2017年2月22日星期三 UTC-5上午3:53:26,Denis Davydov写道:
Reply all
Reply to author
Forward
0 new messages