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
22affead
Commit
22affead
authored
6 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Commented out the setting of G from the parameter file. This bug will be fixed in the future.
parent
7526caba
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!578
Swift velociraptor
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/engine.h
+1
-1
1 addition, 1 deletion
src/engine.h
src/physical_constants.c
+2
-2
2 additions, 2 deletions
src/physical_constants.c
src/velociraptor_interface.c
+1
-2
1 addition, 2 deletions
src/velociraptor_interface.c
with
4 additions
and
5 deletions
src/engine.h
+
1
−
1
View file @
22affead
...
...
@@ -412,7 +412,7 @@ void engine_clean(struct engine *e);
int
engine_estimate_nr_tasks
(
struct
engine
*
e
);
#ifdef HAVE_SETAFFINITY
cpu_set_t
*
engine_entry_affinity
();
cpu_set_t
*
engine_entry_affinity
(
void
);
#endif
/* Struct dump/restore support. */
...
...
This diff is collapsed.
Click to expand it.
src/physical_constants.c
+
2
−
2
View file @
22affead
...
...
@@ -48,8 +48,8 @@ void phys_const_init(const struct unit_system *us, struct swift_params *params,
const_newton_G_cgs
/
units_general_cgs_conversion_factor
(
us
,
dimension_G
);
/* Overwrite G if present in the file */
internal_const
->
const_newton_G
=
parser_get_opt_param_double
(
params
,
"PhysicalConstants:G"
,
internal_const
->
const_newton_G
);
//
internal_const->const_newton_G = parser_get_opt_param_double(
//
params, "PhysicalConstants:G", internal_const->const_newton_G);
const
float
dimension_c
[
5
]
=
{
0
,
1
,
-
1
,
0
,
0
};
/* [cm s^-1] */
internal_const
->
const_speed_light_c
=
...
...
This diff is collapsed.
Click to expand it.
src/velociraptor_interface.c
+
1
−
2
View file @
22affead
...
...
@@ -82,8 +82,7 @@ void velociraptor_init(struct engine *e) {
e
->
stf_conv_fac
->
velocitytokms
=
units_conversion_factor
(
e
->
internal_units
,
e
->
stf_units
,
UNIT_CONV_SPEED
);
/* 1km/s <=> 1e5cm/s */
e
->
stf_conv_fac
->
masstosolarmass
=
units_conversion_factor
(
e
->
internal_units
,
e
->
stf_units
,
UNIT_CONV_MASS
);
/* 1M_sol <=> 1.99e33g */
e
->
stf_conv_fac
->
energyperunitmass
=
units_conversion_factor
(
e
->
internal_units
,
e
->
stf_units
,
UNIT_CONV_ENERGY_PER_UNIT_MASS
);
/* Conversion for gravitational potential. */
//e->stf_conv_fac->gravity = vel_const.const_newton_G; /* TODO: G = 6.67408e-8 (cgs) */
e
->
stf_conv_fac
->
gravity
=
4.302051e-06
;
/* TODO: G = 6.67408e-8 (cgs) */
e
->
stf_conv_fac
->
gravity
=
vel_const
.
const_newton_G
;
/* TODO: G = 6.67408e-8 (cgs) */
e
->
stf_conv_fac
->
hubbleunit
=
e
->
cosmology
->
H
;
/* TODO: double check this. */
unit_info
=
*
e
->
stf_conv_fac
;
...
...
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