Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TurTLE
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
Service Desk
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
TurTLE
TurTLE
Commits
4cd6b342
There was a problem fetching the pipeline summary.
Commit
4cd6b342
authored
7 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
finalize velocity gradient interpolation test
parent
cf1d40f4
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!23
WIP: Feature/use cmake
Pipeline
#
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bfps/test/test_interpolation.py
+3
-8
3 additions, 8 deletions
bfps/test/test_interpolation.py
with
3 additions
and
8 deletions
bfps/test/test_interpolation.py
+
3
−
8
View file @
4cd6b342
...
@@ -34,20 +34,15 @@ def main():
...
@@ -34,20 +34,15 @@ def main():
'
r
'
)
'
r
'
)
pos0
=
ifile
[
'
tracers0/state/0
'
].
value
pos0
=
ifile
[
'
tracers0/state/0
'
].
value
pos1
=
ofile
[
'
tracers0/position/0
'
].
value
pos1
=
ofile
[
'
tracers0/position/0
'
].
value
print
(
'
maximum position error is
'
,
np
.
max
(
np
.
abs
(
pos0
-
pos1
)
/
np
.
abs
(
pos0
)))
assert
(
np
.
max
(
np
.
abs
(
pos0
-
pos1
)
/
np
.
abs
(
pos0
))
<=
1e-5
)
vort0
=
ofile
[
'
tracers0/vorticity/0
'
].
value
vort0
=
ofile
[
'
tracers0/vorticity/0
'
].
value
print
(
vort0
)
vel_gradient
=
ofile
[
'
tracers0/velocity_gradient/0
'
].
value
vel_gradient
=
ofile
[
'
tracers0/velocity_gradient/0
'
].
value
print
(
vel_gradient
)
vort1
=
vort0
.
copy
()
vort1
=
vort0
.
copy
()
vort1
[:,
0
]
=
vel_gradient
[:,
7
]
-
vel_gradient
[:,
5
]
vort1
[:,
1
]
=
vel_gradient
[:,
2
]
-
vel_gradient
[:,
6
]
vort1
[:,
2
]
=
vel_gradient
[:,
3
]
-
vel_gradient
[:,
1
]
print
(
np
.
abs
(
vort0
-
vort1
)
/
np
.
abs
(
vort0
))
vort1
[:,
0
]
=
vel_gradient
[:,
5
]
-
vel_gradient
[:,
7
]
vort1
[:,
0
]
=
vel_gradient
[:,
5
]
-
vel_gradient
[:,
7
]
vort1
[:,
1
]
=
vel_gradient
[:,
6
]
-
vel_gradient
[:,
2
]
vort1
[:,
1
]
=
vel_gradient
[:,
6
]
-
vel_gradient
[:,
2
]
vort1
[:,
2
]
=
vel_gradient
[:,
1
]
-
vel_gradient
[:,
3
]
vort1
[:,
2
]
=
vel_gradient
[:,
1
]
-
vel_gradient
[:,
3
]
print
(
np
.
abs
(
vort0
-
vort1
)
/
np
.
abs
(
vort0
))
assert
(
np
.
max
(
np
.
abs
(
vort0
-
vort1
)
/
np
.
abs
(
vort0
))
<=
1e-5
)
print
(
'
SUCCESS! Interpolated vorticity agrees with vorticity from interpolated velocity gradient.
'
)
return
None
return
None
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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