Skip to content

Issue on the computation of numerical errors for 2D-Darcy #41

@liu-ziyuan-math

Description

@liu-ziyuan-math

Hi @leiterrl and @kmario23,

Consider the darcy flow $$\nabla \cdot (a \nabla u) = 1.$$
When computing the RMSE in /model/metric.py, the program will minus [a, u_pred] with [a, u_ref], rather than u_pred - u_ref. It make no difference for MSE but I guess it may underestimate the (relative) L2 norm error (i.e. RMSE and nRMSE in the paper), because it will double the N on the denominator.

I add some temporary code to illustrate the point on Line 177, you can see the pred is doubled on the last channel-dim and the first channel of pred - target all equal zeros. See
https://github.com/liu-ziyuan-math/PDEBench-testl2/blob/main/pdebench/models/metrics.py

I'm not sure if it occur only in the 2D-Darcy problem but I presume it should be so since the 2D-darcy is the only time independent problem in the datasets.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions