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
b32f33ab
Commit
b32f33ab
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added units to the gravity and hydro parameter outputs in the snapshots.
parent
1a9b5c53
No related branches found
No related tags found
1 merge request
!710
Snapshot offsets
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gravity_properties.c
+9
-7
9 additions, 7 deletions
src/gravity_properties.c
src/hydro_properties.c
+9
-3
9 additions, 3 deletions
src/hydro_properties.c
with
18 additions
and
10 deletions
src/gravity_properties.c
+
9
−
7
View file @
b32f33ab
...
@@ -170,20 +170,22 @@ void gravity_props_print_snapshot(hid_t h_grpgrav,
...
@@ -170,20 +170,22 @@ void gravity_props_print_snapshot(hid_t h_grpgrav,
io_write_attribute_s
(
h_grpgrav
,
"Softening style"
,
io_write_attribute_s
(
h_grpgrav
,
"Softening style"
,
kernel_gravity_softening_name
);
kernel_gravity_softening_name
);
io_write_attribute_f
(
io_write_attribute_f
(
h_grpgrav
,
"Comoving softening length"
,
h_grpgrav
,
"Comoving softening length
[internal units]
"
,
p
->
epsilon_comoving
*
kernel_gravity_softening_plummer_equivalent
);
p
->
epsilon_comoving
*
kernel_gravity_softening_plummer_equivalent
);
io_write_attribute_f
(
h_grpgrav
,
"Comoving Softening length (Plummer equivalent)"
,
p
->
epsilon_comoving
);
io_write_attribute_f
(
io_write_attribute_f
(
h_grpgrav
,
"Maximal physical softening length"
,
h_grpgrav
,
"Comoving Softening length (Plummer equivalent) [internal units]"
,
p
->
epsilon_comoving
);
io_write_attribute_f
(
h_grpgrav
,
"Maximal physical softening length [internal units]"
,
p
->
epsilon_max_physical
*
kernel_gravity_softening_plummer_equivalent
);
p
->
epsilon_max_physical
*
kernel_gravity_softening_plummer_equivalent
);
io_write_attribute_f
(
h_grpgrav
,
io_write_attribute_f
(
h_grpgrav
,
"Maximal physical softening length (Plummer equivalent)"
,
"Maximal physical softening length (Plummer equivalent) "
" [internal units]"
,
p
->
epsilon_max_physical
);
p
->
epsilon_max_physical
);
io_write_attribute_f
(
h_grpgrav
,
"Opening angle"
,
p
->
theta_crit
);
io_write_attribute_f
(
h_grpgrav
,
"Opening angle"
,
p
->
theta_crit
);
io_write_attribute_s
(
h_grpgrav
,
"Scheme"
,
GRAVITY_IMPLEMENTATION
);
io_write_attribute_s
(
h_grpgrav
,
"Scheme"
,
GRAVITY_IMPLEMENTATION
);
io_write_attribute_
d
(
h_grpgrav
,
"MM order"
,
SELF_GRAVITY_MULTIPOLE_ORDER
);
io_write_attribute_
i
(
h_grpgrav
,
"MM order"
,
SELF_GRAVITY_MULTIPOLE_ORDER
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh a_smooth"
,
p
->
a_smooth
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh a_smooth"
,
p
->
a_smooth
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh r_cut_max ratio"
,
p
->
r_cut_max_ratio
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh r_cut_max ratio"
,
p
->
r_cut_max_ratio
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh r_cut_min ratio"
,
p
->
r_cut_min_ratio
);
io_write_attribute_f
(
h_grpgrav
,
"Mesh r_cut_min ratio"
,
p
->
r_cut_min_ratio
);
...
...
This diff is collapsed.
Click to expand it.
src/hydro_properties.c
+
9
−
3
View file @
b32f33ab
...
@@ -239,7 +239,8 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
...
@@ -239,7 +239,8 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
io_write_attribute_f
(
h_grpsph
,
"Kernel delta N_ngb"
,
p
->
delta_neighbours
);
io_write_attribute_f
(
h_grpsph
,
"Kernel delta N_ngb"
,
p
->
delta_neighbours
);
io_write_attribute_f
(
h_grpsph
,
"Kernel eta"
,
p
->
eta_neighbours
);
io_write_attribute_f
(
h_grpsph
,
"Kernel eta"
,
p
->
eta_neighbours
);
io_write_attribute_f
(
h_grpsph
,
"Smoothing length tolerance"
,
p
->
h_tolerance
);
io_write_attribute_f
(
h_grpsph
,
"Smoothing length tolerance"
,
p
->
h_tolerance
);
io_write_attribute_f
(
h_grpsph
,
"Maximal smoothing length"
,
p
->
h_max
);
io_write_attribute_f
(
h_grpsph
,
"Maximal smoothing length [internal units]"
,
p
->
h_max
);
io_write_attribute_f
(
h_grpsph
,
"CFL parameter"
,
p
->
CFL_condition
);
io_write_attribute_f
(
h_grpsph
,
"CFL parameter"
,
p
->
CFL_condition
);
io_write_attribute_f
(
h_grpsph
,
"Volume log(max(delta h))"
,
io_write_attribute_f
(
h_grpsph
,
"Volume log(max(delta h))"
,
p
->
log_max_h_change
);
p
->
log_max_h_change
);
...
@@ -248,8 +249,12 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
...
@@ -248,8 +249,12 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
io_write_attribute_i
(
h_grpsph
,
"Max ghost iterations"
,
io_write_attribute_i
(
h_grpsph
,
"Max ghost iterations"
,
p
->
max_smoothing_iterations
);
p
->
max_smoothing_iterations
);
io_write_attribute_f
(
h_grpsph
,
"Minimal temperature"
,
p
->
minimal_temperature
);
io_write_attribute_f
(
h_grpsph
,
"Minimal temperature"
,
p
->
minimal_temperature
);
io_write_attribute_f
(
h_grpsph
,
"Minimal energy per unit mass [internal units]"
,
p
->
minimal_internal_energy
);
io_write_attribute_f
(
h_grpsph
,
"Initial temperature"
,
p
->
initial_temperature
);
io_write_attribute_f
(
h_grpsph
,
"Initial temperature"
,
p
->
initial_temperature
);
io_write_attribute_f
(
h_grpsph
,
"Initial energy per unit mass"
,
io_write_attribute_f
(
h_grpsph
,
"Initial energy per unit mass [internal units]"
,
p
->
initial_internal_energy
);
p
->
initial_internal_energy
);
io_write_attribute_f
(
h_grpsph
,
"Hydrogen mass fraction"
,
io_write_attribute_f
(
h_grpsph
,
"Hydrogen mass fraction"
,
p
->
hydrogen_mass_fraction
);
p
->
hydrogen_mass_fraction
);
...
@@ -260,7 +265,8 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
...
@@ -260,7 +265,8 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
p
->
viscosity
.
alpha_max
);
p
->
viscosity
.
alpha_max
);
io_write_attribute_f
(
h_grpsph
,
"Alpha viscosity (min)"
,
io_write_attribute_f
(
h_grpsph
,
"Alpha viscosity (min)"
,
p
->
viscosity
.
alpha_min
);
p
->
viscosity
.
alpha_min
);
io_write_attribute_f
(
h_grpsph
,
"Viscosity decay length"
,
p
->
viscosity
.
length
);
io_write_attribute_f
(
h_grpsph
,
"Viscosity decay length [internal units]"
,
p
->
viscosity
.
length
);
io_write_attribute_f
(
h_grpsph
,
"Beta viscosity"
,
const_viscosity_beta
);
io_write_attribute_f
(
h_grpsph
,
"Beta viscosity"
,
const_viscosity_beta
);
}
}
#endif
#endif
...
...
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