ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
StressTensorCollection.h
Go to the documentation of this file.
1
2
// //
3
// Copyright (c) 2003-2013 by The University of Queensland //
4
// Earth Systems Science Computational Centre (ESSCC) //
5
// http://www.uq.edu.au/esscc //
6
// //
7
// Primary Business: Brisbane, Queensland, Australia //
8
// Licensed under the Open Software License version 3.0 //
9
// http://www.opensource.org/licenses/osl-3.0.php //
10
// //
12
13
14
#ifndef ESYS_LSMSTRESSTENSORCOLLECTION_H
15
#define ESYS_LSMSTRESSTENSORCOLLECTION_H
16
17
#include "
Foundation/vec3.h
"
18
#include "
Foundation/Matrix3.h
"
19
#include "
Foundation/StlIterator.h
"
20
#include "
Tools/StressCalculator/StressTensor.h
"
21
22
#include <vector>
23
#include <map>
24
25
namespace
esys
26
{
27
namespace
lsm
28
{
29
template
<
typename
TmplStressTensorCalculator>
30
class
StressTensorCollection
31
{
32
public
:
33
typedef
TmplStressTensorCalculator
StressCalculator
;
34
typedef
std::vector<StressTensor>
StressTensorVector
;
35
typedef
ForwardIterator<StressTensorVector>
StressTensorIterator
;
36
37
StressTensorCollection
(
StressCalculator
&stressCalculator)
38
:
m_stressTensorVector
(),
39
m_pStressCalculator
(&stressCalculator)
40
{
41
}
42
43
template
<
typename
TmplContactIterator>
44
void
addContactIterator
(TmplContactIterator it)
45
{
46
m_stressTensorVector
.push_back(
m_pStressCalculator
->calculate(it));
47
}
48
49
template
<
typename
TmplContactIteratorIterator>
50
void
addContactIterators
(TmplContactIteratorIterator it)
51
{
52
while
(it.hasNext())
53
{
54
addContactIterator
(it.next());
55
}
56
}
57
58
StressTensorIterator
getIterator
()
59
{
60
return
StressTensorIterator
(
m_stressTensorVector
);
61
}
62
63
int
size
()
const
64
{
65
return
m_stressTensorVector
.size();
66
}
67
68
private
:
69
StressTensorVector
m_stressTensorVector
;
70
StressCalculator
*
m_pStressCalculator
;
71
};
72
}
73
}
74
75
#endif
Tools
StressCalculator
StressTensorCollection.h
Generated on Mon May 6 2013 23:26:31 for ESyS-Particle by
1.8.3.1