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
738102b6
There was a problem fetching the pipeline summary.
Commit
738102b6
authored
Apr 20, 2018
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
code runs with no obvious errors
parent
520a5356
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!23
WIP: Feature/use cmake
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/TEST.py
+15
-0
15 additions, 0 deletions
bfps/TEST.py
bfps/cpp/full_code/test_interpolation.cpp
+3
-0
3 additions, 0 deletions
bfps/cpp/full_code/test_interpolation.cpp
with
18 additions
and
0 deletions
bfps/TEST.py
+
15
−
0
View file @
738102b6
...
...
@@ -37,6 +37,7 @@ import warnings
import
bfps
from
._code
import
_code
from
bfps
import
tools
from
bfps
import
DNS
class
TEST
(
_code
):
"""
This class is meant to stitch together the C++ code into a final source file,
...
...
@@ -339,6 +340,20 @@ class TEST(_code):
pbase_shape
+
(
ncomponents
,)),
dtype
=
np
.
float
)
if
type
(
particle_initial_condition
)
==
type
(
None
):
ofile
[
'
tracers0/state/0
'
][:]
=
np
.
random
.
random
(
pbase_shape
+
(
ncomponents
,))
*
2
*
np
.
pi
else
:
ofile
[
'
tracers0/state/0
'
][:]
=
particle_initial_condition
with
h5py
.
File
(
os
.
path
.
join
(
self
.
work_dir
,
self
.
simname
+
'
_input.h5
'
),
'
a
'
)
as
ofile
:
data
=
DNS
.
generate_vector_field
(
self
,
write_to_file
=
False
,
spectra_slope
=
1.0
,
amplitude
=
0.05
)
ofile
[
'
vorticity/complex/{0}
'
.
format
(
0
)]
=
data
with
h5py
.
File
(
os
.
path
.
join
(
self
.
work_dir
,
self
.
simname
+
'
_output.h5
'
),
'
a
'
)
as
ofile
:
ofile
.
require_group
(
'
tracers0
'
)
for
kk
in
[
'
velocity
'
,
'
vorticity
'
,
'
velocity_gradient
'
]:
ofile
[
'
tracers0
'
].
require_group
(
kk
)
self
.
run
(
nb_processes
=
opt
.
nb_processes
,
nb_threads_per_process
=
opt
.
nb_threads_per_process
,
...
...
...
...
This diff is collapsed.
Click to expand it.
bfps/cpp/full_code/test_interpolation.cpp
+
3
−
0
View file @
738102b6
...
...
@@ -24,10 +24,12 @@ int test_interpolation<rnumber>::read_parameters(void)
template
<
typename
rnumber
>
int
test_interpolation
<
rnumber
>::
initialize
(
void
)
{
this
->
read_parameters
();
this
->
vorticity
=
new
field
<
rnumber
,
FFTW
,
THREE
>
(
this
->
nx
,
this
->
ny
,
this
->
nz
,
this
->
comm
,
DEFAULT_FFTW_FLAG
);
this
->
vorticity
->
real_space_representation
=
false
;
this
->
velocity
=
new
field
<
rnumber
,
FFTW
,
THREE
>
(
this
->
nx
,
this
->
ny
,
this
->
nz
,
...
...
@@ -97,6 +99,7 @@ int test_interpolation<rnumber>::do_work()
{
std
::
string
fname
=
this
->
simname
+
std
::
string
(
"_input.h5"
);
// read vorticity field
this
->
vorticity
->
real_space_representation
=
false
;
this
->
vorticity
->
io
(
fname
,
"vorticity"
,
...
...
...
...
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