# ERROR: type PeriodicBoundary has no field order

Hello,

I’m teaching myself Julia to solve PDE. As toy problem I am duplication this very simple heat equation problem:
Dirichlet boundary conditions

I’m trying to redefine the initial condition from:

bcs = [u(0, x) ~ cos(x),
u(t, 0) ~ exp(-t),
u(t, 1) ~ exp(-t) * cos(1)]


to:

bcs = [u(0, x) ~ cos(π*x),
u(t, 0) ~ exp(-t),
u(t, 1) ~ exp(-t) * cos(1)]


The first initial condition is not giving me error, but when I use the 2nd initial condition, Julia is giving this error:

ERROR: type PeriodicBoundary has no field order


I did a some investigating and added 1 * before pi, as shown below.

bcs = [u(0, x) ~ cos(1*π*x),
u(t, 0) ~ exp(-t),
u(t, 1) ~ exp(-t) * cos(1)]


This approach somehow solved the problem. My question is why do I need the multiplier?

This just seems to be a bug in the library. I would open an issue on the repo with this information.

1 Like