File: map-cube.fee

package info (click to toggle)
feenox 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,068 kB
  • sloc: ansic: 28,856; sh: 7,201; makefile: 556; python: 554; xml: 500
file content (15 lines) | stat: -rw-r--r-- 533 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# read the function f(x,y,z) from the nodes of the source mesh
READ_MESH map-cube-$1-src.msh DIM 3 READ_FIELD f AS f_pointwise

# read the dest mesh
READ_MESH map-cube-$2.msh

# read analytical f(x,y,z)
INCLUDE map-function.fee

# evaluate f(x,y,z) at the nodes of the dest mesh and write it into $1 -> $2
WRITE_MESH map-cube-$1-$2-dst.msh MESH map-cube-$2.msh %.10f f_pointwise abs(f_pointwise(x,y,z)-f(x,y,z))

INTEGRATE (f_pointwise(x,y,z)-f(x,y,z))^2 RESULT num
INTEGRATE 1                               RESULT den
PRINT num/den