Skip to content
GitLab
Menu
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
528af56a
Commit
528af56a
authored
Apr 25, 2020
by
Matthieu Schaller
Browse files
Do not store the dipole terms since they are always zero.
parent
5ed1998c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
528af56a
...
...
@@ -2283,11 +2283,6 @@ void cell_make_multipoles(struct cell *c, integertime_t ti_current,
/* Take minimum of both limits */
c
->
grav
.
multipole
->
r_max
=
min
(
r_max
,
sqrt
(
dx
*
dx
+
dy
*
dy
+
dz
*
dz
));
/* We know the first-order multipole (dipole) is 0. */
c
->
grav
.
multipole
->
m_pole
.
M_100
=
0
.
f
;
c
->
grav
.
multipole
->
m_pole
.
M_010
=
0
.
f
;
c
->
grav
.
multipole
->
m_pole
.
M_001
=
0
.
f
;
/* Compute the multipole power */
gravity_multipole_compute_power
(
&
c
->
grav
.
multipole
->
m_pole
);
...
...
src/multipole.h
View file @
528af56a
This diff is collapsed.
Click to expand it.
src/multipole_struct.h
View file @
528af56a
...
...
@@ -132,8 +132,8 @@ struct multipole {
#if SELF_GRAVITY_MULTIPOLE_ORDER > 0
/* 1st order terms */
float
M_100
,
M_010
,
M_001
;
/* 1st order terms
(all 0 since we expand around CoM)
*/
//
float M_100, M_010, M_001;
#endif
#if SELF_GRAVITY_MULTIPOLE_ORDER > 1
...
...
src/space.c
View file @
528af56a
...
...
@@ -3659,11 +3659,6 @@ void space_split_recursive(struct space *s, struct cell *c,
c
->
grav
.
multipole
->
CoM_rebuild
[
1
]
=
c
->
grav
.
multipole
->
CoM
[
1
];
c
->
grav
.
multipole
->
CoM_rebuild
[
2
]
=
c
->
grav
.
multipole
->
CoM
[
2
];
/* We know the first-order multipole (dipole) is 0. */
c
->
grav
.
multipole
->
m_pole
.
M_100
=
0
.
f
;
c
->
grav
.
multipole
->
m_pole
.
M_010
=
0
.
f
;
c
->
grav
.
multipole
->
m_pole
.
M_001
=
0
.
f
;
/* Compute the multipole power */
gravity_multipole_compute_power
(
&
c
->
grav
.
multipole
->
m_pole
);
...
...
Write
Preview
Supports
Markdown
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