Hello,

While changing the boundary conditions for a Darcy problem (practically 
equivalent to step-20) , I encountered an InternalError. The culprit is 
VectorTools::computer_no_normal_flux_constraints, which states 
'unit_support_points.size() == fe_collection[i].dofs_per_face' (complete 
message, see below).

After a bit of digging, I think the following happens. The basis for the 
problem is a system of RaviarThomas + DGQ. The RaviarThomas element has no 
support points, but has dofs_per_face. Therefore the same applies to the 
FESystem, which therefore triggers the above mentioned error. 

To reproduce, make a copy of step 20, include 
<deal.II/lac/constraint_matrix.h> and add at the end of make_grid_and_dofs 
the following

    std::set<types::boundary_id> boundary_ids;
    ConstraintMatrix constraints;
    VectorTools::compute_no_normal_flux_constraints(
            dof_handler,
            0,
            boundary_ids,
            constraints
    );

Let me know if you need more information,

Lars Corbijn



The complete error message:

An error occurred in line <5270> of file 
</home/lars/AUR/deal-ii/src/dealii-8.4.2/include/deal.II/numerics/vector_tools.templates.h>
 
in function
    void dealii::VectorTools::compute_nonzero_normal_flux_constraints(const 
DoFHandlerType<dim, spacedim>&, unsigned int, const std::set<unsigned 
char>&, typename dealii::FunctionMap<spacedim>::type&, 
dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int 
dim = 2; DoFHandlerType = dealii::DoFHandler; int spacedim = 2; typename 
dealii::FunctionMap<spacedim>::type = std::map<unsigned char, const 
dealii::Function<2, double>*, std::less<unsigned char>, 
std::allocator<std::pair<const unsigned char, const dealii::Function<2, 
double>*> > >]
The violated condition was: 
    unit_support_points.size() == fe_collection[i].dofs_per_face
The name and call sequence of the exception was:
    ExcInternalError()
Additional Information: 
This exception -- which is used in many places in the library -- usually 
indicates that some condition which the author of the code thought must be 
satisfied at a certain point in an algorithm, is not fulfilled. An example 
would be that the first part of an algorithm sorts elements of an array in 
ascending order, and a second part of the algorithm later encounters an an 
element that is not larger than the previous one.

There is usually not very much you can do if you encounter such an 
exception since it indicates an error in deal.II, not in your own program. 
Try to come up with the smallest possible program that still demonstrates 
the error and contact the deal.II mailing lists with it to obtain help.

Stacktrace:
-----------
#0  /usr/lib/libdeal_II.g.so.8.4.2: void 
dealii::VectorTools::compute_nonzero_normal_flux_constraints<2, 
dealii::DoFHandler, 2>(dealii::DoFHandler<2, 2> const&, unsigned int, 
std::set<unsigned char, std::less<unsigned char>, std::allocator<unsigned 
char> > const&, dealii::FunctionMap<2, double>::type&, 
dealii::ConstraintMatrix&, dealii::Mapping<2, 2> const&)
#1  /usr/lib/libdeal_II.g.so.8.4.2: void 
dealii::VectorTools::compute_no_normal_flux_constraints<2, 
dealii::DoFHandler, 2>(dealii::DoFHandler<2, 2> const&, unsigned int, 
std::set<unsigned char, std::less<unsigned char>, std::allocator<unsigned 
char> > const&, dealii::ConstraintMatrix&, dealii::Mapping<2, 2> const&)
#2  ./step-20: Step20::MixedLaplaceProblem<2>::make_grid_and_dofs()
#3  ./step-20: Step20::MixedLaplaceProblem<2>::run()
#4  ./step-20: main

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to