Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
7ba85366
Commit
7ba85366
authored
3 years ago
by
Izzard, Robert Dr (Maths & Physics)
Browse files
Options
Downloads
Patches
Plain Diff
update MINT_initial_XHc to use the initial hydrogen in the table
fix build issue in timestep_CHeB
parent
f4bd432b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/MINT/MINT_initial_XHc.c
+18
-12
18 additions, 12 deletions
src/MINT/MINT_initial_XHc.c
src/binary_c_parameters.h
+1
-1
1 addition, 1 deletion
src/binary_c_parameters.h
src/timestep/timestep_CHeB.c
+6
-2
6 additions, 2 deletions
src/timestep/timestep_CHeB.c
with
25 additions
and
15 deletions
src/MINT/MINT_initial_XHc.c
+
18
−
12
View file @
7ba85366
...
...
@@ -11,27 +11,33 @@ double MINT_initial_XHc(struct stardata_t * const stardata)
* Determine the initial central hydrogen abundance
* in the MINT models
*/
const
double
MINT_offset
=
0
.
7
-
0
.
6985
;
/*
const double MINT_offset = 0.7 - 0.6985;
const double Z = Max(0.0,
0.760 - 3.0 * stardata->common.metallicity - MINT_offset);
return Z;
*/
int
i
=
1
;
int
i
=
1
;
// XHC column
const
int
nperline
=
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
ndata
+
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
nparam
;
while
(
*
(
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
data
+
MINT_MS_CENTRAL_HYDROGEN
+
i
*
nperline
)
>
*
(
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
data
+
MINT_MS_CENTRAL_HYDROGEN
+
(
i
-
1
)
*
nperline
))
double
*
p
=
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
data
+
i
;
double
*
const
pmin
=
p
;
double
*
const
pmax
=
p
+
nperline
*
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
nlines
;
const
double
XHC0
=
*
p
;
/* first value */
/*
* While the abundance is increasing, keep looping through
* lines of data. When it
*/
while
(
p
<
pmax
&&
*
p
>=
XHC0
)
{
i
++
;
p
+=
nperline
;
}
return
*
(
stardata
->
store
->
MINT_tables
[
MINT_TABLE_MS
]
->
data
+
MINT_MS_CENTRAL_HYDROGEN
+
(
i
-
1
)
*
nperline
);
p
=
Max
(
p
-
nperline
,
pmin
);
return
*
p
;
}
#endif //MINT
This diff is collapsed.
Click to expand it.
src/binary_c_parameters.h
+
1
−
1
View file @
7ba85366
...
...
@@ -64,7 +64,7 @@
*
* Post-MS evolution has not yet been implemented.
*/
//
#define MINT
#define MINT
/************************************************************
...
...
This diff is collapsed.
Click to expand it.
src/timestep/timestep_CHeB.c
+
6
−
2
View file @
7ba85366
...
...
@@ -5,8 +5,12 @@ No_empty_translation_unit_warning;
void
timestep_CHeB
(
Timestep_prototype_args
)
{
if
(
stardata
->
preferences
->
stellar_structure_algorithm
==
STELLAR_STRUCTURE_ALGORITHM_MINT
&&
MINT_has_table
(
MINT_TABLE_CHeB_TA
))
if
(
stardata
->
preferences
->
stellar_structure_algorithm
==
STELLAR_STRUCTURE_ALGORITHM_MINT
#ifdef MINT
&&
MINT_has_table
(
MINT_TABLE_CHeB_TA
)
#endif//MINT
)
{
#ifdef MINT
double
phase_lifetime
;
...
...
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