1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <octave/oct.h>
#include <octave/xdiv.h>
#ifdef STANDALONE
ColumnVector Fmtt_implicit ( ColumnVector &x,
ColumnVector &dx,
Matrix &AA,
const ColumnVector &AAx,
const double &t,
const int &Nx,
const ColumnVector &openx)
{
#else // !STANDALONE
DEFUN_DLD (mtt_implicit, args, ,
"implicit integration method")
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <octave/oct.h>
#include <octave/xdiv.h>
#ifdef STANDALONE
ColumnVector Fmtt_implicit ( ColumnVector &x,
ColumnVector &dx,
Matrix &AA,
ColumnVector &AAx,
const double &t,
const int &Nx,
const ColumnVector &openx)
{
#else // !STANDALONE
DEFUN_DLD (mtt_implicit, args, ,
"implicit integration method")
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
register int row, col;
for (row = 0; row < Nx; row++)
{
if (0 != openx (row))
{
dx (row) = 0.0;
for (col = 0; col < Nx; col++)
{
AA (row,col) = AA (col,row) = 0.0;
}
}
}
x = static_cast<ColumnVector> (xleftdiv (AA, static_cast<Matrix>(AAx + dx * t)));
for (row = 0; row < Nx; row++)
|
>
|
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
register int row, col;
for (row = 0; row < Nx; row++)
{
if (0 != openx (row))
{
AAx (row) = 0.0;
dx (row) = 0.0;
for (col = 0; col < Nx; col++)
{
AA (row,col) = 0.0;
}
}
}
x = static_cast<ColumnVector> (xleftdiv (AA, static_cast<Matrix>(AAx + dx * t)));
for (row = 0; row < Nx; row++)
|