Skip to content

Commit

Permalink
revise preprcessing for C interfaces to arc and trb
Browse files Browse the repository at this point in the history
remove excess printing from glrt
  • Loading branch information
Nick Gould committed Jan 13, 2025
1 parent dc5f3c6 commit 5c8f4cb
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 32 deletions.
23 changes: 22 additions & 1 deletion include/galahad_cfunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@
#define llsr_control_type llsr_control_type_s_64
#define llsr_inform_type llsr_inform_type_s_64
#define llsr_time_type llsr_time_type_s_64
#define llsr_history_type llsr_history_type_s_64
#define llst_control_type llst_control_type_s_64
#define llst_inform_type llst_inform_type_s_64
#define llst_time_type llst_time_type_s_64
#define llst_history_type llst_history_type_s_64
#define lms_control_type lms_control_type_s_64
#define lms_inform_type lms_inform_type_s_64
#define lms_time_type lms_time_type_s_64
Expand Down Expand Up @@ -553,6 +555,7 @@
#define rqs_control_type rqs_control_type_s_64
#define rqs_inform_type rqs_inform_type_s_64
#define rqs_time_type rqs_time_type_s_64
#define rqs_history_type rqs_history_type_s_64
#define sbls_control_type sbls_control_type_s_64
#define sbls_inform_type sbls_inform_type_s_64
#define sbls_time_type sbls_time_type_s_64
Expand All @@ -575,6 +578,7 @@
#define trs_control_type trs_control_type_s_64
#define trs_inform_type trs_inform_type_s_64
#define trs_time_type trs_time_type_s_64
#define trs_history_type trs_history_type_s_64
#define tru_control_type tru_control_type_s_64
#define tru_inform_type tru_inform_type_s_64
#define tru_time_type tru_time_type_s_64
Expand Down Expand Up @@ -1050,9 +1054,11 @@
#define llsr_control_type llsr_control_type_q_64
#define llsr_inform_type llsr_inform_type_q_64
#define llsr_time_type llsr_time_type_q_64
#define llsr_history_type llsr_history_type_q_64
#define llst_control_type llst_control_type_q_64
#define llst_inform_type llst_inform_type_q_64
#define llst_time_type llst_time_type_q_64
#define llst_history_type llst_history_type_q_64
#define lms_control_type lms_control_type_q_64
#define lms_inform_type lms_inform_type_q_64
#define lms_time_type lms_time_type_q_64
Expand Down Expand Up @@ -1092,6 +1098,7 @@
#define rqs_control_type rqs_control_type_q_64
#define rqs_inform_type rqs_inform_type_q_64
#define rqs_time_type rqs_time_type_q_64
#define rqs_history_type rqs_history_type_q_64
#define sbls_control_type sbls_control_type_q_64
#define sbls_inform_type sbls_inform_type_q_64
#define sbls_time_type sbls_time_type_q_64
Expand All @@ -1114,6 +1121,7 @@
#define trs_control_type trs_control_type_q_64
#define trs_inform_type trs_inform_type_q_64
#define trs_time_type trs_time_type_q_64
#define trs_history_type trs_history_type_q_64
#define tru_control_type tru_control_type_q_64
#define tru_inform_type tru_inform_type_q_64
#define tru_time_type tru_time_type_q_64
Expand Down Expand Up @@ -1589,9 +1597,11 @@
#define llsr_control_type llsr_control_type_64
#define llsr_inform_type llsr_inform_type_64
#define llsr_time_type llsr_time_type_64
#define llsr_history_type llsr_history_type_64
#define llst_control_type llst_control_type_64
#define llst_inform_type llst_inform_type_64
#define llst_time_type llst_time_type_64
#define llst_history_type llst_history_type_64
#define lms_control_type lms_control_type_64
#define lms_inform_type lms_inform_type_64
#define lms_time_type lms_time_type_64
Expand Down Expand Up @@ -1631,6 +1641,7 @@
#define rqs_control_type rqs_control_type_64
#define rqs_inform_type rqs_inform_type_64
#define rqs_time_type rqs_time_type_64
#define rqs_history_type rqs_history_type_64
#define sbls_control_type sbls_control_type_64
#define sbls_inform_type sbls_inform_type_64
#define sbls_time_type sbls_time_type_64
Expand All @@ -1653,6 +1664,7 @@
#define trs_control_type trs_control_type_64
#define trs_inform_type trs_inform_type_64
#define trs_time_type trs_time_type_64
#define trs_history_type trs_history_type_64
#define tru_control_type tru_control_type_64
#define tru_inform_type tru_inform_type_64
#define tru_time_type tru_time_type_64
Expand Down Expand Up @@ -2130,9 +2142,11 @@
#define llsr_control_type llsr_control_type_s
#define llsr_inform_type llsr_inform_type_s
#define llsr_time_type llsr_time_type_s
#define llst_control_type llst_control_type_s
#define llsr_history_type llsr_history_type_s
#define llst_history_type llst_history_type_s
#define llst_inform_type llst_inform_type_s
#define llst_time_type llst_time_type_s
#define llst_control_type llst_control_type_s
#define lms_control_type lms_control_type_s
#define lms_inform_type lms_inform_type_s
#define lms_time_type lms_time_type_s
Expand Down Expand Up @@ -2172,6 +2186,7 @@
#define rqs_control_type rqs_control_type_s
#define rqs_inform_type rqs_inform_type_s
#define rqs_time_type rqs_time_type_s
#define rqs_history_type rqs_history_type_s
#define sbls_control_type sbls_control_type_s
#define sbls_inform_type sbls_inform_type_s
#define sbls_time_type sbls_time_type_s
Expand All @@ -2194,6 +2209,7 @@
#define trs_control_type trs_control_type_s
#define trs_inform_type trs_inform_type_s
#define trs_time_type trs_time_type_s
#define trs_history_type trs_history_type_s
#define tru_control_type tru_control_type_s
#define tru_inform_type tru_inform_type_s
#define tru_time_type tru_time_type_s
Expand Down Expand Up @@ -2669,9 +2685,11 @@
#define llsr_control_type llsr_control_type_q
#define llsr_inform_type llsr_inform_type_q
#define llsr_time_type llsr_time_type_q
#define llsr_history_type llsr_history_type_q
#define llst_control_type llst_control_type_q
#define llst_inform_type llst_inform_type_q
#define llst_time_type llst_time_type_q
#define llst_history_type llst_history_type_q
#define lms_control_type lms_control_type_q
#define lms_inform_type lms_inform_type_q
#define lms_time_type lms_time_type_q
Expand Down Expand Up @@ -2711,6 +2729,7 @@
#define rqs_control_type rqs_control_type_q
#define rqs_inform_type rqs_inform_type_q
#define rqs_time_type rqs_time_type_q
#define rqs_history_type rqs_history_type_q
#define sbls_control_type sbls_control_type_q
#define sbls_inform_type sbls_inform_type_q
#define sbls_time_type sbls_time_type_q
Expand All @@ -2733,6 +2752,7 @@
#define trs_control_type trs_control_type_q
#define trs_inform_type trs_inform_type_q
#define trs_time_type trs_time_type_q
#define trs_history_type trs_history_type_q
#define tru_control_type tru_control_type_q
#define tru_inform_type tru_inform_type_q
#define tru_time_type tru_time_type_q
Expand All @@ -2747,3 +2767,4 @@
#endif
#endif
#endif

