nec2++  1.7.0
matrix_algebra.h
1 #ifndef __matrix_algebra__
2 #define __matrix_algebra__
3 
4 /*
5  Copyright (C) 2004, 2015 Timothy C.A. Molteno
6 
7  This program is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 
22 #include "math_util.h"
23 #include "nec_output.h"
24 
27 void lu_decompose(nec_output_file& s_output, int64_t n, complex_array& a, int_array& ip, int64_t ndim);
28 void solve( int n, complex_array& a, int_array& ip, complex_array& b, int64_t ndim );
29 
32 void lu_decompose_ge(nec_output_file& s_output, int64_t n, complex_array& a, int_array& ip, int64_t ndim);
33 void solve_ge( int n, complex_array& a, int_array& ip, complex_array& b, int64_t ndim );
34 
35 #if LAPACK
36 
39 void lu_decompose_lapack(nec_output_file& s_output, int64_t n, complex_array& a, int_array& ip, int64_t ndim);
40 void solve_lapack( int n, complex_array& a, int_array& ip, complex_array& b, int64_t ndim );
41 #endif
42 
43 
44 void factrs(nec_output_file& s_output, int64_t np, int64_t nrow, complex_array& a, int_array& ip );
45 void solves(complex_array& a, int_array& ip, complex_array& b, int64_t neq,
46  int64_t nrh, int64_t np, int64_t n, int64_t mp, int64_t m, int64_t nop,
47  complex_array& symmetry_array);
48 
49 
50 /* Do some simple tests for integration convergence */
51 
52 void test(nec_float f1r, nec_float f2r, nec_float *tr, nec_float f1i,
53  nec_float f2i, nec_float *ti, nec_float dmin);
54 
55 nec_float test_simple( nec_float f1r, nec_float f2r, nec_float dmin );
56 
57 #ifdef NEC_ERROR_CHECK
58 void to_octave(nec_complex& x);
59 void to_octave(int& x);
60 void to_octave(nec_complex* a, int n, int ndim);
61 void to_octave(complex_array& a, int n, int ndim);
62 void to_octave(int* a, int n);
63 void to_octave(int_array& a, int n);
64 #endif /* NEC_ERROR_CHECK */
65 
66 #endif /* __matrix_algebra__ */
Definition: nec_output.h:56