<s>
Particle	B-Algorithm
–	I-Algorithm
Particle	I-Algorithm
–	I-Algorithm
Particle	I-Algorithm
–	I-Algorithm
Mesh	I-Algorithm
(	O
P3M	B-Algorithm
)	O
is	O
a	O
Fourier-based	O
Ewald	O
summation	O
method	O
to	O
calculate	O
potentials	O
in	O
N-body	B-Algorithm
simulations	I-Algorithm
.	O
</s>
<s>
smoothed	B-Application
particle	I-Application
hydrodynamics	I-Application
,	O
or	O
any	O
other	O
useful	O
function	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
the	O
particle	B-Algorithm
mesh	I-Algorithm
method	O
,	O
where	O
particles	O
are	O
interpolated	O
onto	O
a	O
grid	O
,	O
and	O
the	O
potential	O
is	O
solved	O
for	O
this	O
grid	O
(	O
e.g.	O
</s>
<s>
The	O
P3M	B-Algorithm
algorithm	O
attempts	O
to	O
remedy	O
this	O
by	O
calculating	O
the	O
potential	O
through	O
a	O
direct	O
sum	O
for	O
particles	O
that	O
are	O
close	O
,	O
and	O
through	O
the	O
particle	B-Algorithm
mesh	I-Algorithm
method	O
for	O
particles	O
that	O
are	O
separated	O
by	O
some	O
distance	O
.	O
</s>
