1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "mtt_Hybrd_Solver.hh"
// http://www.netlib.org/minpack/hybrd.f
// used by Octave's fsolve
Hybrd_Solver *Hybrd_Solver::static_ptr;
ColumnVector
Hybrd_Solver::f_hybrd (const ColumnVector &tryUi)
{
Hybrd_Solver::static_ptr->_yz = Hybrd_Solver::static_ptr->eval(tryUi);
return Hybrd_Solver::static_ptr->_yz;
}
void
Hybrd_Solver::Solve (void)
{
int info;
static int input_errors;
static int user_errors;
static int convergences;
static int progress_errors;
static int limit_errors;
|
|
>
>
|
>
>
>
>
|
>
>
>
|
|
|
|
|
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
31
32
33
|
#include "mtt_Hybrd_Solver.hh"
// http://www.netlib.org/minpack/hybrd.f
// used by Octave's fsolve
MTT::Hybrd_Solver *MTT::Hybrd_Solver::static_ptr;
MTT::Hybrd_Solver (const int npar,
const int nu,
const int nx,
const int ny,
const int nyz)
{
static_ptr = this;
}
ColumnVector
MTT::Hybrd_Solver::f_hybrd (const ColumnVector &tryUi)
{
MTT::Hybrd_Solver::static_ptr->_yz = MTT::Hybrd_Solver::static_ptr->eval(tryUi);
return MTT::Hybrd_Solver::static_ptr->_yz;
}
void
MTT::Hybrd_Solver::Solve (void)
{
int info;
static int input_errors;
static int user_errors;
static int convergences;
static int progress_errors;
static int limit_errors;
|
60
61
62
63
64
65
66
67
|
<< " converge (" << convergences << ") "
<< " progress (" << progress_errors << ") "
<< " limit (" << limit_errors << ")"
<< " unknown (" << unknown_errors << ")"
<< " (max error = " << std::abs(eval(_ui).max()) << ")" << std::endl;
}
}
|
<
|
69
70
71
72
73
74
75
|
<< " converge (" << convergences << ") "
<< " progress (" << progress_errors << ") "
<< " limit (" << limit_errors << ")"
<< " unknown (" << unknown_errors << ")"
<< " (max error = " << std::abs(eval(_ui).max()) << ")" << std::endl;
}
}
|