Circular dependency when developing AD for `SkeletonTriangulation`
kishore-nori opened this issue · 0 comments
While developing AutoDiff (AD) for functionals involving integration over SkeletonTriangulation
there has been a situation of circular dependency if autodiff_array_###
family of functions specialised for Skeleton
terms are placed in the usual location of src/Arrays/Autodiff.jl
, this is due to the usage of SkeletonPair
and BlockMap
in these new functions. The reason being that SkeletonPair
and BlockMap
constructs are from modules of higher dependency hierarchy compared to Arrays
. So currently the new autodiff_array_###
family of functions have been placed directly in src/FESpaces/FEAutodiff.jl
, which resolves the circular dependency but disturbs the uniformity in the code. After discussions with @amartinhuertas and @santiagobadia, we decided to take note of this in an issue for future reference. Possible solution could be to move all the AD related constructs and functions into a new module that can be at a higher hierarchy compared to the modules from which the functions and constructs have been imported or used.