30 changes: 15 additions & 15 deletions src/arc/C/arc_ciface.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! THIS VERSION: GALAHAD 4.1 - 2023-01-24 AT 09:30 GMT.
! THIS VERSION: GALAHAD 5.2 - 2025-01-12 AT 09:20 GMT.

#include "galahad_modules.h"
#include "galahad_cfunctions.h"
Expand Down Expand Up @@ -138,13 +138,13 @@ MODULE GALAHAD_ARC_precision_ciface
LOGICAL ( KIND = C_BOOL ) :: space_critical
LOGICAL ( KIND = C_BOOL ) :: deallocate_error_fatal
CHARACTER ( KIND = C_CHAR ), DIMENSION( 31 ) :: prefix
TYPE ( RQS_control_type ) :: rqs_control
TYPE ( GLRT_control_type ) :: glrt_control
TYPE ( DPS_control_type ) :: dps_control
TYPE ( PSLS_control_type ) :: psls_control
TYPE ( LMS_control_type ) :: lms_control
TYPE ( LMS_control_type ) :: lms_control_prec
TYPE ( SHA_control_type ) :: sha_control
TYPE ( rqs_control_type ) :: rqs_control
TYPE ( glrt_control_type ) :: glrt_control
TYPE ( dps_control_type ) :: dps_control
TYPE ( psls_control_type ) :: psls_control
TYPE ( lms_control_type ) :: lms_control
TYPE ( lms_control_type ) :: lms_control_prec
TYPE ( sha_control_type ) :: sha_control
END TYPE arc_control_type

