Dear Wolfgang,

Your code uses the face_system_to_component_index(i) function which does not work with non-primitive elements.

In my setting only the RT elements have degrees of freedom at the faces, so that the condition

>       if (fe.face_system_to_component_index(i) belongs to one of
>           the vector components for which you use the RT element)

would always be true. I removed this condition and the code works fine.

Thank you,
Martin


Wolfgang Bangerth schrieb:
Martin,

I try to impose homogeneous Neumann boundary conditions on a flux while
working with Raviart-Thomas elements, but I could not find a suitable
function for this in deal. Is there a function like
"compute_no_normal_flux" for Raviart-Thomas elements (at least for RT0
elements)?

There isn't, but for RT elements this is relatively simple to write yourself because you want to set to zero all degrees of freedom that lie on the boundary. So something of the form

  std::map<unsigned int, double> boundary_values;
  for (cell = dof_handler.begin_active(); ...)
    for (f=0; f<GeometryInfo<dim>::faces_per_cell;...)
      if (cell->face(f)->at_boundary())
        {
          cell->face(f)->get_dof_indices(face_dof_indices);
          for (unsigned int i=0; ...)
            if (fe.face_system_to_component_index(i) belongs to one of
                the vector components for which you use the RT element)
              boundary_values[face_dof_indices[i]] = 0;
        }

Does that make sense?

W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/


--
Dipl.-Technomath. Martin Kunkel
Universität Hamburg, Department Mathematik
Bundesstr. 55, 20146 Hamburg, Germany
phone: +49 40 42838-6291  |  mail: [email protected]
fax:   +49 40 42838-5117  |  web:  www.math.uni-hamburg.de/home/kunkel

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

Reply via email to