diff --git a/lib/include/resdata/well/well_state.hpp b/lib/include/resdata/well/well_state.hpp index b61b1f1ae..c7eab2536 100644 --- a/lib/include/resdata/well/well_state.hpp +++ b/lib/include/resdata/well/well_state.hpp @@ -67,11 +67,6 @@ int well_state_get_well_nr(const well_state_type *well_state); const well_conn_type * well_state_get_global_wellhead(const well_state_type *well_state); -const well_conn_type * -well_state_iget_wellhead(const well_state_type *well_state, int grid_nr); -const well_conn_type *well_state_get_wellhead(const well_state_type *well_state, - const char *grid_name); - well_type_enum well_state_translate_rd_type_int(int int_type); const well_conn_collection_type * diff --git a/lib/resdata/well_state.cpp b/lib/resdata/well_state.cpp index 8c5e1955c..07f6c19d2 100644 --- a/lib/resdata/well_state.cpp +++ b/lib/resdata/well_state.cpp @@ -260,10 +260,10 @@ double well_state_get_volume_rate_si(const well_state_type *well_state) { return well_state->volume_rate; } -void well_state_add_wellhead(well_state_type *well_state, - const rd_rsthead_type *header, - const rd_kw_type *iwel_kw, int well_nr, - const char *grid_name, int grid_nr) { +static void well_state_add_wellhead(well_state_type *well_state, + const rd_rsthead_type *header, + const rd_kw_type *iwel_kw, int well_nr, + const char *grid_name, int grid_nr) { well_conn_type *wellhead = well_conn_alloc_wellhead(iwel_kw, header, well_nr); @@ -623,27 +623,9 @@ time_t well_state_get_sim_time(const well_state_type *well_state) { return well_state->valid_from_time; } -/** - Will return NULL if no wellhead in this grid. -*/ -const well_conn_type * -well_state_iget_wellhead(const well_state_type *well_state, int grid_nr) { - if (grid_nr < static_cast(well_state->index_wellhead.size())) - return well_state->index_wellhead[grid_nr]; - else - return NULL; -} - -bool well_state_has_named_well_conn(const well_state_type *well_state, - const char *grid_name) { - const auto it = well_state->name_wellhead.find(grid_name); - if (it == well_state->name_wellhead.end()) - return false; - return true; -} - -const well_conn_type *well_state_get_wellhead(const well_state_type *well_state, - const char *grid_name) { +static const well_conn_type * +well_state_get_wellhead(const well_state_type *well_state, + const char *grid_name) { const auto it = well_state->name_wellhead.find(grid_name); if (it != well_state->name_wellhead.end()) return it->second;