Dear Andrew, Markus and Wolfgang,

I have already implemented the idea of Markus of having not connected domains. The problem is, as you pointed out, that we lose in this way the connectivity of the grid through the discontinuities, i.e. an element at the border of two different domains doesn't know its neighbour on the other side.

I have created the connectivity manually and solved the problem, but in this way you lose the refining and coarsening mechanisms already implemented in deal.ii.

To avoid this problem we had the idea to use a hp_collector as I've shown in the last mail.


To come to the question of Wolfgang.

Can you say where exactly this exception is produced?

It happens when I call "distribute_dofs", because fe_system calls the following function:

template <int dim>
FiniteElementDomination::Domination
FE_Nothing<dim> ::
compare_for_face_domination (const FiniteElement<dim> & fe_other) const
{
  if(dynamic_cast<const FE_Nothing<dim>*>(&fe_other) != 0)
    return FiniteElementDomination::either_element_can_dominate;
  else
    return FiniteElementDomination::this_element_dominates;
}


How should be the behavior of this function in the FE_Nothing case?

We have a problem because the pair is symmetric

  fe_1 ( FE_Q<dim>(1), 1,  FE_Nothing<dim>(), 1 ),
  fe_2 ( FE_Nothing<dim>(), 1,  FE_Q<dim>(1), 1 ),

and fe_system ends up with neither_element_dominates.

So actually fe_system should not use "compare_for_face_domination" when we use FE_Nothing, but how can you a priori control this, if you still want the hp features?

Here the error message in deal.ii:

--------------------------------------------------------
An error occurred in line <2547> of file
<deal.II/source/fe/fe_system.cc> in
function
    dealii::FiniteElementDomination::Domination dealii::FESystem<dim,
spacedim>::compare_for_face_domination(const dealii::FiniteElement<dim,
spacedim>&) const [with int dim = 2, int spacedim = 2]
The violated condition was:
    domination != FiniteElementDomination::neither_element_dominates
The name and call sequence of the exception was:
    ExcInternalError()
Additional Information:
(none)

Stacktrace:
-----------
#0
lib/libdeal_II_2d.g.so.6.3.1:
dealii::FESystem<2,
2>::compare_for_face_domination(dealii::FiniteElement<2, 2> const&) const
#1
lib/libdeal_II_2d.g.so.6.3.1:
unsigned int dealii::internal::hp::get_most_dominating_fe_index<2, 2,
dealii::TriaIterator<dealii::DoFAccessor<1, dealii::hp::DoFHandler<2, 2> >
>(dealii::TriaIterator<dealii::DoFAccessor<1, dealii::hp::DoFHandler<2,
2> > > const&)
#2
lib/libdeal_II_2d.g.so.6.3.1:
dealii::hp::DoFHandler<2,
2>::compute_line_dof_identities(std::vector<unsigned int,
std::allocator<unsigned int> >&) const
#3
lib/libdeal_II_2d.g.so.6.3.1:
dealii::hp::DoFHandler<2, 2>::distribute_dofs(dealii::hp::FECollection<2,
2> const&)
#4  ./step-3: LaplaceProblem::make_grid_and_dofs()
#5  ./step-3: LaplaceProblem::run()
#6  ./step-3: main
--------------------------------------------------------


Best
Thomas
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to