TYPE, BIND( C ) :: arc_time_type
Expand Down Expand Up @@ -179,13 +179,13 @@ MODULE GALAHAD_ARC_precision_ciface
REAL ( KIND = rpc_ ) :: norm_g
REAL ( KIND = rpc_ ) :: weight
TYPE ( arc_time_type ) :: time
TYPE ( RQS_inform_type ) :: rqs_inform
TYPE ( GLRT_inform_type ) :: glrt_inform
TYPE ( DPS_inform_type ) :: dps_inform
TYPE ( PSLS_inform_type ) :: psls_inform
TYPE ( LMS_inform_type ) :: lms_inform
TYPE ( LMS_inform_type ) :: lms_inform_prec
TYPE ( SHA_inform_type ) :: sha_inform
TYPE ( rqs_inform_type ) :: rqs_inform
TYPE ( glrt_inform_type ) :: glrt_inform
TYPE ( dps_inform_type ) :: dps_inform
TYPE ( psls_inform_type ) :: psls_inform
TYPE ( lms_inform_type ) :: lms_inform
TYPE ( lms_inform_type ) :: lms_inform_prec
TYPE ( sha_inform_type ) :: sha_inform
END TYPE arc_inform_type

!----------------------
Expand Down
3 changes: 1 addition & 2 deletions src/glrt/C/glrtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(void) {
} else {
control.unitm = true;
}
control.print_level = 1;
// control.print_level = 1;
glrt_import_control( &control, &data, &status );
// resolve with a larger weight ?
for( ipc_ new_weight=0; new_weight <= 1; new_weight++){
Expand All @@ -49,7 +49,6 @@ int main(void) {
weight = 10.0;
status = 6;
}
printf("MR = %1" i_ipc_ "%1" i_ipc_ "\n", unit_m, new_weight );
for( ipc_ i = 0; i < n; i++) r[i] = 1.0;

// iteration loop to find the minimizer
Expand Down
28 changes: 14 additions & 14 deletions src/trb/C/trb_ciface.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! THIS VERSION: GALAHAD 4.1 - 2023-01-24 AT 09:30 GMT.
! THIS VERSION: GALAHAD 5.2 - 2025-01-12 AT 09:10 GMT.

#include "galahad_modules.h"
#include "galahad_cfunctions.h"
Expand Down Expand Up @@ -132,12 +132,12 @@ MODULE GALAHAD_TRB_precision_ciface
LOGICAL ( KIND = C_BOOL ) :: space_critical
LOGICAL ( KIND = C_BOOL ) :: deallocate_error_fatal
CHARACTER ( KIND = C_CHAR ), DIMENSION( 31 ) :: prefix
TYPE ( TRS_control_type ) :: trs_control
TYPE ( GLTR_control_type ) :: gltr_control
TYPE ( PSLS_control_type ) :: psls_control
TYPE ( LMS_control_type ) :: lms_control
TYPE ( LMS_control_type ) :: lms_control_prec
TYPE ( SHA_control_type ) :: sha_control
TYPE ( trs_control_type ) :: trs_control
TYPE ( gltr_control_type ) :: gltr_control
TYPE ( psls_control_type ) :: psls_control
TYPE ( lms_control_type ) :: lms_control
TYPE ( lms_control_type ) :: lms_control_prec
TYPE ( sha_control_type ) :: sha_control
END TYPE TRB_control_type

TYPE, BIND( C ) :: TRB_time_type
Expand Down Expand Up @@ -172,13 +172,13 @@ MODULE GALAHAD_TRB_precision_ciface
REAL ( KIND = rpc_ ) :: obj
REAL ( KIND = rpc_ ) :: norm_pg
REAL ( KIND = rpc_ ) :: radius
TYPE ( TRB_time_type ) :: time
TYPE ( TRS_inform_type ) :: trs_inform
TYPE ( GLTR_inform_type ) :: gltr_inform
TYPE ( PSLS_inform_type ) :: psls_inform
TYPE ( LMS_inform_type ) :: lms_inform
TYPE ( LMS_inform_type ) :: lms_inform_prec
TYPE ( SHA_inform_type ) :: sha_inform
TYPE ( trb_time_type ) :: time
TYPE ( trs_inform_type ) :: trs_inform
TYPE ( gltr_inform_type ) :: gltr_inform
TYPE ( psls_inform_type ) :: psls_inform
TYPE ( lms_inform_type ) :: lms_inform
TYPE ( lms_inform_type ) :: lms_inform_prec
TYPE ( sha_inform_type ) :: sha_inform
END TYPE TRB_inform_type

!----------------------
Expand Down

0 comments on commit 5c8f4cb

Please sign in to comment.