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
e2a06e57
Commit
e2a06e57
authored
5 years ago
by
Loic Hausammann
Browse files
Options
Downloads
Patches
Plain Diff
GEAR: apply unit changes after reading parameters from yaml
parent
f516f850
No related branches found
No related tags found
1 merge request
!1052
Gear cosmological simulations
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/feedback/GEAR/lifetime.h
+5
-3
5 additions, 3 deletions
src/feedback/GEAR/lifetime.h
with
5 additions
and
3 deletions
src/feedback/GEAR/lifetime.h
+
5
−
3
View file @
e2a06e57
...
@@ -149,9 +149,6 @@ __attribute__((always_inline)) INLINE static void lifetime_read_from_tables(
...
@@ -149,9 +149,6 @@ __attribute__((always_inline)) INLINE static void lifetime_read_from_tables(
lt
->
constant
[
i
]
=
tmp
[
i
+
2
*
dim
];
lt
->
constant
[
i
]
=
tmp
[
i
+
2
*
dim
];
}
}
/* Change units from yr into Myr */
lt
->
constant
[
dim
-
1
]
-=
6
;
/* Cleanup everything */
/* Cleanup everything */
free
(
tmp
);
free
(
tmp
);
h5_close_group
(
file_id
,
group_id
);
h5_close_group
(
file_id
,
group_id
);
...
@@ -196,6 +193,11 @@ __attribute__((always_inline)) INLINE static void lifetime_init(
...
@@ -196,6 +193,11 @@ __attribute__((always_inline)) INLINE static void lifetime_init(
/* overwrite the parameters if found in the params */
/* overwrite the parameters if found in the params */
lifetime_read_from_params
(
lt
,
params
);
lifetime_read_from_params
(
lt
,
params
);
/* Change units from yr into Myr */
const
int
dim
=
3
;
lt
->
constant
[
dim
-
1
]
-=
6
;
}
}
/**
/**
...
...
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