module debug_embedded_adaptive
using Gridap, Gridap.Adaptivity
using GridapEmbedded
model = CartesianDiscreteModel((-8,8,-8,8,-8,0),(2,2,2))
model = refine(model,2)
geo = tube(2.0,4.0,x0=VectorValue(0,0,-4.0),v=VectorValue(0,0,1))
cutgeo = cut(model, geo)
Ωᵢ = Interior(cutgeo, PHYSICAL)
end # module
I'm not sure what the best solution would be here.
I ran into an
AssertionErrorwhich I believe to be a bug when anAppendedTriangulationis constructed using aSubCellTriangulationand anAdaptedTriangulation.The following piece of code reproduces the error:
The failing assertion (located in https://github.com/gridap/Gridap.jl/blob/0f2ef80ff010c558514166b03c3b276e4c4c945b/src/Geometry/AppendedTriangulations.jl#L110) requires
get_background_modelfrom both triangulations to return the same object, for theSubCellTriangulationthis is correctly called and returns anAdaptedDiscreteModel, yet for theAdaptedTriangulationanUnstructuredDiscreteModelorCartesianDiscreteModelis returned, which corresponds to the background model of theAdaptedDiscreteModel(see https://github.com/gridap/Gridap.jl/blob/0f2ef80ff010c558514166b03c3b276e4c4c945b/src/Adaptivity/AdaptedTriangulations.jl#L49).I'm not sure what the best solution would be here.
Currently, I have a workaround that changes the background model of the
AdaptedDiscreteModelin thecutfunction, which seems to fix things.