Skip to content
GitLab
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
d0236bd7
Commit
d0236bd7
authored
Nov 02, 2017
by
lhausamm
Browse files
Removing compilation errors
parent
f3520640
Changes
4
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
d0236bd7
...
...
@@ -431,6 +431,7 @@ AC_ARG_WITH([grackle],
[with_grackle="no"]
)
if test "x$with_grackle" != "xno"; then
AC_PROG_FC
AC_FC_LIBRARY_LDFLAGS
if test "x$with_grackle" != "xyes" -a "x$with_grackle" != "x"; then
GRACKLE_LIBS="-L$with_grackle/lib -lgrackle $FCLIBS"
...
...
src/Makefile.am
View file @
d0236bd7
...
...
@@ -116,6 +116,8 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
cooling/none/cooling.h cooling/none/cooling_struct.h
\
cooling/const_du/cooling.h cooling/const_du/cooling_struct.h
\
cooling/const_lambda/cooling.h cooling/const_lambda/cooling_struct.h
\
cooling/grackle/cooling.h cooling/grackle/cooling_struct.h
\
cooling/grackle/grackle_wrapper.h
\
memswap.h dump.h logger.h
...
...
src/cooling/grackle/cooling.h
View file @
d0236bd7
...
...
@@ -47,7 +47,7 @@
* between step t0 and t1.
*/
static
INLINE
double
DoC
ooling_
GRACKLE
(
double
energy
,
double
density
,
double
dtime
,
double
*
ne
,
double
Z
,
double
a_now
)
static
INLINE
double
do_c
ooling_
grackle
(
double
energy
,
double
density
,
double
dtime
,
double
*
ne
,
double
Z
,
double
a_now
)
{
...
...
@@ -57,7 +57,7 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
*********************************************************************/
if
(
wrap_do_cooling
(
density
,
&
energy
,
dtime
,
Z
,
a_now
)
==
0
)
{
fprintf
(
stderr
,
"Error in do_cooling.
\n
"
);
error
(
"Error in do_cooling.
\n
"
);
return
0
;
}
...
...
@@ -68,10 +68,6 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
}
/**
* @brief Apply the cooling function to a particle.
*
...
...
@@ -85,7 +81,7 @@ static INLINE double DoCooling_GRACKLE(double energy, double density, double dti
*/
__attribute__
((
always_inline
))
INLINE
static
void
cooling_cool_part
(
const
struct
phys_const
*
restrict
phys_const
,
const
struct
U
nit
S
ystem
*
restrict
us
,
const
struct
u
nit
_s
ystem
*
restrict
us
,
const
struct
cooling_function_data
*
restrict
cooling
,
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
float
dt
)
{
...
...
@@ -93,7 +89,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
/* Get current internal energy (dt=0) */
const
float
u_old
=
hydro_get_internal_energy
(
p
,
0
.
f
);
const
float
u_old
=
hydro_get_internal_energy
(
p
);
/* Get current density */
const
float
rho
=
hydro_get_density
(
p
);
/* Actual scaling fractor */
...
...
@@ -108,7 +104,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
float
u_new
;
float
delta_u
;
u_new
=
DoC
ooling_
GRACKLE
(
u_old
,
rho
,
dt
,
&
ne
,
Z
,
a_now
);
u_new
=
do_c
ooling_
grackle
(
u_old
,
rho
,
dt
,
&
ne
,
Z
,
a_now
);
//u_new = u_old * 0.99;
...
...
@@ -129,11 +125,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
/* Update the internal energy */
hydro_set_internal_energy
(
p
,
u_new
);
hydro_set_internal_energy_dt
(
p
,
delta_u
/
dt
);
}
...
...
@@ -150,7 +142,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part(
__attribute__
((
always_inline
))
INLINE
static
float
cooling_timestep
(
const
struct
cooling_function_data
*
restrict
cooling
,
const
struct
phys_const
*
restrict
phys_const
,
const
struct
U
nit
S
ystem
*
restrict
us
,
const
struct
part
*
restrict
p
)
{
const
struct
u
nit
_s
ystem
*
restrict
us
,
const
struct
part
*
restrict
p
)
{
return
FLT_MAX
;
}
...
...
@@ -188,7 +180,8 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
* @param cooling The cooling properties to initialize
*/
static
INLINE
void
cooling_init_backend
(
const
struct
swift_params
*
parameter_file
,
const
struct
UnitSystem
*
us
,
const
struct
swift_params
*
parameter_file
,
const
struct
unit_system
*
us
,
const
struct
phys_const
*
phys_const
,
struct
cooling_function_data
*
cooling
)
{
...
...
src/hydro/Gadget2/hydro_part.h
View file @
d0236bd7
...
...
@@ -45,9 +45,6 @@ struct xpart {
/* Velocity at the last full step. */
float
v_full
[
3
];
/* Radiated energy */
float
e_radcool
;
/* Entropy at the last full step. */
float
entropy_full
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment