SparsityPattern.h
Go to the documentation of this file.
1 //
2 // This file is part of the FFEA simulation package
3 //
4 // Copyright (c) by the Theory and Development FFEA teams,
5 // as they appear in the README.md file.
6 //
7 // FFEA 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 3 of the License, or
10 // (at your option) any later version.
11 //
12 // FFEA 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 FFEA. If not, see <http://www.gnu.org/licenses/>.
19 //
20 // To help us fund FFEA development, we humbly ask that you cite
21 // the research papers on the package.
22 //
23 
24 #ifndef SPARSITYPATTERN_H_INCLUDED
25 #define SPARSITYPATTERN_H_INCLUDED
26 
27 #include <list>
28 #include <vector>
29 
30 #include "mat_vec_types.h"
31 #include "FFEA_return_codes.h"
32 
33 #include "SparseMatrixTypes.h"
35 
36 using namespace std;
37 
38 typedef struct {
40  vector<scalar *> source_list;
41 
43 
45 public:
47 
48  ~SparsityPattern();
49 
50  int init(int num_rows);
51 
52  /* * */
53  int register_contribution(int i, int j, scalar *contrib_memory_loc);
54 
55  bool check_for_contribution(int i, int j);
56 
58  SparseMatrixFixedPattern * create_sparse_matrix();
59 
60  void print();
61 
62 private:
63 
64  int num_rows;
65 
67  list<sparse_contribution_location*> *row;
68 
70 };
71 
72 #endif
Definition: SparsityPattern.h:38
int num_rows
Number of rows in matrix.
Definition: SparsityPattern.h:64
STL namespace.
Definition: SparsityPattern.h:44
Definition: SparseMatrixFixedPattern.h:36
vector< scalar * > source_list
Definition: SparsityPattern.h:40
list< sparse_contribution_location * > * row
Definition: SparsityPattern.h:67
int num_nonzero_elements
Total number of nonzero elements in the sparsity pattern */.
Definition: SparsityPattern.h:69
static const int i
index of ith thing
Definition: rod_math_v9.h:63
int column_index
Definition: SparsityPattern.h:39
double scalar
Definition: mat_vec_types.h:36