ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
InteractionToStressConverter.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_LSMINTERACTIONTOSTRESSCONVERTOR_H
15
#define ESYS_LSMINTERACTIONTOSTRESSCONVERTOR_H
16
17
#include "
Tools/StressCalculator/StressTensorCalculator.h
"
18
#include "
Tools/StressCalculator/StressTensorCollection.h
"
19
#include "
Tools/StressCalculator/VtkUnstructuredGrid.h
"
20
#include "
Tools/StressCalculator/CartesianGrid.h
"
21
#include "
Tools/StressCalculator/Vec3Comparer.h
"
22
23
#include "
Foundation/BoundingBox.h
"
24
25
#include <iostream>
26
#include <iomanip>
27
28
namespace
std
29
{
30
template
<>
31
struct
less<
Vec3
>
32
{
33
bool
operator()(
const
Vec3
&v1,
const
Vec3
&v2)
const
34
{
35
return
esys::lsm::Vec3XyzComparer
()(v1, v2);
36
}
37
};
38
}
39
40
namespace
esys
41
{
42
namespace
lsm
43
{
44
typedef
CartesianGrid<double>
DoubleGrid
;
45
typedef
CartesianGrid<StressTensor *>
StressTensorPtrGrid
;
46
typedef
CartesianGrid<Tensor>
TensorGrid
;
47
48
class
InteractionToStressConverter
49
{
50
public
:
51
typedef
StressTensorCollection<ContactPtTensorCalculator>
StressTensCollection
;
52
typedef
StressTensCollection::StressCalculator
StressTensorCalculator
;
53
54
InteractionToStressConverter
(
const
BoundingBox
&box,
double
gridSpacing);
55
60
void
addRaw2Interactions
(std::istream &iStream);
61
66
void
writeVtkUnstructuredXml
(std::ostream &oStream);
67
68
void
writeVtkUnstructuredXmlGridInformation
(std::ostream &oStream);
69
81
void
writeVtkStructuredXml
(std::ostream &oStream);
82
83
StressTensorPtrGrid
&
getTensorIrregularGrid
();
84
void
calcTensorIrregularGrid
();
85
96
TensorGrid
&
getTensorRegularGrid
();
97
98
void
calcTensorRegularGrid
();
99
112
DoubleGrid
&
getDevRegularGrid
();
113
114
void
calcDevRegularGrid
();
115
124
void
writeFlatStructured
(std::ostream &oStream);
125
134
void
writeFlatUnstructured
135
(
136
std::ostream &oStream
137
);
138
145
void
writeUnstructuredDx
(std::ostream &oStream);
146
147
double
getMaxRadius
();
148
149
protected
:
150
double
getRealDevStress
(
const
Tensor
&stressTensor)
const
;
151
double
getNormDevStress
(
const
Tensor
&stressTensor)
const
;
152
153
bool
is3d
()
const
;
154
155
private
:
156
double
m_gridSpacing
;
157
BoundingBox
m_bBox
;
158
StressTensorCalculator
m_stressCalculator
;
159
StressTensCollection
m_stressTensorCollection
;
160
TensorGrid
m_regTensorGrid
;
161
DoubleGrid
m_regDevStressGrid
;
162
StressTensorPtrGrid
m_irrStressTensorGrid
;
163
};
164
}
165
}
166
#endif
Tools
StressCalculator
InteractionToStressConverter.h
Generated on Mon May 6 2013 23:26:31 for ESyS-Particle by
1.8.3.1