GfsOutputErrorNorm
From Gerris
GfsOutputErrorNorm is used to write the norms of the difference between a scalar field and a user-defined reference field.
The norms are written using the same formatting as for GfsOutputScalarNorm.
The syntax in parameter files is:
[ GfsOutputScalar ] { s = [ GfsFunction ] unbiased = 1 v = Error w = [ GfsFunction ] relative = 0 }
where s is the function defining the reference field and v is used to store the difference between the scalar and reference fields (v can be left undefined in which case a temporary variable is used).
If unbiased is set to one (default is zero), the bias (i.e. mean value of the difference) is substracted before computing the norms.
The norms can be weighted using the optional parameter w.
If relative is set to one, the norms are divided by the corresponding norms of the reference solution.
Examples
- Convergence of the Poisson solver
- Convergence with a refined circle
- Convergence of the Godunov advection scheme
- Time-reversed VOF advection in a shear flow
- Time-reversed advection with curvature-based refinement
- Convergence for a simple periodic problem
- Potential flow around a sphere
- Poiseuille flow
- Hydrostatic balance with quadratic pressure profile
- Translation of an hexagon in a uniform flow
- Geostrophic adjustment
- Oscillations in a parabolic container
- Advection of a cosine bell around the sphere
OutputErrorNorm { start = end } {
awk '{print LEVEL " " $5 " " $7 " " $9}' >> error
} { v = P } {
s = (sin (M_PI*3.*x)*sin (M_PI*3.*y))
unbiased = 1
}
OutputErrorNorm { start = end } {
awk '{print LEVEL " " $5 " " $7 " " $9}' >> error
} { v = P } {
s = (sin (M_PI*3.*x)*sin (M_PI*3.*y))
unbiased = 1
}
OutputErrorNorm { start = end } { awk '{ print LEVEL " " $5 " " $7 " " $9}' } { v = T } {
s = {
double r2 = x*x + y*y;
double coeff = 20. + 20000.*r2*r2*r2*r2;
return (1. + cos(20.*x)*cos(20.*y))*exp(-coeff*r2)/2.;
}
}
OutputErrorNorm { start = end } norms { v = T } {
s = Tref v = DT
}
OutputErrorNorm { start = end } norms { v = T } {
s = Tref v = DT
}
OutputErrorNorm { start = end } stdout { v = U } {
s = (1. - 2.*cos (2.*M_PI*(x - t))*sin (2.*M_PI*(y - t)))
}
OutputErrorNorm { start = end } { awk '{ print LEVEL " " $7 " " $9}' } { v = U } {
s = (dx("Phi") + 1.)
}
OutputErrorNorm { start = end } { awk '{print LEVEL,$5,$7,$9}' } { v = U } {
s = 1./2.*(1./4 - y*y)
}
OutputErrorNorm { istep = 1 } p { v = P } {
s = -(cy*cy/2. + 0.5*cy)
unbiased = 1
}
OutputErrorNorm { istep = 1 } {
awk '{ printf ("%e %e %e %e\n", $3, $5, $7, $9) }' > momentumerror-ORDER
} { v = sqrt((U - 1.)*(U - 1.) + V*V) } { s = 0. }
OutputErrorNorm { istep = 1 } { awk '{print $3/1.0285e-4/3600./24. " " $9*1000e6*1.0285e-4*1.0285e-4/0.01;}' > e } { v = P } {
s = (5.667583815e-4*exp (-100.*(x*x + y*y)))
unbiased = 1
v = E
}
OutputErrorNorm { istep = 1 } error-LEVEL { v = P } {
s = Pt
v = DP
}
OutputErrorNorm { istep = 1 } { awk '{ print LEVEL,$3,$5,$7,$9}' > error-LEVEL-ALPHA } { v = T } {
s = bell(x,y,t)
v = E
relative = 1
}

