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
032fe7b8
Commit
032fe7b8
authored
9 years ago
by
Cristian Lalescu
Browse files
Options
Downloads
Patches
Plain Diff
compute stats at proper times
parent
28e7b984
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfps/fluid_base.py
+2
-5
2 additions, 5 deletions
bfps/fluid_base.py
tests/base.py
+0
-1
0 additions, 1 deletion
tests/base.py
with
2 additions
and
6 deletions
bfps/fluid_base.py
+
2
−
5
View file @
032fe7b8
...
@@ -193,8 +193,6 @@ class fluid_particle_base(bfps.code):
...
@@ -193,8 +193,6 @@ class fluid_particle_base(bfps.code):
MPI_Finalize();
MPI_Finalize();
return EXIT_SUCCESS;
return EXIT_SUCCESS;
}
}
do_stats();
do_particle_stats();
//endcpp
//endcpp
"""
"""
output_time_difference
=
(
'
time1 = clock();
\n
'
+
output_time_difference
=
(
'
time1 = clock();
\n
'
+
...
@@ -209,12 +207,11 @@ class fluid_particle_base(bfps.code):
...
@@ -209,12 +207,11 @@ class fluid_particle_base(bfps.code):
self
.
main
+=
'
for (int max_iter = iteration+niter_todo; iteration < max_iter; iteration++)
\n
'
self
.
main
+=
'
for (int max_iter = iteration+niter_todo; iteration < max_iter; iteration++)
\n
'
self
.
main
+=
'
{
\n
'
self
.
main
+=
'
{
\n
'
self
.
main
+=
output_time_difference
self
.
main
+=
output_time_difference
if
self
.
particle_species
>
0
:
self
.
main
+=
self
.
particle_loop
self
.
main
+=
self
.
fluid_loop
self
.
main
+=
'
if (iteration % niter_stat == 0) do_stats();
\n
'
self
.
main
+=
'
if (iteration % niter_stat == 0) do_stats();
\n
'
if
self
.
particle_species
>
0
:
if
self
.
particle_species
>
0
:
self
.
main
+=
'
if (iteration % niter_part == 0) do_particle_stats();
\n
'
self
.
main
+=
'
if (iteration % niter_part == 0) do_particle_stats();
\n
'
self
.
main
+=
self
.
particle_loop
self
.
main
+=
self
.
fluid_loop
self
.
main
+=
'
}
\n
'
self
.
main
+=
'
}
\n
'
self
.
main
+=
output_time_difference
self
.
main
+=
output_time_difference
self
.
main
+=
'
do_stats();
\n
'
self
.
main
+=
'
do_stats();
\n
'
...
...
This diff is collapsed.
Click to expand it.
tests/base.py
+
0
−
1
View file @
032fe7b8
...
@@ -99,7 +99,6 @@ def launch(
...
@@ -99,7 +99,6 @@ def launch(
else
:
else
:
c
.
parameters
[
'
dt
'
]
=
dt
c
.
parameters
[
'
dt
'
]
=
dt
c
.
parameters
[
'
niter_out
'
]
=
c
.
parameters
[
'
niter_todo
'
]
c
.
parameters
[
'
niter_out
'
]
=
c
.
parameters
[
'
niter_todo
'
]
c
.
parameters
[
'
niter_part
'
]
=
1
c
.
parameters
[
'
famplitude
'
]
=
0.2
c
.
parameters
[
'
famplitude
'
]
=
0.2
c
.
fill_up_fluid_code
()
c
.
fill_up_fluid_code
()
if
c
.
parameters
[
'
nparticles
'
]
>
0
:
if
c
.
parameters
[
'
nparticles
'
]
>
0
:
...
...
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