FEI
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
base
fei_MatrixTraits_LinSysCore.hpp
1
/*--------------------------------------------------------------------*/
2
/* Copyright 2005 Sandia Corporation. */
3
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
4
/* non-exclusive license for use of this work by or on behalf */
5
/* of the U.S. Government. Export of this program may require */
6
/* a license from the United States Government. */
7
/*--------------------------------------------------------------------*/
8
9
#ifndef _fei_MatrixTraits_LinSysCore_hpp_
10
#define _fei_MatrixTraits_LinSysCore_hpp_
11
12
//This file defines matrix traits for LinearSystemCore matrices
13
//(well, "matrix-views" to be more precise).
14
//
15
16
#include <fei_LinearSystemCore.hpp>
17
18
namespace
fei
{
19
21
template
<>
22
struct
MatrixTraits
<
LinearSystemCore
> {
23
25
static
const
char
*
typeName
()
26
{
return
(
"LinearSystemCore"
); }
27
28
static
double
* getBeginPointer(
LinearSystemCore
* lsc)
29
{
30
return
lsc->getMatrixBeginPointer();
31
}
32
33
static
int
getOffset(
LinearSystemCore
* lsc,
int
row,
int
col)
34
{
35
return
lsc->getMatrixOffset(row,col);
36
}
37
40
static
int
setValues
(
LinearSystemCore
* lsc,
double
scalar)
41
{
42
return
( lsc->
resetMatrix
(scalar) );
43
}
44
48
static
int
getNumLocalRows
(
LinearSystemCore
* lsc,
int
& numRows)
49
{
50
numRows = -1;
51
return
(-1);
52
}
53
56
static
int
getRowLength
(
LinearSystemCore
* lsc,
int
row,
int
& length)
57
{
58
return
( lsc->
getMatrixRowLength
(row, length) );
59
}
60
73
static
int
copyOutRow
(
LinearSystemCore
* lsc,
74
int
row,
int
len,
double
* coefs,
int
* indices)
75
{
76
int
dummy;
77
return
( lsc->
getMatrixRow
(row, coefs, indices, len, dummy) );
78
}
79
82
static
int
putValuesIn
(
LinearSystemCore
* lsc,
83
int
numRows,
const
int
* rows,
84
int
numCols,
const
int
* cols,
85
const
double
*
const
* values,
86
bool
sum_into)
87
{
88
if
(sum_into) {
89
return
( lsc->
sumIntoSystemMatrix
(numRows, rows,
90
numCols, cols, values) );
91
}
92
else
{
93
return
( lsc->
putIntoSystemMatrix
(numRows, rows,
94
numCols, cols, values) );
95
}
96
}
97
102
static
int
globalAssemble
(
LinearSystemCore
* lsc)
103
{
104
return
( lsc->
matrixLoadComplete
() );
105
}
106
108
static
int
matvec
(
LinearSystemCore
* lsc,
109
fei::Vector
* x,
110
fei::Vector
* y)
111
{
112
return
( -1 );
113
}
114
};
//struct MatrixTraits
115
}
//namespace fei
116
117
#endif
// _fei_MatrixTraits_LinSysCore_hpp_
LinearSystemCore
Definition
fei_LinearSystemCore.hpp:124
LinearSystemCore::getMatrixRow
virtual int getMatrixRow(int row, double *coefs, int *indices, int len, int &rowLength)=0
LinearSystemCore::sumIntoSystemMatrix
virtual int sumIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, int numBlkRows, const int *blkRows, int numBlkCols, const int *blkCols, const double *const *values)=0
LinearSystemCore::putIntoSystemMatrix
virtual int putIntoSystemMatrix(int numPtRows, const int *ptRows, int numPtCols, const int *ptCols, const double *const *values)=0
LinearSystemCore::getMatrixRowLength
virtual int getMatrixRowLength(int row, int &length)=0
LinearSystemCore::resetMatrix
virtual int resetMatrix(double s)=0
LinearSystemCore::matrixLoadComplete
virtual int matrixLoadComplete()=0
fei::Vector
Definition
fei_Vector.hpp:57
fei
Definition
fei_ArrayUtils.hpp:16
fei::MatrixTraits< LinearSystemCore >::typeName
static const char * typeName()
Definition
fei_MatrixTraits_LinSysCore.hpp:25
fei::MatrixTraits< LinearSystemCore >::globalAssemble
static int globalAssemble(LinearSystemCore *lsc)
Definition
fei_MatrixTraits_LinSysCore.hpp:102
fei::MatrixTraits< LinearSystemCore >::setValues
static int setValues(LinearSystemCore *lsc, double scalar)
Definition
fei_MatrixTraits_LinSysCore.hpp:40
fei::MatrixTraits< LinearSystemCore >::getRowLength
static int getRowLength(LinearSystemCore *lsc, int row, int &length)
Definition
fei_MatrixTraits_LinSysCore.hpp:56
fei::MatrixTraits< LinearSystemCore >::matvec
static int matvec(LinearSystemCore *lsc, fei::Vector *x, fei::Vector *y)
Definition
fei_MatrixTraits_LinSysCore.hpp:108
fei::MatrixTraits< LinearSystemCore >::putValuesIn
static int putValuesIn(LinearSystemCore *lsc, int numRows, const int *rows, int numCols, const int *cols, const double *const *values, bool sum_into)
Definition
fei_MatrixTraits_LinSysCore.hpp:82
fei::MatrixTraits< LinearSystemCore >::copyOutRow
static int copyOutRow(LinearSystemCore *lsc, int row, int len, double *coefs, int *indices)
Definition
fei_MatrixTraits_LinSysCore.hpp:73
fei::MatrixTraits< LinearSystemCore >::getNumLocalRows
static int getNumLocalRows(LinearSystemCore *lsc, int &numRows)
Definition
fei_MatrixTraits_LinSysCore.hpp:48
fei::MatrixTraits
Definition
fei_MatrixTraits.hpp:45
Generated by
1.17.0