Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
dumux-repositories
dumux
Commits
be87983d
Commit
be87983d
authored
5 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test] Remove numpy dependency
parent
d842874f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1652
[test] Remove numpy dependency
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/freeflow/navierstokes/sincos/convergencetest.py
+6
-4
6 additions, 4 deletions
test/freeflow/navierstokes/sincos/convergencetest.py
with
6 additions
and
4 deletions
test/freeflow/navierstokes/sincos/convergencetest.py
+
6
−
4
View file @
be87983d
...
...
@@ -3,7 +3,6 @@
from
math
import
*
import
subprocess
import
sys
import
numpy
if
len
(
sys
.
argv
)
<
2
:
sys
.
stderr
.
write
(
'
Please provide a single argument <testname> to the script
\n
'
)
...
...
@@ -63,16 +62,19 @@ logfile.close()
print
(
"
\n
Computed the following convergence rates for {}:
\n
"
.
format
(
testname
))
subprocess
.
call
([
'
cat
'
,
testname
+
'
.log
'
])
def
mean
(
numbers
):
return
float
(
sum
(
numbers
))
/
len
(
numbers
)
# check the rates, we expect rates around 2
if
int
(
numpy
.
mean
(
resultsP
)
<
2.05
and
numpy
.
mean
(
resultsP
)
<
1.95
)
:
if
mean
(
resultsP
)
<
2.05
and
mean
(
resultsP
)
<
1.95
:
sys
.
stderr
.
write
(
"
*
"
*
70
+
"
\n
"
+
"
The convergence rates for pressure were not close enough to 2! Test failed.
\n
"
+
"
*
"
*
70
+
"
\n
"
)
sys
.
exit
(
1
)
if
int
(
numpy
.
mean
(
resultsVx
)
<
2.05
and
numpy
.
mean
(
resultsVx
)
<
1.95
)
:
if
mean
(
resultsVx
)
<
2.05
and
mean
(
resultsVx
)
<
1.95
:
sys
.
stderr
.
write
(
"
*
"
*
70
+
"
\n
"
+
"
The convergence rates for x-velocity were not close enough to 2! Test failed.
\n
"
+
"
*
"
*
70
+
"
\n
"
)
sys
.
exit
(
1
)
if
int
(
numpy
.
mean
(
resultsVy
)
<
2.05
and
numpy
.
mean
(
resultsVy
)
<
1.95
)
:
if
mean
(
resultsVy
)
<
2.05
and
mean
(
resultsVy
)
<
1.95
:
sys
.
stderr
.
write
(
"
*
"
*
70
+
"
\n
"
+
"
The convergence rates for y-velocity were not close enough to 2! Test failed.
\n
"
+
"
*
"
*
70
+
"
\n
"
)
sys
.
exit
(
1
)
...
...
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