Skip to content

Commit

Permalink
Added CVODE max order to model settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquinffernandez committed Jul 31, 2024
1 parent 0b3620c commit 5c7d22e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/engine/common/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,13 @@ int _getOrder(SD_Solver sol)

SET_settings SET_Settings(char *fname)
{
config_t cfg, *cf;
config_t cfg;
config_t *cf;
const config_setting_t *lists;
int count, n, ires, option;
int count;
int n;
int ires;
int option;
double dres;
const char *sol;
const char *bdf;
Expand Down Expand Up @@ -153,6 +157,7 @@ SET_settings SET_Settings(char *fname)
p->dtSynch = SD_DT_Adaptive;
p->BDFPart = 0;
p->BDFPartitionDepth = 1;
p->CVODE_max_order = 0;
p->BDFMaxStep = 0;
if (config_lookup_float(cf, "minstep", &dres)) {
if (dres == 0) {
Expand Down Expand Up @@ -201,6 +206,9 @@ SET_settings SET_Settings(char *fname)
if (config_lookup_int(cf, "jacobian", &ires)) {
p->jacobian = ires;
}
if (config_lookup_int(cf, "CVODEMaxOrder", &ires)) {
p->CVODE_max_order = ires;
}
if (config_lookup_int(cf, "nodesize", &ires)) {
if (ires == 0) {
p->nodesize = NODE_SIZE;
Expand Down
1 change: 1 addition & 0 deletions src/engine/common/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct SET_settings_ {
int nDQRel;
int jacobian;
int BDFPartitionDepth;
int CVODE_max_order;
SD_PartitionMethod pm;
SD_DtSynch dtSynch;
SD_partitionerOptions partitionerOptions;
Expand Down

0 comments on commit 5c7d22e

Please sign in to comment.