Skip to content

Commit

Permalink
Fixes to c++ examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillis committed Apr 4, 2023
1 parent b1e3f3e commit ad3fa3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/examples/cplusplus/c_api_usage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int main(){

// More simple functions
Function g("g", {x, y}, {sqrt(y)-1, sin(x)-y});
Function h("h", {x}, {y*y});
Function h("h", {y}, {y*y});

// Mode 2: FileSerializer (allows packing a list of Functions)
{
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/cplusplus/implicit_runge-kutta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ int main(int argc, char *argv[]) {
integrator_in(), integrator_out());

// Create a conventional integrator for reference
Function ref_integrator = integrator("ref_integrator",
"cvodes", dae, {{"tf", tf}});
Function ref_integrator = integrator("ref_integrator", "cvodes", dae, 0, tf);

// Test values
std::vector<double> x0_val = {0, 1, 0};
Expand Down

0 comments on commit ad3fa3e

Please sign in to comment.