Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounds Error when no cut cells are present #37

Open
diliphridya opened this issue Nov 25, 2020 · 2 comments
Open

Bounds Error when no cut cells are present #37

diliphridya opened this issue Nov 25, 2020 · 2 comments

Comments

@diliphridya
Copy link
Contributor

@fverdugo @santiagobadia
If we consider the following code

using Gridap
using GridapEmbedded
using Gridap.ReferenceFEs

u(x) = x[1] + x[2]
f(x) = 0.0

bgdomain = (0,1,0,1)
n = 10
partition = (n,n)
bgmodel = CartesianDiscreteModel(bgdomain,partition)

geo = square(L=0.8,x0=Point(0.5,0.5))
cutgeo = cut(bgmodel,geo)
model = DiscreteModel(cutgeo)

strategy = AggregateCutCellsByThreshold(1.0)
aggregates = aggregate(strategy,cutgeo) 

T = Float64
order = 1
reffe = LagrangianRefFE(T,QUAD,order)
V0 = TestFESpace(reffe=reffe, model=model,dof_space=:physical)
V = AgFEMSpace(V0,aggregates)
U = TrialFESpace(V)

Here, all cells are well-posed (no cut cells).
image

We can see an error BoundsError: attempt to access 81-element Array{Int32,1} at index [0] in the line
V = AgFEMSpace(V0,aggregates).

@fverdugo
Copy link
Member

Hi @diliphridya
it seems a bug that shows up for the degenerated case of 0-cut cells. Since in this case, you don't need aggregation at all, it should be easy to fix.

@diliphridya
Copy link
Contributor Author

Thanks @fverdugo . I will have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants