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
e9fecfa5
Commit
e9fecfa5
authored
5 years ago
by
sniklas142
Browse files
Options
Downloads
Patches
Plain Diff
added saving of vel moments and histogramm to ou_test
parent
5bcd6bc1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TurTLE/TEST.py
+6
-0
6 additions, 0 deletions
TurTLE/TEST.py
cpp/full_code/ornstein_uhlenbeck_test.cpp
+11
-7
11 additions, 7 deletions
cpp/full_code/ornstein_uhlenbeck_test.cpp
with
17 additions
and
7 deletions
TurTLE/TEST.py
+
6
−
0
View file @
e9fecfa5
...
@@ -380,7 +380,13 @@ class TEST(_code):
...
@@ -380,7 +380,13 @@ class TEST(_code):
if
(
self
.
dns_type
==
'
ornstein_uhlenbeck_test
'
):
if
(
self
.
dns_type
==
'
ornstein_uhlenbeck_test
'
):
with
h5py
.
File
(
os
.
path
.
join
(
self
.
work_dir
,
self
.
simname
+
'
_ou_output.h5
'
),
'
a
'
)
as
ofile
:
with
h5py
.
File
(
os
.
path
.
join
(
self
.
work_dir
,
self
.
simname
+
'
_ou_output.h5
'
),
'
a
'
)
as
ofile
:
ofile
.
require_group
(
'
spectra
'
)
ofile
.
require_group
(
'
spectra
'
)
ofile
.
require_group
(
'
moments
'
)
ofile
.
require_group
(
'
histograms
'
)
ofile
[
'
spectra
'
].
create_dataset
(
'
ou_spectra
'
,
(
1
,
300
,
3
,
3
),
dtype
=
np
.
float
)
ofile
[
'
spectra
'
].
create_dataset
(
'
ou_spectra
'
,
(
1
,
300
,
3
,
3
),
dtype
=
np
.
float
)
ofile
[
'
moments
'
].
create_dataset
(
'
ou
'
,
(
1
,
10
,
3
),
dtype
=
np
.
float
)
ofile
[
'
histograms
'
].
create_dataset
(
'
ou
'
,
(
1
,
128
,
3
),
dtype
=
np
.
float
)
self
.
run
(
self
.
run
(
nb_processes
=
opt
.
nb_processes
,
nb_processes
=
opt
.
nb_processes
,
...
...
This diff is collapsed.
Click to expand it.
cpp/full_code/ornstein_uhlenbeck_test.cpp
+
11
−
7
View file @
e9fecfa5
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
#include
"scope_timer.hpp"
#include
"scope_timer.hpp"
template
<
typename
rnumber
>
template
<
typename
rnumber
>
int
ornstein_uhlenbeck_test
<
rnumber
>::
initialize
(
void
)
int
ornstein_uhlenbeck_test
<
rnumber
>::
initialize
(
void
)
{
{
...
@@ -67,19 +66,24 @@ int ornstein_uhlenbeck_test<rnumber>::do_work(void)
...
@@ -67,19 +66,24 @@ int ornstein_uhlenbeck_test<rnumber>::do_work(void)
{
{
this
->
ou
->
step
(
1e-3
);
this
->
ou
->
step
(
1e-3
);
}
}
hid_t
gg
;
hid_t
out_file
;
if
(
this
->
myrank
==
0
)
{
if
(
this
->
myrank
==
0
)
{
gg
=
H5Fopen
(
"test_ou_output.h5"
,
H5F_ACC_RDWR
,
H5P_DEFAULT
);
out_file
=
H5Fopen
(
"test_ou_output.h5"
,
H5F_ACC_RDWR
,
H5P_DEFAULT
);
std
::
cerr
<<
"peep"
<<
std
::
endl
;
//DELETE
}
}
// if (this->myrank == 0) gt = H5Fopen((this->simname + std::string(".h5")).c_str(), H5F_ACC_RDWR, H5P_DEFAULT);
// this->ou->kk->store(gt);
this
->
ou
->
kk
->
template
cospectrum
<
rnumber
,
THREE
>(
this
->
ou
->
kk
->
template
cospectrum
<
rnumber
,
THREE
>(
this
->
ou
->
ou_field
->
get_cdata
(),
this
->
ou
->
ou_field
->
get_cdata
(),
this
->
ou
->
ou_field
->
get_cdata
(),
this
->
ou
->
ou_field
->
get_cdata
(),
gg
,
"ou_spectra"
,
0
);
out_file
,
"ou_spectra"
,
0
);
this
->
ou
->
ou_field
->
ift
();
std
::
vector
<
double
>
me
;
me
.
resize
(
3
);
std
::
fill
(
me
.
begin
(),
me
.
end
(),
30
);
// this->ou->ou_field->template compute_rspace_stats<rnumber, FFTW, THREE>(out_file, "ou", 0, me);
this
->
ou
->
ou_field
->
compute_rspace_stats
(
out_file
,
"ou"
,
0
,
me
);
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
...
...
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