FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
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
15 public:
18 coefs_(NULL) {}
19
21 {
22 *this = src;
23 }
24
26 {
28
33
34 if (numRowIDs_ > 0) {
36 for(int i=0; i<numRowIDs_; i++) rowIDs_[i] = src.rowIDs_[i];
37 }
38
39 if (numColIDsPerRow_ > 0 && numRowIDs_ > 0) {
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
55 {
56 delete [] rowIDs_; delete [] colIDs_; delete [] coefs_;
58 }
59
61
64
67
70
71 double* coefs_;
72};
73
74#endif // _CoefAccess_h_
int numColIDsPerRow_
CoefAccess(const CoefAccess &src)
GlobalID * rowIDs_
CoefAccess & operator=(const CoefAccess &src)
double * coefs_
GlobalID * colIDs_
int GlobalID
Definition fei_defs.h:60