C interfaces to some of the routines.
This is an experiment to be able to call them from Python.
(see the python_test.py file in tests)
C string length
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | str |
a container for data that is
to be passed to C. We include
it here so that we can use c_loc()
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(*), | private, | pointer | :: | data |
mueller method
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | intent(in), | value | :: | itype |
mode : |
|
| type(c_ptr), | intent(in), | value | :: | gravfile |
gravity coefficient file name |
|
| integer(kind=c_int), | intent(in), | value | :: | n |
degree |
|
| integer(kind=c_int), | intent(in), | value | :: | m |
order |
pointer to a container containing a geopotential_model
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in), | value | :: | cp |
pointer to a container containing a geopotential_model |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in), | value | :: | cp |
pointer to a container containing a geopotential_model |
|
| integer(kind=c_int), | intent(in), | value | :: | n |
degree |
|
| integer(kind=c_int), | intent(in), | value | :: | m |
order |
|
| real(kind=c_double), | intent(in), | dimension(3) | :: | rvec |
position vector |
|
| real(kind=c_double), | intent(out), | dimension(3) | :: | acc |
acceleration vector |
Convert a c_ptr to a string into a Fortran string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | cp | |||
| character(len=:), | intent(out), | allocatable | :: | fstr |
Convert a Fortran string to a c_ptr to a string.
(the C string must already have been allocated to a fixed size)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | fstr | |||
| type(c_ptr), | intent(inout) | :: | buffer |
a preallocated string buffer |
Just a test of f_string_to_c_ptr.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=c_int), | intent(in), | value | :: | ival | ||
| type(c_ptr), | intent(inout) | :: | buffer |
a preallocated string buffer |