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
d3c230dc
Commit
d3c230dc
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Redirect the output of SWIFT to a output file
parent
494177c3
No related branches found
No related tags found
1 merge request
!242
Add the cooling infrastructure and the const_du and const_lambda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/CoolingBox/run.sh
+1
-1
1 addition, 1 deletion
examples/CoolingBox/run.sh
examples/main.c
+11
-11
11 additions, 11 deletions
examples/main.c
with
12 additions
and
12 deletions
examples/CoolingBox/run.sh
+
1
−
1
View file @
d3c230dc
...
@@ -5,6 +5,6 @@ echo "Generating initial conditions for the cooling box example..."
...
@@ -5,6 +5,6 @@ echo "Generating initial conditions for the cooling box example..."
python makeIC.py 10
python makeIC.py 10
../swift
-s
-t
1 coolingBox.yml
-C
../swift
-s
-t
1 coolingBox.yml
-C
2>&1 |
tee
output.log
python energy_plot.py 0
python energy_plot.py 0
This diff is collapsed.
Click to expand it.
examples/main.c
+
11
−
11
View file @
d3c230dc
...
@@ -330,17 +330,6 @@ int main(int argc, char *argv[]) {
...
@@ -330,17 +330,6 @@ int main(int argc, char *argv[]) {
struct
hydro_props
hydro_properties
;
struct
hydro_props
hydro_properties
;
hydro_props_init
(
&
hydro_properties
,
params
);
hydro_props_init
(
&
hydro_properties
,
params
);
/* Initialise the external potential properties */
struct
external_potential
potential
;
if
(
with_external_gravity
)
potential_init
(
params
,
&
prog_const
,
&
us
,
&
potential
);
if
(
with_external_gravity
&&
myrank
==
0
)
potential_print
(
&
potential
);
/* Initialise the cooling function properties */
struct
cooling_data
cooling
;
if
(
with_cooling
)
cooling_init
(
params
,
&
us
,
&
prog_const
,
&
cooling
);
if
(
with_cooling
&&
myrank
==
0
)
cooling_print
(
&
cooling
);
/* Read particles and space information from (GADGET) ICs */
/* Read particles and space information from (GADGET) ICs */
char
ICfileName
[
200
]
=
""
;
char
ICfileName
[
200
]
=
""
;
parser_get_param_string
(
params
,
"InitialConditions:file_name"
,
ICfileName
);
parser_get_param_string
(
params
,
"InitialConditions:file_name"
,
ICfileName
);
...
@@ -443,6 +432,17 @@ int main(int argc, char *argv[]) {
...
@@ -443,6 +432,17 @@ int main(int argc, char *argv[]) {
message
(
"nr of cells at depth %i is %i."
,
data
[
0
],
data
[
1
]);
message
(
"nr of cells at depth %i is %i."
,
data
[
0
],
data
[
1
]);
}
}
/* Initialise the external potential properties */
struct
external_potential
potential
;
if
(
with_external_gravity
)
potential_init
(
params
,
&
prog_const
,
&
us
,
&
potential
);
if
(
with_external_gravity
&&
myrank
==
0
)
potential_print
(
&
potential
);
/* Initialise the cooling function properties */
struct
cooling_data
cooling
;
if
(
with_cooling
)
cooling_init
(
params
,
&
us
,
&
prog_const
,
&
cooling
);
if
(
with_cooling
&&
myrank
==
0
)
cooling_print
(
&
cooling
);
/* Construct the engine policy */
/* Construct the engine policy */
int
engine_policies
=
ENGINE_POLICY
|
engine_policy_steal
;
int
engine_policies
=
ENGINE_POLICY
|
engine_policy_steal
;
if
(
with_drift_all
)
engine_policies
|=
engine_policy_drift_all
;
if
(
with_drift_all
)
engine_policies
|=
engine_policy_drift_all
;
...
...
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