I am using the function vector_value in my code for interpolation, as in 
(taken from 
https://www.dealii.org/developer/doxygen/deal.II/classFunctions_1_1FEFieldFunction.html
):
    Functions::FEFieldFunction<dim, DoFHandler<dim>, TrilinosWrappers::MPI::
Vector> solution_function(dof_handler, old_solution);
    Vector<double> result(n_components * dim);
    bool point_is_available = true;

    for(size_t i = 0; i < pmax_val; ++i)
    {
        for(size_t j = 0; j < module.p_N.size(); ++j)
        {
            if(module.p_N[j] <= p2[1] && i * local_equations.
local_physics_parameters.dz_inside >= p1[0])
            {
                Point<dim> eval_point(x_pos[i], y_pos[j]);
                point_is_available = true;
                try{
                    solution_function.vector_value(eval_point, result);
                }
                catch(const VectorTools::ExcPointNotAvailableHere &)
                {
                    point_is_available = false;
                }
                if(point_is_available)
                {
                   //do something
                }
                else
                {
                    //do something else
                }
            }
            else
            {
                //Not in range
            }
    }
    }

If I compile the program in release mode, it segfaults at 
*solution_function.vector_value(eval_point, 
result)*. If I compile it in debug mode, it runs slower, but without 
problems. When removing the line with 
*solution_function.vector_value(eval_point, 
result)*, it works in release mode, too. Why does that happen, and how can 
I fix that?

Thanks!

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

Reply via email to