Skip to content

Commit 9dc7b3f

Browse files
committed
Get one test passing
1 parent 61ba5dc commit 9dc7b3f

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/example_fgen_basic/get_square_root_wrapper.f90

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ function get_square_root(inv) result(res_instance_index)
4242
! ready for its attributes to be retrieved from Python.
4343
call result_dp_manager_set_instance_index_to(res_instance_index, res)
4444

45+
print *, "res_instance_index"
46+
print *, res_instance_index
47+
print *, "res % data_v"
48+
print *, res % data_v
49+
4550
end function get_square_root
4651

4752
end module m_get_square_root_w

src/example_fgen_basic/result/result_dp_wrapper.f90

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
!> Wrapper for interfacing `m_result_dp` with Python
22
module m_result_dp_w
33

4-
use kind_parameters, only: dp
54
use m_error_v, only: ErrorV
65
use m_result_dp, only: ResultDP
76

@@ -29,6 +28,10 @@ module m_result_dp_w
2928
subroutine build_instance(data_v, error_v_instance_index, instance_index)
3029
!! Build an instance
3130

31+
! Annoying that this has to be injected everywhere,
32+
! but ok it can be automated.
33+
integer, parameter :: dp = selected_real_kind(15, 307)
34+
3235
real(kind=dp), intent(in), optional :: data_v
3336
!! Data
3437

@@ -124,15 +127,23 @@ subroutine get_data_v( &
124127
data_v &
125128
)
126129

130+
! Annoying that this has to be injected everywhere,
131+
! but ok it can be automated.
132+
integer, parameter :: dp = selected_real_kind(15, 307)
133+
127134
integer, intent(in) :: instance_index
128135

129136
real(kind=dp), intent(out) :: data_v
130137

131138
type(ResultDP) :: instance
132139

140+
print *, "instance_index"
141+
print *, instance_index
133142
instance = result_dp_manager_get_instance(instance_index)
134143

135144
data_v = instance % data_v
145+
print *, "instance % data_v"
146+
print *, instance % data_v
136147

137148
end subroutine get_data_v
138149

0 commit comments

Comments
 (0)