Bug in Interpolation
When running brittle-fracture
, I get an exception when interpolating boundaryDeformationInputWrap
, namely that an out-of-bounds index in some FieldVector
is accessed (this was only visible when having bound checks enabled).
Debugging is quite involved due to all the index resolving logic in dune-functions, so I did not find the actual problem, yet. I dont expect anyone of you to fix this for me, but I wanted to have it at least documented.
I'm using up-to-date core(+staging) modules on master branch and g++ 7.5.0. For completeness, I'll attach the backtrace/error log:
(base) ➜ src ./brittle-fracture ~/build/dune-debug/dune-fracture-phasefields/problems brittle-fracture
using AT2
using small strain non decomposed model
------ time step 0 ------
terminate called after throwing an instance of 'Dune::RangeError'
what(): Dune::RangeError [operator[]:/home/lasse/dune/dune-common/dune/common/fvector.hh:197]: Index out of bounds.
[thinkpad:12776] *** Process received signal ***
[thinkpad:12776] Signal: Aborted (6)
[thinkpad:12776] Signal code: (-6)
[thinkpad:12776] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f390e196890]
[thinkpad:12776] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f390ddd1e97]
[thinkpad:12776] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f390ddd3801]
[thinkpad:12776] [ 3] /home/lasse/anaconda3/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xbc)[0x7f390e7ee84a]
[thinkpad:12776] [ 4] /home/lasse/anaconda3/lib/libstdc++.so.6(+0xabf47)[0x7f390e7ecf47]
[thinkpad:12776] [ 5] /home/lasse/anaconda3/lib/libstdc++.so.6(+0xabf7d)[0x7f390e7ecf7d]
[thinkpad:12776] [ 6] /home/lasse/anaconda3/lib/libstdc++.so.6(__cxa_rethrow+0x0)[0x7f390e7ed15a]
[thinkpad:12776] [ 7] ./brittle-fracture(_ZNK4Dune11FieldVectorIdLi2EEixEm+0x15c)[0x55a12d53504a]
[thinkpad:12776] [ 8] ./brittle-fracture(_ZZN4Dune9Functions3Imp23resolveStaticMultiIndexIRKNS_11FieldVectorIdLi2EEENS1_23ShiftedStaticMultiIndexINS_8TypeTree14HybridTreePathIJmEEELm0EEEEEDcOT_RKT0_ENKUlSC_E0_clINS_6Hybrid4Impl2IdEEEDcSC_+0x70)[0x55a12d5e599c]
[thinkpad:12776] [ 9] ./brittle-fracture(_ZN4Dune6Hybrid4Impl6ifElseIZNS_9Functions3Imp23resolveStaticMultiIndexIRKNS_11FieldVectorIdLi2EEENS4_23ShiftedStaticMultiIndexINS_8TypeTree14HybridTreePathIJmEEELm0EEEEEDcOT_RKT0_EUlSF_E_ZNS5_IS9_SE_EEDcSG_SJ_EUlSF_E0_EEDcSt17integral_constantIbLb0EESG_OSH_+0x21)[0x55a12d5e5a03]
[thinkpad:12776] [10] ./brittle-fracture(_ZN4Dune6Hybrid6ifElseISt17integral_constantIbLb0EEZNS_9Functions3Imp23resolveStaticMultiIndexIRKNS_11FieldVectorIdLi2EEENS5_23ShiftedStaticMultiIndexINS_8TypeTree14HybridTreePathIJmEEELm0EEEEEDcOT_RKT0_EUlSG_E_ZNS6_ISA_SF_EEDcSH_SK_EUlSG_E0_EEDcRKSG_OSI_OT1_+0x43)[0x55a12d5e5a4c]
[thinkpad:12776] [11] ./brittle-fracture(_ZN4Dune9Functions3Imp23resolveStaticMultiIndexIRKNS_11FieldVectorIdLi2EEENS1_23ShiftedStaticMultiIndexINS_8TypeTree14HybridTreePathIJmEEELm0EEEEEDcOT_RKT0_+0x5e)[0x55a12d5e5ab7]
[thinkpad:12776] [12] ./brittle-fracture(_ZN4Dune9Functions23resolveStaticMultiIndexIRKNS_11FieldVectorIdLi2EEENS_8TypeTree14HybridTreePathIJmEEEEEDcOT_RKT0_+0x4d)[0x55a12d5e5b24]
[thinkpad:12776] [13] ./brittle-fracture(_ZNK4Dune9Functions24HierarchicNodeToRangeMapclINS0_12LagrangeNodeINS_8GridViewINS_24UGGridLeafGridViewTraitsIKNS_6UGGridILi2EEEEEEELi1EdEENS_8TypeTree14HybridTreePathIJmEEERKNS_11FieldVectorIdLi2EEELi0EEEDcRKT_RKT0_OT1_+0x2b)[0x55a12d5e5b65]
[thinkpad:12776] [14] ./brittle-fracture(+0x641b1e)[0x55a12d520b1e]
[thinkpad:12776] [15] ./brittle-fracture(+0x64553d)[0x55a12d52453d]
[thinkpad:12776] [16] ./brittle-fracture(+0x6451f6)[0x55a12d5241f6]
[thinkpad:12776] [17] ./brittle-fracture(+0x644ac9)[0x55a12d523ac9]
[thinkpad:12776] [18] ./brittle-fracture(+0x643903)[0x55a12d522903]
[thinkpad:12776] [19] ./brittle-fracture(_ZNKSt8functionIFN4Dune11FieldVectorIdLi1EEENS1_IdLi2EEEEEclES3_+0x68)[0x55a12d64b714]
[thinkpad:12776] [20] ./brittle-fracture(_ZNK4Dune4Impl30LagrangeCubeLocalInterpolationINS0_22LagrangeCubeLocalBasisIddLj2ELj1EEEE11interpolateISt8functionIFNS_11FieldVectorIdLi1EEENS7_IdLi2EEEEEdEEvRKT_RSt6vectorIT0_SaISG_EE+0xfd)[0x55a12d643483]
[thinkpad:12776] [21] ./brittle-fracture(_ZNK4Dune28LocalInterpolationVirtualImpINS_11FieldVectorIdLi2EEENS1_IdLi1EEENS_4Impl30LagrangeCubeLocalInterpolationINS4_22LagrangeCubeLocalBasisIddLj2ELj1EEEEEE11interpolateERKSt8functionIFS3_S2_EERSt6vectorIdSaIdEE+0x2f)[0x55a12d63ce49]
[thinkpad:12776] [22] ./brittle-fracture(+0x642ca4)[0x55a12d521ca4]
[thinkpad:12776] [23] ./brittle-fracture(+0x641c97)[0x55a12d520c97]
[thinkpad:12776] [24] ./brittle-fracture(+0x6407f0)[0x55a12d51f7f0]
[thinkpad:12776] [25] ./brittle-fracture(+0x63fc64)[0x55a12d51ec64]
[thinkpad:12776] [26] ./brittle-fracture(+0x63fc9c)[0x55a12d51ec9c]
[thinkpad:12776] [27] ./brittle-fracture(+0x63fce6)[0x55a12d51ece6]
[thinkpad:12776] [28] ./brittle-fracture(+0x63fd35)[0x55a12d51ed35]
[thinkpad:12776] [29] ./brittle-fracture(+0x63ef4f)[0x55a12d51df4f]
[thinkpad:12776] *** End of error message ***
[1] 12776 abort (core dumped) ./brittle-fracture ~/build/dune-debug/dune-fracture-phasefields/problems