FEI Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
test_utils
CoefAccess.hpp
Go to the documentation of this file.
1
#ifndef _CoefAccess_h_
2
#define _CoefAccess_h_
3
4
/*--------------------------------------------------------------------*/
5
/* Copyright 2005 Sandia Corporation. */
6
/* Under the terms of Contract DE-AC04-94AL85000, there is a */
7
/* non-exclusive license for use of this work by or on behalf */
8
/* of the U.S. Government. Export of this program may require */
9
/* a license from the United States Government. */
10
/*--------------------------------------------------------------------*/
11
12
#include <cstdlib>
13
14
class
CoefAccess
{
15
public
:
16
CoefAccess
() :
patternID_
(-1),
numRowIDs_
(0),
rowIDs_
(NULL),
17
numColIDsPerRow_
(0),
colIDs_
(NULL),
numRowCoefs_
(0),
numColCoefs_
(0),
18
coefs_
(NULL) {}
19
20
CoefAccess
(
const
CoefAccess
& src)
21
{
22
*
this
= src;
23
}
24
25
CoefAccess
&
operator=
(
const
CoefAccess
& src)
26
{
27
patternID_
= src.
patternID_
;
28
29
numRowIDs_
= src.
numRowIDs_
;
30
numColIDsPerRow_
= src.
numColIDsPerRow_
;
31
numRowCoefs_
= src.
numRowCoefs_
;
32
numColCoefs_
= src.
numColCoefs_
;
33
34
if
(
numRowIDs_
> 0) {
35
rowIDs_
=
new
GlobalID
[
numRowIDs_
];
36
for
(
int
i=0; i<
numRowIDs_
; i++)
rowIDs_
[i] = src.
rowIDs_
[i];
37
}
38
39
if
(
numColIDsPerRow_
> 0 &&
numRowIDs_
> 0) {
40
int
len =
numRowIDs_
*
numColIDsPerRow_
;
41
colIDs_
=
new
GlobalID
[len];
42
for
(
int
i=0; i<len; i++)
colIDs_
[i] = src.
colIDs_
[i];
43
}
44
45
if
(
numRowCoefs_
> 0 &&
numColCoefs_
> 0) {
46
int
len =
numRowCoefs_
*
numColCoefs_
;
47
coefs_
=
new
double
[len];
48
for
(
int
i=0; i<len; i++)
coefs_
[i] = src.
coefs_
[i];
49
}
50
51
return
(*
this
);
52
}
53
54
~CoefAccess
()
55
{
56
delete
[]
rowIDs_
;
delete
[]
colIDs_
;
delete
[]
coefs_
;
57
numRowIDs_
= 0;
numColIDsPerRow_
= 0;
numRowCoefs_
= 0;
numColCoefs_
= 0;
58
}
59
60
int
patternID_
;
61
62
int
numRowIDs_
;
63
GlobalID
*
rowIDs_
;
64
65
int
numColIDsPerRow_
;
66
GlobalID
*
colIDs_
;
67
68
int
numRowCoefs_
;
69
int
numColCoefs_
;
70
71
double
*
coefs_
;
72
};
73
74
#endif // _CoefAccess_h_
CoefAccess::operator=
CoefAccess & operator=(const CoefAccess &src)
Definition:
CoefAccess.hpp:25
GlobalID
int GlobalID
Definition:
fei_defs.h:60
CoefAccess::numRowIDs_
int numRowIDs_
Definition:
CoefAccess.hpp:62
CoefAccess::numColCoefs_
int numColCoefs_
Definition:
CoefAccess.hpp:69
CoefAccess
Definition:
CoefAccess.hpp:14
CoefAccess::patternID_
int patternID_
Definition:
CoefAccess.hpp:60
CoefAccess::numRowCoefs_
int numRowCoefs_
Definition:
CoefAccess.hpp:68
CoefAccess::~CoefAccess
~CoefAccess()
Definition:
CoefAccess.hpp:54
CoefAccess::coefs_
double * coefs_
Definition:
CoefAccess.hpp:71
CoefAccess::CoefAccess
CoefAccess()
Definition:
CoefAccess.hpp:16
CoefAccess::colIDs_
GlobalID * colIDs_
Definition:
CoefAccess.hpp:66
CoefAccess::numColIDsPerRow_
int numColIDsPerRow_
Definition:
CoefAccess.hpp:65
CoefAccess::CoefAccess
CoefAccess(const CoefAccess &src)
Definition:
CoefAccess.hpp:20
CoefAccess::rowIDs_
GlobalID * rowIDs_
Definition:
CoefAccess.hpp:63
Generated by
1.8.5