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
1872840e
Commit
1872840e
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Allow compilation when multipole order is 0
parent
070221ab
No related branches found
No related tags found
1 merge request
!324
Gravity multi dt
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/multipole.h
+4
-2
4 additions, 2 deletions
src/multipole.h
with
4 additions
and
2 deletions
src/multipole.h
+
4
−
2
View file @
1872840e
...
@@ -810,7 +810,9 @@ INLINE static void gravity_P2M(struct gravity_tensors *m,
...
@@ -810,7 +810,9 @@ INLINE static void gravity_P2M(struct gravity_tensors *m,
#endif
#endif
}
}
M_100
=
M_010
=
M_001
=
0
.
f
;
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
M_100
=
M_010
=
M_001
=
0
.
f
;
/* Matthieu */
#endif
/* Store the data on the multipole. */
/* Store the data on the multipole. */
m
->
m_pole
.
M_000
=
mass
;
m
->
m_pole
.
M_000
=
mass
;
...
@@ -1258,11 +1260,11 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
...
@@ -1258,11 +1260,11 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
gp
->
num_interacted
+=
lb
->
num_interacted
;
gp
->
num_interacted
+=
lb
->
num_interacted
;
#endif
#endif
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
/* Distance to the multipole */
/* Distance to the multipole */
const
double
dx
[
3
]
=
{
gp
->
x
[
0
]
-
loc
[
0
],
gp
->
x
[
1
]
-
loc
[
1
],
const
double
dx
[
3
]
=
{
gp
->
x
[
0
]
-
loc
[
0
],
gp
->
x
[
1
]
-
loc
[
1
],
gp
->
x
[
2
]
-
loc
[
2
]};
gp
->
x
[
2
]
-
loc
[
2
]};
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
/* 0th order interaction */
/* 0th order interaction */
gp
->
a_grav
[
0
]
+=
X_000
(
dx
)
*
lb
->
F_100
;
gp
->
a_grav
[
0
]
+=
X_000
(
dx
)
*
lb
->
F_100
;
gp
->
a_grav
[
1
]
+=
X_000
(
dx
)
*
lb
->
F_010
;
gp
->
a_grav
[
1
]
+=
X_000
(
dx
)
*
lb
->
F_010
;
...
...
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