ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
RotLocalDamping.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
#ifndef MODEL_ROTLOCALDAMPING_H
14
#define MODEL_ROTLOCALDAMPING_H
15
16
// -- project includes --
17
#include "
Model/LocalDampingIGP.h
"
18
#include "
Foundation/vec3.h
"
19
#include "
Foundation/quintuple.h
"
20
21
class
CVarMPIBuffer
;
22
class
AMPIBuffer
;
23
28
template
<
class
T>
29
class
CRotLocalDamping
30
{
31
protected
:
32
T *
m_p
;
33
double
m_visc
;
34
double
m_dt
;
35
double
m_E_diss
;
36
Vec3
m_force
;
37
38
public
:
39
typedef
CLocalDampingIGP
ParameterType
;
40
41
typedef
double (
CRotLocalDamping
::*
ScalarFieldFunction
)()
const
;
42
typedef
pair<bool,double> (
CRotLocalDamping
::*
CheckedScalarFieldFunction
)()
const
;
43
typedef
Vec3
(
CRotLocalDamping
::*
VectorFieldFunction
)()
const
;
44
45
static
ScalarFieldFunction
getScalarFieldFunction
(
const
string
&);
46
static
CheckedScalarFieldFunction
getCheckedScalarFieldFunction
(
const
string
&);
47
static
VectorFieldFunction
getVectorFieldFunction
(
const
string
&);
48
49
CRotLocalDamping
(T*,
double
,
double
);
// to be obsoleted
50
CRotLocalDamping
(T*,
const
CLocalDampingIGP
&);
51
CRotLocalDamping
(T*,
CLocalDampingIGP
*);
52
virtual
~CRotLocalDamping
();
53
54
void
setTimeStepSize
(
double
dt);
55
virtual
void
calcForces
();
56
57
virtual
bool
hasTag
(
int
,
int
)
const
;
58
virtual
Vec3
getPosFirst
()
const
{
return
m_p
->getPos();};
59
virtual
Vec3
getPosSecond
()
const
{
return
Vec3
(0.0,0.0,0.0);};
60
virtual
Vec3
getPos
()
const
{
return
m_p
->getPos();};
61
vector<int>
getAllID
()
const
;
62
63
esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3>
getRaw2Data
()
const
64
{
65
return
66
esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3>
(
67
m_p
->getPos(),
68
m_p
->getRad(),
69
Vec3::ZERO
,
70
0,
71
getPos
()
72
);
73
}
74
75
double
getDissipatedEnergy
()
const
;
76
Vec3
getForce
()
const
;
77
};
78
79
#include "
Model/RotLocalDamping.hpp
"
80
81
#endif //__ROTLOCALDAMPING_H
Model
RotLocalDamping.h
Generated on Mon May 6 2013 23:26:30 for ESyS-Particle by
1.8.3.1