Replacement of FE_Q with FE_Bernstein fails

15 views
Skip to first unread message

Maxi Miller

unread,
Jan 17, 2019, 2:42:01 AM1/17/19
to deal.II User Group
For convergence tests I wanted to replace the commonly used elements FE_Q with FE_Bernstein. Unfortunately apparently it is not possible to simply replace all occurences. When running my program, I get the following error:
--------------------------------------------------------
An error occurred in line <1126> of file <~/Downloads/git-files/dealii/source/fe/fe.cc> in function
    dealii
::Point<(dim - 1)> dealii::FiniteElement<<anonymous>, <anonymous> >::unit_face_support_point(unsigned int) const [with int dim = 2; int spacedim = 2]
The violated condition was:
    unit_face_support_points
.size() == this->dofs_per_face
Additional information:
   
You are trying to access the support points of a finite element that either has no support points at all, or for which the corresponding tables have not been implemented.

Stacktrace:
-----------
#0  /opt/dealii/lib/libdeal_II.g.so.9.1.0-pre: dealii::FiniteElement<2, 2>::unit_face_support_point(unsigned int) const
#1  /opt/dealii/lib/libdeal_II.g.so.9.1.0-pre: dealii::FESystem<2, 2>::unit_face_support_point(unsigned int) const
#2  ./main: ) [0x8953ea]
#3  ./main: void dealii::VectorTools::interpolate_boundary_values<2, 2, dealii::DoFHandler, double>(dealii::Mapping<2, 2> const&, dealii::DoFHandler<2, 2> const&, std::map<unsigned int, dealii::Function<2, double> const*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, dealii::Function<2, double> const*> > > const&, std::map<unsigned int, double, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, double> > >&, dealii::ComponentMask const&)
#4  ./main: void dealii::VectorTools::interpolate_boundary_values<2, 2, dealii::DoFHandler, double>(dealii::Mapping<2, 2> const&, dealii::DoFHandler<2, 2> const&, std::map<unsigned int, dealii::Function<2, double> const*, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, dealii::Function<2, double> const*> > > const&, dealii::AffineConstraints<double>&, dealii::ComponentMask const&)
#5  ./main: void dealii::VectorTools::interpolate_boundary_values<2, 2, dealii::DoFHandler, double>(dealii::Mapping<2, 2> const&, dealii::DoFHandler<2, 2> const&, unsigned int, dealii::Function<2, double> const&, dealii::AffineConstraints<double>&, dealii::ComponentMask const&)
#6  ./main: void dealii::VectorTools::interpolate_boundary_values<2, 2, dealii::DoFHandler, double>(dealii::DoFHandler<2, 2> const&, unsigned int, dealii::Function<2, double> const&, dealii::AffineConstraints<double>&, dealii::ComponentMask const&)
#7  ./main: ) [0x7f32a3]
#8  ./main: ) [0x7f0d58]
#9  ./main: main



with interpolate_boundary_values() called as

    VectorTools::interpolate_boundary_values(dof_handler, 0, BoundaryValuesCarriers<dim, EQU>(n_components), boundary_constraints, A_mask);
   
VectorTools::interpolate_boundary_values(dof_handler, 0, BoundaryValuesB<dim, EQU>(n_components), boundary_constraints, B_mask);
   
VectorTools::interpolate_boundary_values(dof_handler, 0, BoundaryValuesC<dim, EQU>(n_components), boundary_constraints, C_mask);

    boundary_constraints
.close();


Is there another way how I could replace FE_Q-elements with FE_Bernstein-elements?
Thanks!

Maxi Miller

unread,
Jan 17, 2019, 2:43:47 AM1/17/19
to deal.II User Group
Update: It looks as if this issue: https://github.com/dealii/dealii/issues/2237 might be related to the currently occuring problem?

Wolfgang Bangerth

unread,
Jan 17, 2019, 2:54:46 AM1/17/19
to dea...@googlegroups.com
On 1/17/19 12:43 AM, 'Maxi Miller' via deal.II User Group wrote:
> For convergence tests I wanted to replace the commonly used elements FE_Q with
> FE_Bernstein. Unfortunately apparently it is not possible to simply replace
> all occurences. When running my program, I get the following error:
> [...]

Well, the problem is that the Bernstein polynomials are not interpolation
polynomials, and consequently interpolating boundary values can't work. It's
not that something isn't implemented, but that the operation of
"interpolating" doesn't make any sense for the element.

But you *should* be able to use VectorTools::project_boundary_values() for
both of the elements you're working with.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages