Skip to content

Commit 310c15f

Browse files
Kostaszkiphilipheinisch
authored andcommitted
Corrected small error in the dipole calculation. (#34)
1 parent 7d24f33 commit 310c15f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include_testcases/ideal_MHD_far_dipole.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ inline REAL4 b_analytical(uint ix, uint iy, uint iz, REAL time) {
3333
inline REAL4 b_dipole(REAL4 X, REAL4 M) {
3434
REAL inorm = rsqrt(X.x*X.x + X.y*X.y + X.z*X.z);
3535
REAL4 n = inorm * X;
36-
REAL4 H = (3 * n * (M * n) - M) * inorm * inorm * inorm;
36+
REAL4 H = (3 * n * dot(M, n) - M) * inorm * inorm * inorm;
3737
return H;
3838
}
3939

0 commit comments

Comments
 (0)