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

Only check 2nd order multipole terms if they exist

parent 15d0e8ca
......@@ -827,6 +827,7 @@ void cell_check_multipole(struct cell *c, void *data) {
error("Multipole CoM are different (%12.15e vs. %12.15e", ma.CoM[k],
mb.CoM[k]);
#if const_gravity_multipole_order >= 2
if (fabsf(ma.I_xx - mb.I_xx) / fabsf(ma.I_xx + mb.I_xx) > 1e-5 &&
ma.I_xx > 1e-9)
error("Multipole I_xx are different (%12.15e vs. %12.15e)", ma.I_xx,
......@@ -851,6 +852,7 @@ void cell_check_multipole(struct cell *c, void *data) {
ma.I_yz > 1e-9)
error("Multipole I_yz are different (%12.15e vs. %12.15e)", ma.I_yz,
mb.I_yz);
#endif
}
}
......
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