Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
d80ed507
Commit
d80ed507
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added configuration option to change the order of the multipole scheme.
parent
0d2a74ab
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!324
Gravity multi dt
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.ac
+10
-0
10 additions, 0 deletions
configure.ac
src/multipole.h
+1
-3
1 addition, 3 deletions
src/multipole.h
with
11 additions
and
3 deletions
configure.ac
+
10
−
0
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
...
...
This diff is collapsed.
Click to expand it.
src/multipole.h
+
1
−
3
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
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment