FFEA
Fluctuating Finite Element Analysis
SparseMatrixFixedPattern.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 SPARSEMATRIXFIXEDPATTERN_H_INCLUDED
25
#define SPARSEMATRIXFIXEDPATTERN_H_INCLUDED
26
27
#include "
FFEA_return_codes.h
"
28
#include "
mat_vec_types.h
"
29
#include "
mat_vec_fns.h
"
30
#include "
SparseMatrixTypes.h
"
31
#include <iostream>
32
#include <stdlib.h>
33
34
using namespace
std
;
35
36
class
SparseMatrixFixedPattern
{
37
public
:
38
SparseMatrixFixedPattern
();
39
40
~
SparseMatrixFixedPattern
();
41
42
int
init(
int
num_rows,
int
num_nonzero_elements,
sparse_entry
*entry,
int
*key,
sparse_entry_sources
*source_list);
43
int
init(
int
num_rows,
int
num_entries,
scalar
*entries,
int
*key,
int
*col_indices);
44
46
void
build();
47
49
void
apply(
scalar
*in,
scalar
*result);
50
52
void
apply(
vector3
*in,
vector3
*result);
53
55
void
block_apply(
vector3
*in,
vector3
*result);
56
58
void
block_apply(
vector3
**in,
vector3
**result);
59
61
void
block_apply(
vector3
**in);
62
64
SparseMatrixFixedPattern
* apply(
SparseMatrixFixedPattern
*in);
65
66
void
calc_inverse_diagonal(
scalar
*inv_D);
67
68
void
print();
69
70
void
print_dense();
71
73
void
print_dense_to_file(
vector3
*a);
74
75
void
print_row_column();
76
77
void
check_symmetry();
78
79
void
am_i_diagonally_dominant();
80
81
sparse_entry
* get_entries();
82
83
int
* get_key();
84
85
int
get_num_nonzero_elements();
86
87
int
get_num_rows();
88
89
int
get_num_columns();
90
91
private
:
92
94
int
num_rows
;
95
97
int
num_nonzero_elements
;
98
100
sparse_entry
*
entry
;
101
103
int
*
key
;
104
106
scalar
**
diagonal
;
107
109
sparse_entry_sources
*
source_list
;
110
};
111
112
#endif
SparseMatrixFixedPattern::num_rows
int num_rows
Definition:
SparseMatrixFixedPattern.h:94
SparseMatrixFixedPattern::entry
sparse_entry * entry
Definition:
SparseMatrixFixedPattern.h:100
FFEA_return_codes.h
SparseMatrixFixedPattern::diagonal
scalar ** diagonal
Definition:
SparseMatrixFixedPattern.h:106
sparse_entry
Definition:
SparseMatrixTypes.h:30
std
STL namespace.
SparseMatrixFixedPattern::num_nonzero_elements
int num_nonzero_elements
Definition:
SparseMatrixFixedPattern.h:97
mat_vec_types.h
SparseMatrixFixedPattern
Definition:
SparseMatrixFixedPattern.h:36
SparseMatrixFixedPattern::source_list
sparse_entry_sources * source_list
Definition:
SparseMatrixFixedPattern.h:109
sparse_entry_sources
Definition:
SparseMatrixTypes.h:36
SparseMatrixFixedPattern::key
int * key
Definition:
SparseMatrixFixedPattern.h:103
SparseMatrixTypes.h
vector3
Definition:
mat_vec_types.h:90
mat_vec_fns.h
scalar
double scalar
Definition:
mat_vec_types.h:36
include
SparseMatrixFixedPattern.h
Generated by
1.8.13