Skip to content

[Bug]: heat_nonlinear demo: the L2 error against the exact solution grows to 4.7 at t = 0.2 #610

Open

Description

@gouarin

What happened?

finite-volume-heat-nonlinear (demos/FiniteVolume/heat_nonlinear.cpp) prints the L2 error against its exact solution at each iteration. With the default options (implicit scheme, --dt 0.0001, --Tf 1), the error starts at 8.23e-05, reaches 1.02 at t = 0.1 and 4.71 at t = 0.2, then decreases to 0.28 at t = 1. The same growth happens on a uniform mesh: with --min-level 6 --max-level 6, the error is 1.02 at t = 0.1 and 4.76 at t = 0.2. An error of order one means the computed solution and the exact solution of the demo do not agree: either the scheme or the exact solution coded in the demo is wrong.

Input code

./finite-volume-heat-nonlinear
./finite-volume-heat-nonlinear --min-level 6 --max-level 6 --Tf 0.2

What expected?

An L2 error that stays at the level of the discretization error (around 1e-4 to 1e-3 here) for the whole run.

Relevant log output

iteration 0: t = 0.00, dt = 0.0001, L2-error: 8.23e-05
iteration 1000: t = 0.10, dt = 0.0001, L2-error: 1.02e+00
iteration 2000: t = 0.20, dt = 0.0001, L2-error: 4.71e+00
iteration 3000: t = 0.30, dt = 0.0001, L2-error: 9.32e-02
iteration 5000: t = 0.50, dt = 0.0001, L2-error: 2.21e-01
iteration 10000: t = 1.00, dt = 9.37138414829411e-14, L2-error: 2.80e-01

What is your operating system?

Linux

How did you install our software?

from source

Software version

main at a1bdf4e8

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions