F
foice
Hello everyobdy
I managed to use the extern C trick to use my fortran routine
unfortunately
I am able to pass only plain double, float and integers, not array or
vectors.
If I pass a vector or an array everything compiles but the numbers
that are undestood as input in the fortran are actually meaningless
(7.823e-231 and similar things)
There must be some evil in the passing of the arguments that are not
plain scalars.
I declared the routine as
extern "C" {
void vxxxxx_(vector<double>&, double&, int&, int&, complex<
double>*);
}
the fortran has
subroutine vxxxxx(p,vmass,nhel,nsv , vc)
double precision p(0:3)
but then the components of p print out silly numbers ...
Do you have idea how to pass a vector or an array?
All the best
Roberto
I managed to use the extern C trick to use my fortran routine
unfortunately
I am able to pass only plain double, float and integers, not array or
vectors.
If I pass a vector or an array everything compiles but the numbers
that are undestood as input in the fortran are actually meaningless
(7.823e-231 and similar things)
There must be some evil in the passing of the arguments that are not
plain scalars.
I declared the routine as
extern "C" {
void vxxxxx_(vector<double>&, double&, int&, int&, complex<
double>*);
}
the fortran has
subroutine vxxxxx(p,vmass,nhel,nsv , vc)
double precision p(0:3)
but then the components of p print out silly numbers ...
Do you have idea how to pass a vector or an array?
All the best
Roberto