Commit e48aaf16 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Generate the M2M terms with the first-order multipoles commented out

parent 4d84c518
This diff is collapsed.
......@@ -240,7 +240,7 @@ print("-------------------------------------------------\n")
if order > 0:
print("#if SELF_GRAVITY_MULTIPOLE_ORDER > %d" % (order - 1))
print("/* Shift %s order terms */" % ordinal(order))
print("/* Shift %s order terms (1st order mpole (all 0) commented out) */" % ordinal(order))
# Create all the terms relevent for this order
for i in range(order + 1):
......@@ -262,11 +262,18 @@ for i in range(order + 1):
and jj + jjj == j
and kk + kkk == k
):
print(
"+ X_%d%d%d(dx) * m_b->M_%d%d%d"
% (ii, jj, kk, iii, jjj, kkk),
end=" ",
)
if iii + jjj + kkk == 1:
print(
"/* + X_%d%d%d(dx) * m_b->M_%d%d%d */"
% (ii, jj, kk, iii, jjj, kkk),
end=" ",
)
else:
print(
"+ X_%d%d%d(dx) * m_b->M_%d%d%d"
% (ii, jj, kk, iii, jjj, kkk),
end=" ",
)
print(";")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment