Closed lazersos closed 1 year ago
It seems like adding INTENT(inout)
to dat
in the h
function fixes this issue.
function h(xx, dat)
real :: h
real,intent(in) :: xx
real :: ss, res
class(dataCollectionBase), INTENT(inout), target :: dat
procedure (f_int_dat_vec), pointer :: f_ptr => null ()
real :: tmp
f_ptr => f_vec
dat%x = xx
call qags_y_vec( f_ptr, dat, dat%y1, dat%y2, dat%epsabs, dat%epsrel, ss, dat%abserr_y, dat%neval_y, dat%ier_y )
h = ss
if ( mod( dat%progCallbackCnt, 100 ) .eq. 0 ) then
!! Progress callback
tmp = dat%progCallback( dat )
endif
dat%progCallbackCnt = dat%progCallbackCnt + 1
return
end function h
Hi @lazersos, We are excited that you are trying to use our code and to interface it to the particle following code. Thank you for opening the issue. And thank you even more for directly coming up with a solution to it 💯
We have implemented your solution directly into the master branch 👍
Additionally, we have reworked the Makefile in that folder and tested compilation successfully with gfortran
and ifort
.
Please feel free to open another issue if you run into any sort of problem. We are happy to fix them.
Hello, I'm trying to compile MagTense with gfortran but I'm running into an issue in
NumericalIntegrals.f90
. I'm on themaster
branch.It seem like it could be related to this Compiler feature.
For context, we'd like to build the Fortran parts of this code and interface them to the particle following code in STELLOPT/BEAMS3D. This will allow us to include magnetic material in our simulations allowing us to model particle orbits in neutral beam boxes and the effect of ferretic inserts.