ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
TempPartStore.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 __TEMPPARTSTORE_H
14
#define __TEMPPARTSTORE_H
15
16
// --- Project includes ---
17
#include "vec3.h"
18
19
// --- STL includes ---
20
#include <map>
21
#include <utility>
22
23
using
std::map;
24
using
std::multimap;
25
using
std::pair;
26
using
std::make_pair;
27
32
class
ATempPartStore
33
{
34
public
:
35
virtual
~ATempPartStore
() {}
36
virtual
void
addSlaveID
(
int
,
int
,
int
,
int
)=0;
37
virtual
void
addConnection
(
int
,
int
,
int
)=0;
38
};
39
46
template
<
typename
T>
47
class
TTempPartStore
:
public
ATempPartStore
48
{
49
private
:
50
multimap<int,T>
m_mmap
;
51
map<int,typename multimap<int,T>::iterator>
m_by_id
;
52
map<int,int>
m_slave_id_map
;
53
54
double
m_xmin
,
m_xsize
,
m_ymin
,
m_ysize
,
m_zmin
,
m_zsize
;
55
int
m_nx
,
m_ny
,
m_nz
;
56
57
int
coordsToIndex
(
int
,
int
,
int
);
58
int
posToIndex
(
const
Vec3
&);
59
60
public
:
61
TTempPartStore
(
const
Vec3
&,
const
Vec3
&,
int
,
int
,
int
);
62
63
virtual
void
addSlaveID
(
int
,
int
,
int
,
int
);
64
virtual
void
addParticle
(
const
T&);
65
virtual
void
addConnection
(
int
,
int
,
int
);
66
67
const
multimap<int,T>&
getMap
()
const
{
return
m_mmap
;};
68
};
69
70
#include "
TempPartStore.hpp
"
71
72
#endif //__TEMPPARTSTORE_H
Model
TempPartStore.h
Generated on Mon May 6 2013 23:26:30 for ESyS-Particle by
1.8.3.1