Different solutions when using 'problem' and 'varf' keywords

Hi all, I’m currently trying to understand how to properly use the varf keyword in FreeFem and I’ve come across an issue where the solution to a simple toy problem is different when the code is written using the problem keyword compared to when the varf keyword is used. Can someone explain why this is the case and perhaps suggest a fix? I’ve attached my two versions of code below. Any any help with this issue will be really appreciated!

Here’s the code that uses problem:
SimplerProblemLinearCoupled_problem.edp (2.2 KB)

Here’s the code that uses varf:
SimplerProblemLinearCoupled_varf.edp (2.6 KB)

First, solve a linear system without a loop in time. Is the solution the same? Second, you problem are not the same (different values for mu1, mu2, and mu3). Third, do not use fancy preconditioner until you sort this out and stick to an exact factorization instead of GAMG.

2 Likes

You’ve just solved my problem, thank you very much and very well spotted. I must’ve forgotten that I’d changed my mu values! I’ll definitely bear in mind your advice about using different preconditioners.

Nice, that was an easy fix! :sweat_smile:

1 Like