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
d80ed507
Commit
d80ed507
authored
Mar 07, 2017
by
Matthieu Schaller
Browse files
Added configuration option to change the order of the multipole scheme.
parent
0d2a74ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
d80ed507
...
...
@@ -788,6 +788,15 @@ case "$with_potential" in
;;
esac
# Gravity multipole order
AC_ARG_WITH([multipole-order],
[AS_HELP_STRING([--with-multipole-order=<order>],
[order of the multipole and gravtiational field expansion @<:@ default: 2@:>@]
)],
[with_multipole_order="$withval"],
[with_multipole_order="2"]
)
AC_DEFINE_UNQUOTED([SELF_GRAVITY_MULTIPOLE_ORDER], [$with_multipole_order], [Multipole order])
# Check for git, needed for revision stamps.
...
...
@@ -835,6 +844,7 @@ AC_MSG_RESULT([
Riemann solver : $with_riemann
Cooling function : $with_cooling
External potential : $with_potential
Multipole order : $with_multipole_order
Task debugging : $enable_task_debugging
Debugging checks : $enable_debugging_checks
...
...
src/multipole.h
View file @
d80ed507
...
...
@@ -110,8 +110,7 @@ INLINE static void gravity_reset(struct gravity_tensors *m) {
* @param m The #multipole.
* @param dt The drift time-step.
*/
INLINE
static
void
gravity_drift
(
struct
gravity_tensors
*
m
,
double
dt
)
{
INLINE
static
void
gravity_drift
(
struct
gravity_tensors
*
m
,
double
dt
)
{
/* Move the whole thing according to bulk motion */
m
->
CoM
[
0
]
+=
m
->
m_pole
.
vel
[
0
];
...
...
@@ -119,7 +118,6 @@ INLINE static void gravity_drift(struct gravity_tensors *m,
m
->
CoM
[
2
]
+=
m
->
m_pole
.
vel
[
2
];
}
INLINE
static
void
gravity_field_tensors_init
(
struct
gravity_tensors
*
m
)
{
bzero
(
&
m
->
a_x
,
sizeof
(
struct
acc_tensor
));
...
...
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