| 434 | |
| 435 | We can also use the ApplyEMF or ApplyBField routines just as we would use ApplyTemplate but the subroutine should return either the Vector Potential (EMF) or the B field respectively. You should only use ApplyBField if your B-Field is constant - otherwise use the vector potential with ApplyEMF. |
| 436 | |
| 437 | {{{ |
| 438 | SUBROUTINE ProblemGridInit(Info) |
| 439 | CALL ApplyEMF(myEMF, Info) |
| 440 | END SUBROUTINE |
| 441 | |
| 442 | SUBROUTINE myEMF(pos, t, dt, q) |
| 443 | REAL(KIND=qPREC), DIMENSION(:) :: pos |
| 444 | REAL(KIND=qPREC), DIMENSION(:) :: q |
| 445 | REAL(KIND=qPREC) :: t, dt |
| 446 | q=(/0d0,0d0,cos(pos(1))/) |
| 447 | END SUBROUTINE myEMF |
| 448 | }}} |
| 449 | |
| 450 | |
| 451 | |
| 452 | |