Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
c74eaf85
Commit
c74eaf85
authored
Jan 29, 2019
by
Matthieu Schaller
Browse files
Also update the const-du const-lanbda and Compton cooling models for the new API.
parent
25c14262
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cooling/Compton/cooling.h
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 */
src/cooling/const_du/cooling.h
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 */
src/cooling/const_lambda/cooling.h
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 */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment