**compare g_file_file#

Description#

This comparison is a generalized-file-file method, based on point densities. The user therefore has to think about the distribution of comparison points (either in the simulation or reference files) in order to best control the quality of error estimation. Either file (ref or simulation) can have more points, and the points of the smaller will be interpolated between points of the larger file. This assumes that the larger file will have points who’s linear segment will more closely approximate the real curve.

Files must contain continous “column” data of real (floating point format) values. Lines can be commented with % or #.

The function to be optimized is given by:

(506)#\[{\cal F}_i = \frac{1}{N}\sum_k^N\left[\frac{y_{s_k}-\bar{y}_k}{\vert y_{s_{ref_k}}\vert}\right]^2\]

with \(\bar{y}_k\) being the interpolated value from the smaller file, and \(y_{s_k}\) the test value from the smaller file. \(y_{s_{ref_k}}\) is the points value in the reference file (“experiment” file), which may be an interpolated point if that file was smaller.

Syntax#

g_file_file sim-file sx sy exp-file ex ey \(~\,~\,~\,~\,\) [weight vweight]

sim-file is the simulation file, which the optimization variables \(x\) should be changing, exp-file is the “reference” which is the goal (should not change during optimization). sx and sy are the x and y columns of the simulation file, and ex and ey are the x and y columns of the reference file.

Note

One is advised to make sure that the \(x\) variables are continuously increasing, as a comparison of multi-valued functions or data curves are not allowed. In normal use, time makes a very useful \(x\) variable, although a control parameter such as strain could be used as well. The measure of error may differ quite significantly from the t_file_file output, so if it is desired to mix the two types of comparison, use of the weight values will be very useful.