Hi,
I am trying to create a function that returns an ArrayView to a Tensor,
like this:
const ArrayView<const Tensor<1, spacedim>> function{
return make_array_view(table, row, start_col, size_view;
}
This gives me a segmentation fault.
I looked through some of the ArrayView tests and at the function
get_properties() defined on line 53
<https://www.dealii.org/9.2.0/doxygen/deal.II/property__pool_8cc_source.html#l00053>
of
file property_pool.cc
<https://www.dealii.org/9.2.0/doxygen/deal.II/property__pool_8cc_source.html>,
which helped me understand the pointer-like-nature of ArrayView. However,
none of them seem to allocate dynamic memory for the ArrayView object
before returning it. Should I allocate dynamic memory to avoid the
segfault? If so, how?
Thanks,
Laryssa
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/CAGtr4iDHh8Fp2-GvSaSwmqTGbcxoGuf4_wovqr88ea%3DxKNa8%2Bw%40mail.gmail.com.