Skip to content
Snippets Groups Projects
Commit e9566379 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only check 2nd order multipole terms if they exist

parent 15d0e8ca
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment