53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
return result;
}
int rank;
return a.lssolve (b, info, rank);
}
DEFUN_DLD (mtt_implicit, args, ,
"implicit integration method")
{
#ifdef OCTAVE_DEV
static ColumnVector x = args(0).column_vector_value ();
const ColumnVector dx = args(1).column_vector_value ();
const Matrix AA = args(2).matrix_value ();
const ColumnVector AAx = args(3).column_vector_value ();
const double t = args(4).double_value ();
const int Nx = (int) (args(5).double_value ());
const ColumnVector openx = args(6).column_vector_value ();
#else
static ColumnVector x = args(0).vector_value ();
const ColumnVector dx = args(1).vector_value ();
const Matrix AA = args(2).matrix_value ();
const ColumnVector AAx = args(3).vector_value ();
const double t = args(4).double_value ();
const int Nx = (int) (args(5).double_value ());
const ColumnVector openx = args(6).vector_value ();
#endif
register int i, n;
register int col_old, col_new;
register int row_old, row_new;
n = Nx;
for (i = 0; i < Nx; i++)
|
>
>
>
>
>
>
>
>
>
>
|
|
>
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
return result;
}
int rank;
return a.lssolve (b, info, rank);
}
#ifdef STANDALONE
ColumnVector Fmtt_implicit ( ColumnVector &x,
const ColumnVector &dx,
const Matrix &AA,
const ColumnVector &AAx,
const double &t,
const int &Nx,
const ColumnVector &openx)
{
#else // !STANDALONE
DEFUN_DLD (mtt_implicit, args, ,
"implicit integration method")
{
#ifdef OCTAVE_DEV
static ColumnVector x = args(0).column_vector_value ();
const ColumnVector dx = args(1).column_vector_value ();
const Matrix AA = args(2).matrix_value ();
const ColumnVector AAx = args(3).column_vector_value ();
const double t = args(4).double_value ();
const int Nx = (int) (args(5).double_value ());
const ColumnVector openx = args(6).column_vector_value ();
#else // !OCTAVE_DEV
static ColumnVector x = args(0).vector_value ();
const ColumnVector dx = args(1).vector_value ();
const Matrix AA = args(2).matrix_value ();
const ColumnVector AAx = args(3).vector_value ();
const double t = args(4).double_value ();
const int Nx = (int) (args(5).double_value ());
const ColumnVector openx = args(6).vector_value ();
#endif // OCTAVE_DEV
#endif // STANDALONE
register int i, n;
register int col_old, col_new;
register int row_old, row_new;
n = Nx;
for (i = 0; i < Nx; i++)
|
129
130
131
132
133
134
135
136
137
138
139
|
}
else
{
x (row_old) = 0.0;
}
}
return octave_value (x);
}
|
>
>
>
<
|
|
|
140
141
142
143
144
145
146
147
148
149
150
151
152
|
}
else
{
x (row_old) = 0.0;
}
}
#ifdef STANDALONE
return x;
#else // !STANDALONE
return octave_value (x);
#endif // STANDALONE
}
|