Skip to content

Commit

Permalink
switch back to AMD ordering (seems as if COLAMD is slower for big sys…
Browse files Browse the repository at this point in the history
…tems)
  • Loading branch information
fabian.froehlich committed Jul 26, 2016
1 parent f1bb89b commit ecb4c4d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions @amimodel/generateM.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function generateM(this, amimodelo2)
'%% 1: Hermite (DEFAULT for problems without discontinuities)\n'...
'%% 2: Polynomial (DEFAULT for problems with discontinuities)\n'...
'%% .ordering ... online state reordering.\n'...
'%% 0: AMD reordering\n'...
'%% 1: COLAMD reordering (default)\n'...
'%% 0: AMD reordering (default)\n'...
'%% 1: COLAMD reordering\n'...
'%% 2: natural reordering\n'...
'%%\n'...
'%% Outputs:\n'...
Expand Down
2 changes: 1 addition & 1 deletion @amioption/amioption.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
% number of reported events
nmaxevent = 10;
% reordering of states
ordering = 1;
ordering = 0;
% steady state sensitivity flag
ss = 0;
% custom initial sensitivity
Expand Down
16 changes: 16 additions & 0 deletions src/symbolic_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ double amilog(double x) {
}
}

/**
* c implementation of matlab function dirac
*
* @param x argument
* @return if(x==0) then INF else 0
*
*/
double dirac(double x) {
if (x == 0) {
return(DBL_MAX);
} else {
return(0);
}
}

/**
* c implementation of matlab function heaviside
*
Expand All @@ -61,6 +76,7 @@ double heaviside(double x) {
}



/**
* c implementation of matlab function sign
*
Expand Down

0 comments on commit ecb4c4d

Please sign in to comment.