I have a case where I try to give a divergence free source current to the MagnetoDynamics module. It has the same idea as in tests/mgdynamics_bh. However, it does not converge. But if I give the source current analytically, it does converge.

See the attached test case.

if the body force section is changed from

Code: Select all

```
Body Force 1
Name = "Current Density"
Current Density 1 = Variable Coordinate 1, Coordinate 2, Coordinate 3
Real Procedure "func.so" "currdens1"
Current Density 2 = Variable Coordinate 1, Coordinate 2, Coordinate 3
Real Procedure "func.so" "currdens2"
Current Density 3 = Variable Coordinate 1, Coordinate 2, Coordinate 3
Real Procedure "func.so" "currdens3"
! Current Density 1 = Equals Volume current 1
! Current Density 2 = Equals Volume current 2
! Current Density 3 = Equals Volume current 3
End
```

Code: Select all

```
Body Force 1
Name = "Current Density"
! Current Density 1 = Variable Coordinate 1, Coordinate 2, Coordinate 3
! Real Procedure "func.so" "currdens1"
! Current Density 2 = Variable Coordinate 1, Coordinate 2, Coordinate 3
! Real Procedure "func.so" "currdens2"
! Current Density 3 = Variable Coordinate 1, Coordinate 2, Coordinate 3
! Real Procedure "func.so" "currdens3"
Current Density 1 = Equals Volume current 1
Current Density 2 = Equals Volume current 2
Current Density 3 = Equals Volume current 3
End
```

Is this a bug, or what is going on?

Cheers,

Eelis