Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot_geometry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eoin Clerkin
cbmroot_geometry
Commits
aa29e66d
Commit
aa29e66d
authored
4 years ago
by
Eoin Clerkin
Browse files
Options
Downloads
Patches
Plain Diff
Turns off test when the element mass or mass is of length zero.
This is to stop vaccumm medium from tripping failure.
parent
86b36448
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
static_check.awk
+5
-2
5 additions, 2 deletions
static_check.awk
with
5 additions
and
2 deletions
static_check.awk
+
5
−
2
View file @
aa29e66d
...
@@ -33,7 +33,6 @@ FS="[\t ]*"; # Spaces and tags as field seperators in media.geo
...
@@ -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.
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
;
RELATIVE_SUM
=
0
;
content_by
=
"weight"
;
# The relative content is by number of each atom or by relative weight of each atom.
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
...
@@ -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[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.
# 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
"1 MASS ENTERED %s \n"
,
datum
[
2
+
i
];
printf
"2 ELEMENT MASS %s \n"
,
ELEMENT_MASS
[
strtonum
(
datum
[
2
+
i
+
datum
[
2
]])];
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
(
datum
[
2
]
>
1
){
# Checks relatavant for more than one component.
if
(
content_by
~
"number"
){
# When the elements are per their relative number.
if
(
content_by
~
"number"
){
# When the elements are per their relative number.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment