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
ElemBlock.cpp
Go to the documentation of this file.
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
#include <
fei_macros.hpp
>
10
#include <
fei_defs.h
>
11
#include <
test_utils/ElemBlock.hpp
>
12
#include <cstdlib>
13
14
//==============================================================================
15
ElemBlock::ElemBlock
()
16
: blockID_(0),
17
numElements_(0),
18
numNodesPerElement_(0),
19
numFieldsPerNode_(NULL),
20
nodalFieldIDs_(NULL),
21
elemIDs_(NULL),
22
elemConn_(NULL),
23
numStiffRows_(0),
24
elemFormat_(0),
25
elemStiff_(NULL),
26
elemLoad_(NULL),
27
numElemDOF_(0),
28
elemDOFFieldIDs_(NULL),
29
interleaveStrategy_(0),
30
lumpingStrategy_(0)
31
{
32
}
33
34
//==============================================================================
35
ElemBlock::~ElemBlock
() {
36
deleteMemory
();
37
}
38
39
//==============================================================================
40
void
ElemBlock::deleteMemory
() {
41
for
(
int
i=0; i<
numElements_
; i++) {
42
for
(
int
j=0; j<
numStiffRows_
; j++) {
43
delete
[]
elemStiff_
[i][j];
44
}
45
delete
[]
elemStiff_
[i];
46
delete
[]
elemLoad_
[i];
47
delete
[]
elemConn_
[i];
48
}
49
50
for
(
int
j=0; j<
numNodesPerElement_
; j++) {
51
delete
[]
nodalFieldIDs_
[j];
52
}
53
delete
[]
nodalFieldIDs_
;
54
delete
[]
numFieldsPerNode_
;
55
56
delete
[]
elemStiff_
;
57
delete
[]
elemLoad_
;
58
delete
[]
elemConn_
;
59
delete
[]
elemIDs_
;
60
61
if
(
numElemDOF_
> 0) {
62
delete
[]
elemDOFFieldIDs_
;
63
numElemDOF_
= 0;
64
}
65
66
numElements_ = 0;
67
numNodesPerElement_ = 0;
68
}
69
ElemBlock::numStiffRows_
int numStiffRows_
Definition:
ElemBlock.hpp:24
ElemBlock::~ElemBlock
~ElemBlock()
Definition:
ElemBlock.cpp:35
ElemBlock::elemConn_
GlobalID ** elemConn_
Definition:
ElemBlock.hpp:23
ElemBlock::numElements_
int numElements_
Definition:
ElemBlock.hpp:18
ElemBlock.hpp
ElemBlock::nodalFieldIDs_
int ** nodalFieldIDs_
Definition:
ElemBlock.hpp:21
ElemBlock::deleteMemory
void deleteMemory()
Definition:
ElemBlock.cpp:40
ElemBlock::numNodesPerElement_
int numNodesPerElement_
Definition:
ElemBlock.hpp:19
ElemBlock::elemDOFFieldIDs_
int * elemDOFFieldIDs_
Definition:
ElemBlock.hpp:29
fei_defs.h
ElemBlock::ElemBlock
ElemBlock()
Definition:
ElemBlock.cpp:15
ElemBlock::elemStiff_
double *** elemStiff_
Definition:
ElemBlock.hpp:26
ElemBlock::numElemDOF_
int numElemDOF_
Definition:
ElemBlock.hpp:28
ElemBlock::elemIDs_
GlobalID * elemIDs_
Definition:
ElemBlock.hpp:22
ElemBlock::numFieldsPerNode_
int * numFieldsPerNode_
Definition:
ElemBlock.hpp:20
fei_macros.hpp
ElemBlock::elemLoad_
double ** elemLoad_
Definition:
ElemBlock.hpp:27
Generated by
1.8.5