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
c74eaf85
Commit
c74eaf85
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Also update the const-du const-lanbda and Compton cooling models for the new API.
parent
25c14262
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cooling/Compton/cooling.h
+31
-0
31 additions, 0 deletions
src/cooling/Compton/cooling.h
src/cooling/const_du/cooling.h
+31
-0
31 additions, 0 deletions
src/cooling/const_du/cooling.h
src/cooling/const_lambda/cooling.h
+32
-0
32 additions, 0 deletions
src/cooling/const_lambda/cooling.h
with
94 additions
and
0 deletions
src/cooling/Compton/cooling.h
+
31
−
0
View file @
c74eaf85
...
...
@@ -368,4 +368,35 @@ static INLINE void cooling_print_backend(
*/
static
INLINE
void
cooling_clean
(
struct
cooling_function_data
*
cooling
)
{}
/**
* @brief Write a cooling struct to the given FILE as a stream of bytes.
*
* Nothing to do beyond writing the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
*/
static
INLINE
void
cooling_struct_dump
(
const
struct
cooling_function_data
*
cooling
,
FILE
*
stream
)
{
restart_write_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
"cooling"
,
"cooling function"
);
}
/**
* @brief Restore a hydro_props struct from the given FILE as a stream of
* bytes.
*
* Nothing to do beyond reading the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
* @param cosmo #cosmology structure
*/
static
INLINE
void
cooling_struct_restore
(
struct
cooling_function_data
*
cooling
,
FILE
*
stream
,
const
struct
cosmology
*
cosmo
)
{
restart_read_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
NULL
,
"cooling function"
);
}
#endif
/* SWIFT_COOLING_COMPTON_H */
This diff is collapsed.
Click to expand it.
src/cooling/const_du/cooling.h
+
31
−
0
View file @
c74eaf85
...
...
@@ -275,4 +275,35 @@ static INLINE void cooling_print_backend(
*/
static
INLINE
void
cooling_clean
(
struct
cooling_function_data
*
cooling
)
{}
/**
* @brief Write a cooling struct to the given FILE as a stream of bytes.
*
* Nothing to do beyond writing the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
*/
static
INLINE
void
cooling_struct_dump
(
const
struct
cooling_function_data
*
cooling
,
FILE
*
stream
)
{
restart_write_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
"cooling"
,
"cooling function"
);
}
/**
* @brief Restore a hydro_props struct from the given FILE as a stream of
* bytes.
*
* Nothing to do beyond reading the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
* @param cosmo #cosmology structure
*/
static
INLINE
void
cooling_struct_restore
(
struct
cooling_function_data
*
cooling
,
FILE
*
stream
,
const
struct
cosmology
*
cosmo
)
{
restart_read_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
NULL
,
"cooling function"
);
}
#endif
/* SWIFT_COOLING_CONST_DU_H */
This diff is collapsed.
Click to expand it.
src/cooling/const_lambda/cooling.h
+
32
−
0
View file @
c74eaf85
...
...
@@ -355,4 +355,36 @@ static INLINE void cooling_print_backend(
*/
static
INLINE
void
cooling_clean
(
struct
cooling_function_data
*
cooling
)
{}
/**
* @brief Write a cooling struct to the given FILE as a stream of bytes.
*
* Nothing to do beyond writing the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
*/
static
INLINE
void
cooling_struct_dump
(
const
struct
cooling_function_data
*
cooling
,
FILE
*
stream
)
{
restart_write_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
"cooling"
,
"cooling function"
);
}
/**
* @brief Restore a hydro_props struct from the given FILE as a stream of
* bytes.
*
* Nothing to do beyond reading the structure from the stream.
*
* @param cooling the struct
* @param stream the file stream
* @param cosmo #cosmology structure
*/
static
INLINE
void
cooling_struct_restore
(
struct
cooling_function_data
*
cooling
,
FILE
*
stream
,
const
struct
cosmology
*
cosmo
)
{
restart_read_blocks
((
void
*
)
cooling
,
sizeof
(
struct
cooling_function_data
),
1
,
stream
,
NULL
,
"cooling function"
);
}
#endif
/* SWIFT_COOLING_CONST_LAMBDA_H */
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