Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
68
Issues
68
List
Boards
Labels
Milestones
Merge Requests
11
Merge Requests
11
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
c361813f
Commit
c361813f
authored
Sep 05, 2020
by
Mladen Ivkovic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formatting
parent
82dcb055
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
91 additions
and
90 deletions
+91
-90
src/hydro/Gadget2/hydro_part.h
src/hydro/Gadget2/hydro_part.h
+1
-1
src/rt/M1closure/rt.h
src/rt/M1closure/rt.h
+8
-10
src/rt/M1closure/rt_iact.h
src/rt/M1closure/rt_iact.h
+4
-3
src/rt/M1closure/rt_io.h
src/rt/M1closure/rt_io.h
+7
-10
src/rt/M1closure/rt_struct.h
src/rt/M1closure/rt_struct.h
+2
-3
src/rt/debug/rt.h
src/rt/debug/rt.h
+8
-6
src/rt/debug/rt_iact.h
src/rt/debug/rt_iact.h
+4
-3
src/rt/debug/rt_io.h
src/rt/debug/rt_io.h
+31
-22
src/rt/debug/rt_struct.h
src/rt/debug/rt_struct.h
+4
-6
src/rt/none/rt.h
src/rt/none/rt.h
+8
-9
src/rt/none/rt_iact.h
src/rt/none/rt_iact.h
+4
-3
src/rt/none/rt_io.h
src/rt/none/rt_io.h
+7
-10
src/rt/none/rt_struct.h
src/rt/none/rt_struct.h
+2
-3
src/stars/GEAR/stars_part.h
src/stars/GEAR/stars_part.h
+1
-1
No files found.
src/hydro/Gadget2/hydro_part.h
View file @
c361813f
...
...
@@ -37,10 +37,10 @@
#include "feedback_struct.h"
#include "logger.h"
#include "pressure_floor_struct.h"
#include "rt_struct.h"
#include "star_formation_struct.h"
#include "timestep_limiter_struct.h"
#include "tracers_struct.h"
#include "rt_struct.h"
/* Extra particle data not needed during the SPH loops over neighbours. */
struct
xpart
{
...
...
src/rt/M1closure/rt.h
View file @
c361813f
...
...
@@ -27,27 +27,25 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{}
#endif
/* SWIFT_RT_M1_H */
src/rt/M1closure/rt_iact.h
View file @
c361813f
...
...
@@ -21,13 +21,14 @@
/**
* @file src/rt/M1closure/rt_iact.h
* @brief Main header file for the M1 closure radiative transfer scheme particle interactions.
* @brief Main header file for the M1 closure radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
)
{};
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
){};
#endif
/* SWIFT_RT_IACT_M1CLOSURE_H */
src/rt/M1closure/rt_io.h
View file @
c361813f
...
...
@@ -27,19 +27,16 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of
hydro particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
hydro particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_xparts
(
const
struct
xpart
*
xparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{}
struct
io_props
*
list
,
int
*
num_fields
)
{}
/**
* @brief Creates additional output fields for the radiative transfer data of
star particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
star particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{
}
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{}
#endif
/* SWIFT_RT_IO_M1CLOSURE_H */
src/rt/M1closure/rt_struct.h
View file @
c361813f
...
...
@@ -24,9 +24,8 @@
* @brief Main header file for no radiative transfer struct.
*/
struct
rt_xpart_data
{
};
struct
rt_spart_data
{
};
struct
rt_xpart_data
{};
struct
rt_spart_data
{};
#endif
/* SWIFT_RT_STRUCT_M1CLOSURE_H */
src/rt/debug/rt.h
View file @
c361813f
...
...
@@ -27,7 +27,8 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{
xp
->
rt_data
.
iact_stars
=
0
;
xp
->
rt_data
.
calls_tot
=
0
;
...
...
@@ -37,28 +38,29 @@ __attribute__((always_inline)) INLINE static void rt_first_init_xpart(struct xpa
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{
xp
->
rt_data
.
iact_stars
=
0
;
xp
->
rt_data
.
calls_per_step
=
0
;
}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{
sp
->
rt_data
.
iact_hydro
=
0
;
sp
->
rt_data
.
calls_tot
=
0
;
sp
->
rt_data
.
calls_per_step
=
0
;
}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{
sp
->
rt_data
.
iact_hydro
=
0
;
sp
->
rt_data
.
calls_per_step
=
0
;
...
...
src/rt/debug/rt_iact.h
View file @
c361813f
...
...
@@ -21,15 +21,16 @@
/**
* @file src/rt/debug/rt_iact.h
* @brief Main header file for the debug radiative transfer scheme particle interactions.
* @brief Main header file for the debug radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
)
{
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
)
{
message
(
"Called debug RT scheme with case=%d"
,
call
);
}
#endif
/* SWIFT_RT_IACT_DEBUG_H */
src/rt/debug/rt_io.h
View file @
c361813f
...
...
@@ -27,41 +27,50 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of
hydro particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
hydro particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_xparts
(
const
struct
xpart
*
xparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{
struct
io_props
*
list
,
int
*
num_fields
)
{
list
+=
*
num_fields
;
*
num_fields
+=
3
;
list
[
0
]
=
io_make_output_field
(
"RT_star_iact"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
iact_stars
,
"number of interactions between this hydro particle and any star particle"
);
list
[
1
]
=
io_make_output_field
(
"RT_total_calls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
calls_tot
,
"total number of calls to this particle during the run"
);
list
[
2
]
=
io_make_output_field
(
"RT_calls_this_step"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
calls_per_step
,
"number of calls to this particle during one time step"
);
list
[
0
]
=
io_make_output_field
(
"RT_star_iact"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
iact_stars
,
"number of interactions between this hydro "
"particle and any star particle"
);
list
[
1
]
=
io_make_output_field
(
"RT_total_calls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
calls_tot
,
"total number of calls to this particle during the run"
);
list
[
2
]
=
io_make_output_field
(
"RT_calls_this_step"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
xparts
,
rt_data
.
calls_per_step
,
"number of calls to this particle during one time step"
);
}
/**
* @brief Creates additional output fields for the radiative transfer data of
star particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
star particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{
list
+=
*
num_fields
;
*
num_fields
+=
3
;
list
[
0
]
=
io_make_output_field
(
"RT_hydro_iact"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
iact_hydro
,
"number of interactions between this hydro particle and any star particle"
);
list
[
1
]
=
io_make_output_field
(
"RT_total_calls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
calls_tot
,
"total number of calls to this particle during the run"
);
list
[
2
]
=
io_make_output_field
(
"RT_calls_this_step"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
calls_per_step
,
"number of calls to this particle during one time step"
);
list
[
0
]
=
io_make_output_field
(
"RT_hydro_iact"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
iact_hydro
,
"number of interactions between this hydro "
"particle and any star particle"
);
list
[
1
]
=
io_make_output_field
(
"RT_total_calls"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
calls_tot
,
"total number of calls to this particle during the run"
);
list
[
2
]
=
io_make_output_field
(
"RT_calls_this_step"
,
INT
,
1
,
UNIT_CONV_NO_UNITS
,
1
.
f
,
sparts
,
rt_data
.
calls_per_step
,
"number of calls to this particle during one time step"
);
}
#endif
/* SWIFT_RT_IO_DEBUG_H */
src/rt/debug/rt_struct.h
View file @
c361813f
...
...
@@ -25,17 +25,15 @@
*/
struct
rt_xpart_data
{
int
iact_stars
;
/* how many stars this particle interacted with */
int
calls_tot
;
/* total number of calls to this particle during entire run */
int
iact_stars
;
/* how many stars this particle interacted with */
int
calls_tot
;
/* total number of calls to this particle during entire run */
int
calls_per_step
;
/* calls per time step to this particle */
};
struct
rt_spart_data
{
int
iact_hydro
;
/* how many hydro particles this particle interacted with */
int
calls_tot
;
/* total number of calls to this particle during entire run */
int
iact_hydro
;
/* how many hydro particles this particle interacted with */
int
calls_tot
;
/* total number of calls to this particle during entire run */
int
calls_per_step
;
/* calls per time step to this particle */
};
#endif
/* SWIFT_RT_STRUCT_DEBUG_H */
src/rt/none/rt.h
View file @
c361813f
...
...
@@ -27,26 +27,25 @@
/**
* @brief First initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
/**
* @brief Initialisation of the RT extra hydro partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_xpart
(
struct
xpart
*
restrict
xp
)
{}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_first_init_spart
(
struct
spart
*
restrict
sp
)
{}
/**
* @brief First initialisation of the RT extra star partilce data.
*/
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{
}
__attribute__
((
always_inline
))
INLINE
static
void
rt_init_spart
(
struct
spart
*
restrict
sp
)
{
}
#endif
/* SWIFT_RT_NONE_H */
src/rt/none/rt_iact.h
View file @
c361813f
...
...
@@ -21,13 +21,14 @@
/**
* @file src/rt/none/rt_iact.h
* @brief Main header file for no radiative transfer scheme particle interactions.
* @brief Main header file for no radiative transfer scheme particle
* interactions.
*/
/**
* @brief Injection step interaction between star and hydro particles.
*/
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
)
{};
__attribute__
((
always_inline
))
INLINE
static
void
runner_iact_rt_inject
(
int
call
){};
#endif
/* SWIFT_RT_IACT_NONE_H */
src/rt/none/rt_io.h
View file @
c361813f
...
...
@@ -27,19 +27,16 @@
*/
/**
* @brief Creates additional output fields for the radiative transfer data of
hydro particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
hydro particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_xparts
(
const
struct
xpart
*
xparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{}
struct
io_props
*
list
,
int
*
num_fields
)
{}
/**
* @brief Creates additional output fields for the radiative transfer data of
star particles.
*
Intended to be called from inside hydro_write_particles().
* @brief Creates additional output fields for the radiative transfer data of
*
star particles.
Intended to be called from inside hydro_write_particles().
*/
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{
}
INLINE
static
void
rt_write_stars
(
const
struct
spart
*
sparts
,
struct
io_props
*
list
,
int
*
num_fields
)
{}
#endif
/* SWIFT_RT_IO_NONE_H */
src/rt/none/rt_struct.h
View file @
c361813f
...
...
@@ -24,9 +24,8 @@
* @brief Main header file for no radiative transfer struct.
*/
struct
rt_xpart_data
{
};
struct
rt_spart_data
{
};
struct
rt_xpart_data
{};
struct
rt_spart_data
{};
#endif
/* SWIFT_RT_STRUCT_NONE_H */
src/stars/GEAR/stars_part.h
View file @
c361813f
...
...
@@ -25,9 +25,9 @@
/* Read additional subgrid models */
#include "chemistry_struct.h"
#include "feedback_struct.h"
#include "rt_struct.h"
#include "star_formation_struct.h"
#include "tracers_struct.h"
#include "rt_struct.h"
/**
* @brief Particle fields for the star particles.
...
...
Write
Preview
Markdown
is supported
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