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
4b2d5307
Commit
4b2d5307
authored
9 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
fix interpolation comparison
parent
f4ce2f1f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
done.txt
+1
-0
1 addition, 0 deletions
done.txt
tests/test_interpolation.py
+30
-22
30 additions, 22 deletions
tests/test_interpolation.py
todo.txt
+0
-1
0 additions, 1 deletion
todo.txt
tox_interpolation.ini
+0
-21
0 additions, 21 deletions
tox_interpolation.ini
with
31 additions
and
44 deletions
done.txt
+
1
−
0
View file @
4b2d5307
...
@@ -3,3 +3,4 @@ x 2015-12-23 decide on versioning system
...
@@ -3,3 +3,4 @@ x 2015-12-23 decide on versioning system
x 2015-12-24 move get_grid coords to interpolator @optimization +v1.0
x 2015-12-24 move get_grid coords to interpolator @optimization +v1.0
x 2015-12-25 get rid of temporal interpolation @optimization +v1.0
x 2015-12-25 get rid of temporal interpolation @optimization +v1.0
x 2015-12-26 call interpolation only when needed @optimization +v1.0
x 2015-12-26 call interpolation only when needed @optimization +v1.0
x 2015-12-26 clean up tox files, make sure all tests run @tests +v1.0
This diff is collapsed.
Click to expand it.
tests/test_interpolation.py
+
30
−
22
View file @
4b2d5307
#! /usr/bin/env python2
#######################################################################
#######################################################################
# #
# #
# Copyright 2015 Max Planck Institute #
# Copyright 2015 Max Planck Institute #
...
@@ -26,35 +25,44 @@
...
@@ -26,35 +25,44 @@
import
numpy
as
np
import
numpy
as
np
from
test_
base
import
*
from
base
import
*
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
class
test_interpolation
(
bfps
.
NavierStokes
):
def
__init__
(
self
,
name
=
'
test_interpolation
'
,
work_dir
=
'
./
'
,
simname
=
'
test
'
):
super
(
test_interpolation
,
self
).
__init__
(
work_dir
=
work_dir
,
simname
=
simname
,
name
=
name
,
frozen_fields
=
True
)
return
None
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
opt
=
parser
.
parse_args
()
opt
=
parser
.
parse_args
(
c
=
test_interpolation
(
work_dir
=
opt
.
work_dir
+
'
/io
'
)
[
'
-n
'
,
'
32
'
,
'
--run
'
,
'
--ncpu
'
,
'
2
'
,
'
--initialize
'
,
'
--neighbours
'
,
'
4
'
,
'
--smoothness
'
,
'
1
'
,
'
--nparticles
'
,
'
4225
'
,
'
--niter_todo
'
,
'
1
'
,
'
--niter_stat
'
,
'
1
'
,
'
--niter_part
'
,
'
1
'
,
'
--niter_out
'
,
'
1
'
,
'
--wd
'
,
'
interp
'
]
+
sys
.
argv
[
1
:])
c
=
bfps
.
NavierStokes
(
name
=
'
test_interpolation
'
,
use_fftw_wisdom
=
False
,
frozen_fields
=
True
)
c
.
pars_from_namespace
(
opt
)
c
.
pars_from_namespace
(
opt
)
c
.
fill_up_fluid_code
()
c
.
add_particle_fields
(
name
=
'
n{0}m{1}
'
.
format
(
opt
.
neighbours
,
opt
.
smoothness
),
neighbours
=
opt
.
neighbours
,
smoothness
=
opt
.
smoothness
)
c
.
add_particle_fields
(
name
=
'
n{0}
'
.
format
(
opt
.
neighbours
),
neighbours
=
opt
.
neighbours
,
interp_type
=
'
Lagrange
'
)
c
.
add_particles
(
c
.
add_particles
(
integration_steps
=
1
,
integration_steps
=
1
,
neighbours
=
4
,
fields_name
=
'
n{0}m{1}
'
.
format
(
opt
.
neighbours
,
opt
.
smoothness
))
smoothness
=
1
)
c
.
add_particles
(
c
.
add_particles
(
integration_steps
=
1
,
integration_steps
=
1
,
neighbours
=
4
,
fields_name
=
'
n{0}
'
.
format
(
opt
.
neighbours
))
interp_type
=
'
Lagrange
'
)
c
.
fill_up_fluid_code
()
c
.
finalize_code
()
c
.
finalize_code
()
c
.
write_src
()
c
.
write_src
()
c
.
write_par
()
c
.
write_par
()
...
...
This diff is collapsed.
Click to expand it.
todo.txt
+
0
−
1
View file @
4b2d5307
(B) FFTW interpolator doesn't need its own field @optimization +v1.0
(B) FFTW interpolator doesn't need its own field @optimization +v1.0
(B) clean up tox files, make sure all tests run @tests +v1.0
(B) compute z polynomials only when needed @optimization +v1.0
(B) compute z polynomials only when needed @optimization +v1.0
(B) use less memory @optimization
(B) use less memory @optimization
(B) split library into core and extra @optimization +v1.0
(B) split library into core and extra @optimization +v1.0
...
...
This diff is collapsed.
Click to expand it.
tox_interpolation.ini
deleted
100644 → 0
+
0
−
21
View file @
f4ce2f1f
[tox]
envlist
=
py27
[testenv]
whitelist_externals
=
echo
cp
passenv
=
LD_LIBRARY_PATH
changedir
=
{envtmpdir}
commands
=
cp
-r
{toxinidir}/tests
{envtmpdir}
python
tests/test_interpolation.py
\
-n
32
--ncpu
2
\
--initialize
\
--nparticles
4225
\
--niter_todo
1
\
--niter_stat
1
\
--niter_part
1
\
--niter_out
1
\
--run
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