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

Dirichlet BC don't work in 1D #37

Closed
boriskaus opened this issue Aug 27, 2024 · 1 comment · Fixed by #38 or #39
Closed

Dirichlet BC don't work in 1D #37

boriskaus opened this issue Aug 27, 2024 · 1 comment · Fixed by #38 or #39

Comments

@boriskaus
Copy link

MWE:

grid   = UniformGrid(arch; origin=(0, ), extent=(2, ), dims=(11,))
u = Field(arch, grid, Center())
bc!(arch, grid, u => Dirichlet() )
@luraess
Copy link
Member

luraess commented Aug 28, 2024

Seems that I_f computed in

I_f = insert_dim(dim, I, itp_halo_index(side, dim, f))
returns a Tuple of size N=2 in 1D which then gets passed to
a = value(bc, grid, Center(), dim, I_f...)
as ::Vararg{Integer,N} where N is expected to be N=1 in 1D.

In 2D case, one gets:

(I, dim) = ((0,), Dim{2}())
I_f = (0, 0)

while in 1D case:

(I, dim) = ((0,), Dim{1}())
I_f = (0, 0)

where I_f has 2 elements while N=1.

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