This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Status of the multistage schemes module, recommended as a way to solve transient problems?

+3 votes

I changed this question from asking "Are there any examples..." to "Is it OK to use..." as I found the examples for this module once I upgraded to latest version of FEniCS.


The multistage module seems very interesting, it seems to include objects for writing problems using different schemes (such as Backwards Euler, Crank-Nicolson, Runge-Kutta) as well as accompanying solvers.

Are there any examples out there on how to solve a simple PDE using these tools?

There is a nice example of how to use this to time-step the advection-diffusion equation

I am potentially interested in using these to time-step (implicit) non-linear PDEs. The native approach to time-stepping is to manually implement the backwards Euler method. But the multistage module seems to take care of most of these details. I just wondering why there is little mention of if in the documentation?

The lack of documentation is normally a sign of an area that is under development. There is also a warning in the source code (example linked above),

FIXME: using a MultiStateScheme. It could be removed or changed anytime.

Does anybody use this interesting module? The status from the documentation seem to imply "use at your own risk".

Best wishes,

Dan

asked Feb 24, 2014 by boyfarrell FEniCS Novice (360 points)
edited Feb 25, 2014 by boyfarrell

1 Answer

+1 vote
 
Best answer

I am the main developer of the multistage scheme code. The main reason it was added was to support vectorized RK solvers for reaction type ODE equations. This is was the PointIntegralSolver should be used for and it is developed right now in a branch on bitbucket.

The MultistageScheme used in the PointIntegralSolver is however general enough to be used in a time integration of more general PDEs (then using the RKSolver), which is illustrated in the demo you link to. Because this part has not been the main focus of my development it has not got the deserved attention, wrt to 1) optimization, 2) application of DirichletBC.

These issues could be addressed by others as the code is not that complex and I welcome anyone to contribute. The most important part for 1), is to add logic for not assembling the Jacobian each time step. For 2) carful care need to be taken to add DirichletBC correctly. Now it is naively added to the stage values (the derivatives), which is clearly wrong (although it seams to work for the demo).

answered Feb 25, 2014 by johanhake FEniCS Expert (22,480 points)
selected Feb 25, 2014 by boyfarrell

Thank you for your comment, it is really a interesting area of study. At the moment I am just starting to explore FEniCS by constructing some toy problems, but ultimately I am interested in using to do real work time stepping some reasonably complicated problems. If I build up some experience in this area then I would be happy to contribute, but right now I pretty much a FEniCS novice.

What Dirichlet boundary conditions are to be applied to the stages in RK is indeed a topic of research (see http://epubs.siam.org/doi/abs/10.1137/S1064827594273948 for example), but when the values are not time-dependent, you can't make a mistake.

Thanks for clarifying this Nico. The DirichletBC used in the demo is indeed time dependent.

Does this module work with Discontinuous Galerkin methods? It seems that the right hand side form can only have one integral.

...