File: ode_simple_check.cpp

package info (click to toggle)
cppad 2025.00.00.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,552 kB
  • sloc: cpp: 112,594; sh: 5,972; ansic: 179; python: 71; sed: 12; makefile: 10
file content (30 lines) | stat: -rw-r--r-- 741 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
// SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
// SPDX-FileContributor: 2003-22 Bradley M. Bell
// ----------------------------------------------------------------------------
# include "ode_run.hpp"
# include "ode_simple.hpp"
# include "ode_check.hpp"

bool ode_simple_check(void)
{  bool ok = true;
   bool retape;
   size_t i;

   // solution vector
   NumberVector x;

   // number of time grid intervals between measurement values
   SizeVector N(Nz + 1);
   N[0] = 0;
   for(i = 1; i <= Nz; i++)
      N[i] = 4;

   for(i = 0; i < 2; i++)
   {  retape = bool(i);
      ipopt_ode_case<FG_simple>(retape, N, x);
      ok &= ode_check(N, x);
   }

   return ok;
}