Skip to content
Snippets Groups Projects
Commit c74eaf85 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also update the const-du const-lanbda and Compton cooling models for the new API.

parent 25c14262
Branches
Tags
No related merge requests found
......@@ -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 */
......@@ -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 */
......@@ -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 */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment