Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variables #78

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions interfaces/python/exago_python_opflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,6 @@ class OPFLOW_wrapper {
}
};

/*
* Calculate the number of types in the opflow type enums. An immediately
* invoked lambda is used to keep the final variable const, even thought we have
* to perform some operations to calculate that value.
*/
constexpr int num_objective_types = 0
#define OPFLOW_OBJ_DEF(x) +1
#include "private/opflow_enum.def"
#undef OPFLOW_OBJ_DEF
;

constexpr int num_initialization_types = 0
#define OPFLOW_INIT_DEF(x) +1
#include "private/opflow_enum.def"
#undef OPFLOW_INIT_DEF
;

constexpr int num_gen_bus_voltage_types = 0
#define OPFLOW_GBV(x) +1
#include "private/opflow_enum.def"
#undef OPFLOW_GBV_DEF
;

// -------------------------------------------------------------
// init_exago_opflow
// -------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions src/scopflow/interface/scopflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,10 @@ PetscErrorCode SCOPFLOWSetUp(SCOPFLOW scopflow) {
char scopflowmodelname[max_model_name_len];
char scopflowsubproblemsolvername[max_solver_name_len];
char scopflowsubproblemmodelname[max_model_name_len];
#if defined(EXAGO_ENABLE_HIOP)
char scopflowsubproblemmemspacename[max_model_name_len];
char computemodename[max_model_name_len];
#endif
PetscBool scopflowsolverset = PETSC_FALSE;

(void)std::strncpy(scopflowmodelname,
Expand Down
2 changes: 2 additions & 0 deletions src/sopflow/interface/sopflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ PetscErrorCode SOPFLOWSetUp(SOPFLOW sopflow) {
char sopflowmodelname[max_model_name_len];
char sopflowsubproblemmodelname[max_model_name_len];
char sopflowsubproblemsolvername[max_solver_name_len];
#if defined(EXAGO_ENABLE_HIOP)
char sopflowsubproblemmemspace[PETSC_MAX_PATH_LEN];
#endif

(void)std::strncpy(sopflowmodelname,
SOPFLOWOptions::sopflow_model.default_value.c_str(),
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_acopf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ int main(int argc, char **argv) {
const bool isTestOpflowModelPBPOLRAJAHIOP = true;
const bool isTestOpflowModelPBPOLHIOP = false;
#else
const bool isTestOpflowModelPBPOLRAJAHIOP = false;
const bool isTestOpflowModelPBPOLHIOP = true;
#endif
PetscErrorCode ierr;
Expand Down