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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TurTLE
TurTLE
Commits
cbf0c9fe
Commit
cbf0c9fe
authored
Dec 4, 2015
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
tox_plain works for py3
parent
756afc2d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
bfps/__init__.py
+1
-1
1 addition, 1 deletion
bfps/__init__.py
bfps/base.py
+2
-4
2 additions, 4 deletions
bfps/base.py
bfps/code.py
+1
-1
1 addition, 1 deletion
bfps/code.py
tests/test_plain.py
+3
-3
3 additions, 3 deletions
tests/test_plain.py
tox_plain.ini
+2
-1
2 additions, 1 deletion
tox_plain.ini
with
9 additions
and
10 deletions
bfps/__init__.py
+
1
−
1
View file @
cbf0c9fe
...
...
@@ -49,7 +49,7 @@ except DistributionNotFound:
install_info
=
pickle
.
load
(
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
here
),
'
install_info.pickle
'
),
'
r
'
))
'
r
b
'
))
from
.code
import
code
from
.fluid_converter
import
fluid_converter
...
...
...
...
This diff is collapsed.
Click to expand it.
bfps/base.py
+
2
−
4
View file @
cbf0c9fe
...
...
@@ -48,8 +48,7 @@ class base(object):
self
.
simname
=
simname
return
None
def
cdef_pars
(
self
):
key
=
self
.
parameters
.
keys
()
key
.
sort
()
key
=
sorted
(
list
(
self
.
parameters
.
keys
()))
src_txt
=
''
for
i
in
range
(
len
(
key
)):
if
type
(
self
.
parameters
[
key
[
i
]])
==
int
:
...
...
@@ -60,8 +59,7 @@ class base(object):
src_txt
+=
'
double
'
+
key
[
i
]
+
'
;
\n
'
return
src_txt
def
cread_pars
(
self
):
key
=
self
.
parameters
.
keys
()
key
.
sort
()
key
=
sorted
(
list
(
self
.
parameters
.
keys
()))
src_txt
=
(
'
int read_parameters(hid_t data_file_id)
\n
{
\n
'
+
'
hid_t dset, memtype, space;
\n
'
+
'
hsize_t dims[1];
\n
'
...
...
...
...
This diff is collapsed.
Click to expand it.
bfps/code.py
+
1
−
1
View file @
cbf0c9fe
...
...
@@ -139,7 +139,7 @@ class code(base):
raise
IOError
(
'
header not there:
\n
'
+
'
{0}
\n
'
.
format
(
os
.
path
.
join
(
bfps
.
header_dir
,
'
base.hpp
'
))
+
'
{0}
\n
'
.
format
(
bfps
.
dist_loc
))
libraries
=
[
'
bfps
'
]
+
bfps
.
install_info
[
'
libraries
'
]
libraries
=
[
'
bfps
.cpython-34m
'
]
+
bfps
.
install_info
[
'
libraries
'
]
command_strings
=
[
'
g++
'
]
command_strings
+=
[
self
.
name
+
'
.cpp
'
,
'
-o
'
,
self
.
name
]
...
...
...
...
This diff is collapsed.
Click to expand it.
tests/test_plain.py
+
3
−
3
View file @
cbf0c9fe
...
...
@@ -46,12 +46,12 @@ def plain(opt):
assert
(
opt
.
niter_todo
%
3
==
0
)
opt
.
work_dir
=
wd
+
'
/N{0:0>3x}_2
'
.
format
(
opt
.
n
)
opt
.
njobs
*=
2
opt
.
niter_todo
/
=
2
opt
.
niter_todo
=
opt
.
niter_todo
//
2
c1
=
launch
(
opt
,
dt
=
c0
.
parameters
[
'
dt
'
])
c1
.
compute_statistics
()
opt
.
work_dir
=
wd
+
'
/N{0:0>3x}_3
'
.
format
(
opt
.
n
)
opt
.
njobs
=
3
*
opt
.
njobs
/
2
opt
.
niter_todo
=
2
*
opt
.
niter_todo
/
3
opt
.
njobs
=
3
*
opt
.
njobs
/
/
2
opt
.
niter_todo
=
2
*
opt
.
niter_todo
/
/
3
c2
=
launch
(
opt
,
dt
=
c0
.
parameters
[
'
dt
'
])
c2
.
compute_statistics
()
# plot energy and enstrophy
...
...
...
...
This diff is collapsed.
Click to expand it.
tox_plain.ini
+
2
−
1
View file @
cbf0c9fe
[tox]
envlist
=
py
27
envlist
=
py
34
[testenv]
deps
=
matplotlib
whitelist_externals
=
echo
cp
...
...
...
...
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
sign in
to comment