Commit aa29e66d authored by Eoin Clerkin's avatar Eoin Clerkin
Browse files

Turns off test when the element mass or mass is of length zero.

This is to stop vaccumm medium from tripping failure.
parent 86b36448
......@@ -33,7 +33,6 @@ FS="[\t ]*"; # Spaces and tags as field seperators in media.geo
for (i = 1; i<=NF; i++)datum[i]=$i; # Loading in a line from media.geo fle to make it easy to work with.
RELATIVE_SUM=0;
content_by="weight"; # The relative content is by number of each atom or by relative weight of each atom.
......@@ -76,10 +75,14 @@ for (i = 1; i<=NF; i++)datum[i]=$i; # Loading in a line from media.geo fle to ma
# datum[2 + 2*datum[2] + 1] is the overall density of the material
# datum[3 + 2*datum[2] + i] is the subsequent relative amount of each compoment.
ERROR = abs( (datum[2+i] - ELEMENT_MASS[strtonum(datum[2+i+datum[2]])] )/datum[2+i])
# printf "PAUSE: %s %s %s", datum[2+i], ELEMENT_MASS[strtonum(datum[2+i+datum[2]])], ERROR;
printf "1 MASS ENTERED %s \n", datum[2+i];
printf "2 ELEMENT MASS %s \n", ELEMENT_MASS[strtonum(datum[2+i+datum[2]])];
if ( length(datum[2+i])!=0 && length(ELEMENT_MASS[strtonum(datum[2+i+datum[2]])])!=0 ){
ERROR = abs( (datum[2+i] - ELEMENT_MASS[strtonum(datum[2+i+datum[2]])] )/datum[2+i])
};
if(datum[2]>1){ # Checks relatavant for more than one component.
if(content_by~"number"){ # When the elements are per their relative number.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment