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
d37c4064
Commit
d37c4064
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Added comment about the disappearance of the symmetry in the MAC
parent
66922edf
No related branches found
No related tags found
1 merge request
!1077
Improved multipole acceptance criterion (MAC)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theory/Multipoles/fmm_summary.tex
+18
-13
18 additions, 13 deletions
theory/Multipoles/fmm_summary.tex
with
18 additions
and
13 deletions
theory/Multipoles/fmm_summary.tex
+
18
−
13
View file @
d37c4064
...
@@ -221,8 +221,7 @@ The main remaining question is to decide when two cells are far enough from
...
@@ -221,8 +221,7 @@ The main remaining question is to decide when two cells are far enough from
each others that the truncated Taylor expansion used as approximation for
each others that the truncated Taylor expansion used as approximation for
the potential (eq.
\ref
{
eq:fmm:expansion
}
) is accurate enough. The
the potential (eq.
\ref
{
eq:fmm:expansion
}
) is accurate enough. The
criterion used to make that decision is called the
\emph
{
multipole
criterion used to make that decision is called the
\emph
{
multipole
acceptance criterion
}
(MAC).
acceptance criterion
}
(MAC).
\\
We know that (
\ref
{
eq:fmm:expansion
}
) is converging towards the correct
We know that (
\ref
{
eq:fmm:expansion
}
) is converging towards the correct
answer provided
$
1
>|
\mathbf
{
r
}_
a
+
\mathbf
{
r
}_
b|
/
|
\mathbf
{
R
}
|
$
. This is
answer provided
$
1
>|
\mathbf
{
r
}_
a
+
\mathbf
{
r
}_
b|
/
|
\mathbf
{
R
}
|
$
. This is
hence the most basic (and always necessary) MAC that can be designed. If
hence the most basic (and always necessary) MAC that can be designed. If
...
@@ -239,8 +238,7 @@ This lets users have a second handle on the accuracy on the gravity
...
@@ -239,8 +238,7 @@ This lets users have a second handle on the accuracy on the gravity
calculation besides the much more involved change in the expansion order
calculation besides the much more involved change in the expansion order
$
p
$
of the FMM method. Typical values for the opening angle are in the
$
p
$
of the FMM method. Typical values for the opening angle are in the
range
$
[
0
.
3
,
0
.
7
]
$
, with the cost of the simulation growing as
$
\theta
_{
\rm
range
$
[
0
.
3
,
0
.
7
]
$
, with the cost of the simulation growing as
$
\theta
_{
\rm
cr
}$
decreases.
cr
}$
decreases.
\\
This method has the drawback of using a uniform criterion across the entire
This method has the drawback of using a uniform criterion across the entire
simulation volume and time evolution, which means that the chosen value of
simulation volume and time evolution, which means that the chosen value of
$
\theta
_{
\rm
cr
}$
could be too small in some regions (leading to too many
$
\theta
_{
\rm
cr
}$
could be too small in some regions (leading to too many
...
@@ -250,8 +248,7 @@ uses a more adaptive criterion to decide when the multipole approximation
...
@@ -250,8 +248,7 @@ uses a more adaptive criterion to decide when the multipole approximation
can be used. This is based on the error analysis of FMM by
can be used. This is based on the error analysis of FMM by
\cite
{
Dehnen2014
}
and is summarised below for completeness. The key idea is
\cite
{
Dehnen2014
}
and is summarised below for completeness. The key idea is
to exploit the additional information about the distribution of particles
to exploit the additional information about the distribution of particles
that is encoded in the higher-order multipole terms.
that is encoded in the higher-order multipole terms.
\\
We start by defining the scalar quantity
$
\mathsf
{
P
}_{
A,n
}$
, the
We start by defining the scalar quantity
$
\mathsf
{
P
}_{
A,n
}$
, the
\emph
{
power
}
of the multipole of order
$
n
$
of the particles in cell
$
A
$
,
\emph
{
power
}
of the multipole of order
$
n
$
of the particles in cell
$
A
$
,
via
via
...
@@ -309,15 +306,23 @@ the previous time-step\footnote{On the first time-step of a simulation this
...
@@ -309,15 +306,23 @@ the previous time-step\footnote{On the first time-step of a simulation this
acceleration in a given cell can be computed at the same time as the P2M
acceleration in a given cell can be computed at the same time as the P2M
and M2M kernels are evaluated in the tree construction phase. The second
and M2M kernels are evaluated in the tree construction phase. The second
condition in (
\ref
{
eq:fmm:mac
}
) is necessary to ensure the convergence of the
condition in (
\ref
{
eq:fmm:mac
}
) is necessary to ensure the convergence of the
Taylor expansion.
Taylor expansion.
\\
One important difference between this criterion and the purely geometric
one (
\ref
{
eq:fmm:angle
}
) is that it is not symmetric in
$
A
\leftrightarrow
B
$
. This implies that there are cases where a multipole in cell
$
A
$
can be
used to compute the field tensors in cell
$
B
$
but the multipole in
$
B
$
cannot be used to compute the
$
\mathsf
{
F
}$
values of cell
$
A
$
. This affects
the tree walk by breaking the symmetry and potentially leading to cells of
different sizes interacting.
\\
In the specific case of the M2P kernel, we have
$
\rho
_
B
=
0
$
, which
In the specific case of the M2P kernel, we have
$
\rho
_
B
=
0
$
, which
simplifies some of the expressions above. In this case, at order
$
p
$
, we get:
simplifies some of the expressions above. In this case, at order
$
p
$
, we get:
\begin{align}
\begin{equation}
E
_{
AB
}
&
=
\frac
{
\mathsf
{
P
}_{
A,p
}}{
M
_
A |
\mathbf
{
R
}
|
^
p
}
,
\nonumber
\\
E
_{
AB
}
=
\frac
{
\mathsf
{
P
}_{
A,p
}}{
M
_
A |
\mathbf
{
R
}
|
^
p
}
,
\qquad
\tilde
{
E
}_{
AB
}
&
= 8E
_{
AB
}
\nonumber
\tilde
{
E
}_{
AB
}
= 8E
_{
AB
}
\nonumber
\end{align}
\end{equation}
This leads to the following MAC for the M2P kernel:
Note that, in this case, only the power term of the order of the
scheme appears; not a sum over the lower-order ones. This leads to the
following MAC for the M2P kernel:
\begin{equation}
\begin{equation}
8
\frac
{
\mathsf
{
P
}_{
A,p
}}{
|
\mathbf
{
R
}
|
^{
p+2
}}
<
\epsilon
\min
_{
b
\in
8
\frac
{
\mathsf
{
P
}_{
A,p
}}{
|
\mathbf
{
R
}
|
^{
p+2
}}
<
\epsilon
\min
_{
b
\in
B
}
\left
(|
\mathbf
{
a
}_
b|
\right
)
\quad
\rm
{
and
}
\quad
\frac
{
\rho
_
A
}
B
}
\left
(|
\mathbf
{
a
}_
b|
\right
)
\quad
\rm
{
and
}
\quad
\frac
{
\rho
_
A
}
...
...
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