Interface boundaries Warning in MethodOfLines.jl

Hello, I’m very new to posting questions on here so I apologize in advance for any formatting/convention mistakes or if anything is unclear!

I am trying to solve a PDE using MethodOfLines.jl and receive the following warning when I “discretize” the system: “Warning: The system contains interface boundaries, which are not compatible with system transformation. The system will not be transformed. Please post an issue if you need this feature.”

However, my boundary conditions (in my 2 “parameters” T and x; and for my 3 “variables” u(…), v(…), w(…)) are as follows:

ic_bc = [u(0,x) ~ 0.0, v(0,x) ~ 0.0, w(0,x) ~ 0.0, # initial conditions
         u(T,minimum(xrange)) ~ u(T,maximum(xrange)), # periodic bcs
         v(T,minimum(xrange)) ~ v(T,maximum(xrange)),
         w(T,minimum(xrange)) ~ w(T,maximum(xrange))]  

My questions are:
(1) Is there a simple reason why I am seeing this Warning? I was under the impression that periodic boundary conditions and initial conditions are both supported, and I believe that is what I have here.
(2) How concerned should I be about this Warning? Should this significantly impede the solver’s ability to correctly solve my PDE? When I try to “solve” anyways, a solution is indeed generated, but the solution is all 0’s (i.e. not what I would expect). I ask this because, if it is the case that this Warning should not negatively impacting the solver, I would need to search for other possible errors in my code/parameters.

Please let me know if posting more of my code or more details on my simulation would make this question clearer. For a little context, I am trying to solve the semiconductor Bloch equations in the length gauge. Any help would be much appreciated!

1 Like


You are getting this warning because periodic conditions are implemented as a special case of the more general interface style boundary conditions, which allow one to connect two potentially different variables together at the boundaries.

This will not affect the solver at all, system transformation only provides capability for certain incompatible system forms to be transformed in to ones that MOL can deal with - if your system is already discretizing don’t worry, this won’t affect the result. I found it difficult to make this compatible with interfaces so added this check and warning to move forwards.

Can you post your full code related to MOL so I can take a look at why you’re getting all 0s?

PS A very well formatted and detailed question, good first post. Welcome to the community :slight_smile:


Thank you very much for the explanation! It is helpful and I think I understand now. Given this information that the warning should not affect the results, I went back through my code again and found an error with one of my parameters, and now my results are more along the lines of what I would expect. Thanks again for your help!

1 Like

You’re very welcome! Glad you got it working.

I think I’m going to change the warning message to avoid concerning people like this in the future, your question shows me that it wasn’t clear enough.

Could you mark my answer as the solution for future readers?

1 Like