Yann Jobic
unread,Oct 28, 2024, 1:36:53 PM10/28/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dea...@googlegroups.com
Hello,
I'm trying to access the coordinates of the quadrature points.
I'm doing :
QGauss<dim> quadrature_formula(degree + 1);
FEValues<dim> fe_values(fe, quadrature_formula,
update_values | update_quadrature_points |
update_JxW_values | update_gradients);
const std::vector<Point<dim>> & q_list =
quadrature_formula.get_points();
in the loop of the quadrature points,
const Point<dim> & GaussPoint = q_list[q];
And when i'm trying to get the values of GaussPoint, with GaussPoint[0]
(in my case dim=2), i've got the error :
--------------------------------------------------------
An error occurred in line <2778> of file
</local/lib/dealii/9.5.2_with_petsc/include/deal.II/base/table.h> in
function
typename dealii::AlignedVector<T>::reference dealii::Table<2,
ElementType>::operator()(dealii::Table<2, ElementType>::size_type,
dealii::Table<2, ElementType>::size_type) [with T = double; typename
dealii::AlignedVector<T>::reference = double&; dealii::Table<2,
ElementType>::size_type = long unsigned int]
The violated condition was:
::dealii::deal_II_exceptions::internals::compare_less_than(i,
this->table_size[0])
Additional information:
Index 4 is not in the half-open range [0,4).
Stacktrace:
-----------
#0 ./step-22: dealii::Table<2, double>::operator()(unsigned long,
unsigned long)
#1 ./step-22: Step22::StokesProblem<2>::compute_residual()
#2 ./step-22: Step22::StokesProblem<2>::run()
#3 ./step-22: main
--------------------------------------------------------
I don't understand why !!
How can i access to those coordinates ?
Many thanks,
Yann