Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
SWIFT
SWIFTsim
Commits
e6835d95
Commit
e6835d95
authored
2 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Do not verify the trigger size vs. the snapshot list any more
parent
e27b2a02
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!1715
Update planetary strength after planetary plus's master rebase
,
!1693
More threapool plotting tweaks
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/engine.h
+0
-1
0 additions, 1 deletion
src/engine.h
src/engine_config.c
+0
-4
0 additions, 4 deletions
src/engine_config.c
src/engine_io.c
+0
-144
0 additions, 144 deletions
src/engine_io.c
with
0 additions
and
149 deletions
src/engine.h
+
0
−
1
View file @
e6835d95
...
@@ -690,7 +690,6 @@ void engine_allocate_foreign_particles(struct engine *e, const int fof);
...
@@ -690,7 +690,6 @@ void engine_allocate_foreign_particles(struct engine *e, const int fof);
void
engine_print_stats
(
struct
engine
*
e
);
void
engine_print_stats
(
struct
engine
*
e
);
void
engine_io
(
struct
engine
*
e
);
void
engine_io
(
struct
engine
*
e
);
void
engine_io_check_snapshot_triggers
(
struct
engine
*
e
);
void
engine_io_check_snapshot_triggers
(
struct
engine
*
e
);
void
engine_io_verify_triggers_size
(
const
struct
engine
*
e
);
void
engine_collect_end_of_step
(
struct
engine
*
e
,
int
apply
);
void
engine_collect_end_of_step
(
struct
engine
*
e
,
int
apply
);
void
engine_collect_end_of_sub_cycle
(
struct
engine
*
e
);
void
engine_collect_end_of_sub_cycle
(
struct
engine
*
e
);
void
engine_dump_snapshot
(
struct
engine
*
e
);
void
engine_dump_snapshot
(
struct
engine
*
e
);
...
...
This diff is collapsed.
Click to expand it.
src/engine_config.c
+
0
−
4
View file @
e6835d95
...
@@ -613,10 +613,6 @@ void engine_config(int restart, int fof, struct engine *e,
...
@@ -613,10 +613,6 @@ void engine_config(int restart, int fof, struct engine *e,
/* Read (or re-read the list of outputs */
/* Read (or re-read the list of outputs */
engine_init_output_lists
(
e
,
params
,
e
->
output_options
);
engine_init_output_lists
(
e
,
params
,
e
->
output_options
);
/* Verify that the snapshot triggers are compatible with the
* output list */
engine_io_verify_triggers_size
(
e
);
/* Check whether output quantities make sense */
/* Check whether output quantities make sense */
if
(
e
->
policy
&
engine_policy_cosmology
)
{
if
(
e
->
policy
&
engine_policy_cosmology
)
{
...
...
This diff is collapsed.
Click to expand it.
src/engine_io.c
+
0
−
144
View file @
e6835d95
...
@@ -1449,147 +1449,3 @@ void engine_io_check_snapshot_triggers(struct engine *e) {
...
@@ -1449,147 +1449,3 @@ void engine_io_check_snapshot_triggers(struct engine *e) {
}
}
}
}
}
}
void
check_triggers
(
const
struct
engine
*
e
,
const
double
snapshot_delta
)
{
return
;
/* Verify the part triggers */
for
(
int
i
=
0
;
i
<
num_snapshot_triggers_part
;
++
i
)
{
if
(
e
->
snapshot_recording_triggers_part
[
i
]
>
snapshot_delta
)
{
error
(
"The recording time for the part trigger %d (dt=%e) is longer "
"than the time between snapshots (dt=%e)"
,
i
,
e
->
snapshot_recording_triggers_part
[
i
],
snapshot_delta
);
}
}
/* Verify the spart triggers */
for
(
int
i
=
0
;
i
<
num_snapshot_triggers_spart
;
++
i
)
{
if
(
e
->
snapshot_recording_triggers_spart
[
i
]
>
snapshot_delta
)
{
error
(
"The recording time for the spart trigger %d (dt=%e) is longer "
"than the time between snapshots (dt=%e)"
,
i
,
e
->
snapshot_recording_triggers_spart
[
i
],
snapshot_delta
);
}
}
/* Verify the bpart triggers */
for
(
int
i
=
0
;
i
<
num_snapshot_triggers_bpart
;
++
i
)
{
if
(
e
->
snapshot_recording_triggers_bpart
[
i
]
>
snapshot_delta
)
{
error
(
"The recording time for the bpart trigger %d (dt=%e) is longer "
"than the time between snapshots (dt=%e)"
,
i
,
e
->
snapshot_recording_triggers_bpart
[
i
],
snapshot_delta
);
}
}
}
/**
* @brief Verify that the triggers provided by the user are not
* overlapping with the snapshot times.
*
* Deals witht the case of a regular snapshot pattern and output list.
*
* @param e The #engine.
*/
void
engine_io_verify_triggers_size
(
const
struct
engine
*
e
)
{
/* Stop if we have nothing to do */
if
(
num_snapshot_triggers_part
==
0
&&
num_snapshot_triggers_spart
==
0
&&
num_snapshot_triggers_bpart
==
0
)
return
;
if
(
e
->
output_list_snapshots
)
{
/* Case where an output list is used */
if
(
e
->
policy
&
engine_policy_cosmology
)
{
/* Loop over all the snapshot gaps */
for
(
size_t
i
=
0
;
i
<
e
->
output_list_snapshots
->
size
-
1
;
++
i
)
{
const
double
a
=
e
->
output_list_snapshots
->
times
[
i
];
const
double
a_next
=
e
->
output_list_snapshots
->
times
[
i
+
1
];
const
double
snapshot_delta
=
cosmology_get_delta_time_from_scale_factors
(
e
->
cosmology
,
a
,
a_next
);
/* Do the verification */
check_triggers
(
e
,
snapshot_delta
);
}
/* Also verify what happens before the first snapshot */
const
double
snapshot_delta_first
=
cosmology_get_delta_time_from_scale_factors
(
e
->
cosmology
,
e
->
time_begin
,
e
->
output_list_snapshots
->
times
[
0
]);
/* Do the verification */
check_triggers
(
e
,
snapshot_delta_first
);
}
else
{
/* Loop over all the snapshot gaps */
for
(
size_t
i
=
0
;
i
<
e
->
output_list_snapshots
->
size
-
1
;
++
i
)
{
const
double
time
=
e
->
output_list_snapshots
->
times
[
i
];
const
double
time_next
=
e
->
output_list_snapshots
->
times
[
i
+
1
];
const
double
snapshot_delta
=
time_next
-
time
;
/* Do the verification */
check_triggers
(
e
,
snapshot_delta
);
}
/* Also verify what happens before the first snapshot */
const
double
snapshot_delta_first
=
e
->
output_list_snapshots
->
times
[
0
]
-
e
->
time_begin
;
/* Do the verification */
check_triggers
(
e
,
snapshot_delta_first
);
}
}
else
{
/* Case where we have a regular pattern */
if
(
e
->
policy
&
engine_policy_cosmology
)
{
/* Loop over all the snapshot gaps */
for
(
double
a
=
e
->
a_first_snapshot
;
a
<=
e
->
time_end
;
a
*=
e
->
delta_time_snapshot
)
{
const
double
a_next
=
a
*
e
->
delta_time_snapshot
;
const
double
snapshot_delta
=
cosmology_get_delta_time_from_scale_factors
(
e
->
cosmology
,
a
,
a_next
);
/* Do the verification */
check_triggers
(
e
,
snapshot_delta
);
}
/* Also verify what happens before the first snapshot */
const
double
snapshot_delta_first
=
cosmology_get_delta_time_from_scale_factors
(
e
->
cosmology
,
e
->
time_begin
,
e
->
a_first_snapshot
);
/* Do the verification */
check_triggers
(
e
,
snapshot_delta_first
);
}
else
{
/* Simplest case: the delta is constant */
const
double
snapshot_delta
=
e
->
delta_time_snapshot
;
/* Do the verification */
check_triggers
(
e
,
snapshot_delta
);
/* Also verify what happens before the first snapshot */
const
double
snapshot_delta_first
=
e
->
time_first_snapshot
-
e
->
time_begin
;
/* Do the verification */
check_triggers
(
e
,
snapshot_delta_first
);
}
}
}
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