ESyS-Particle
2.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SubLatticeControler.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 __SUBLATTICECONTROLER_H
14
#define __SUBLATTICECONTROLER_H
15
16
//--- MPI ---
17
#include <mpi.h>
18
19
//--- TML includes ---
20
#include "
tml/comm/comm.h
"
21
#include "
tml/comm/comm_world.h
"
22
23
#include "
Parallel/SubLattice.h
"
24
#include "
Parallel/CheckPointable.h
"
25
#include "
Foundation/Timer.h
"
26
27
#include <boost/shared_ptr.hpp>
28
29
class
CheckPointer
;
30
41
class
CSubLatticeControler
:
esys::lsm::CheckPointable
42
{
43
private
:
44
int
m_global_rank
;
45
int
m_global_size
;
46
int
m_local_rank
;
47
int
m_local_size
;
48
49
MPI_Comm
m_global_comm
;
// global MPI communicator
50
MPI_Comm
m_local_comm
;
// MPI communicator of the spawned workers
51
MPI_Group
m_global_group
,
m_local_group
;
// MPI groups
52
53
TML_Comm
m_tml_global_comm
;
54
TML_Comm
m_tml_local_comm
;
55
56
ASubLattice
*
m_lattice
;
57
CheckPointer
*
m_pCheckPointer
;
// for restatable checkpoints
58
CheckPointer
*
m_pSnapShooter
;
// for visualization dumps
59
std::string
m_timingFileName
;
60
typedef
boost::shared_ptr<MpiWTimers>
MpiWTimersPtr
;
61
MpiWTimersPtr
m_timersPtr
;
62
63
public
:
64
CSubLatticeControler
();
65
~CSubLatticeControler
();
66
67
void
initMPI
();
68
void
makeLattice
();
69
void
initLattice
();
70
void
initLatticeCirc
();
71
void
init2DTriangularLocal
();
72
void
init3DTriangularLocal
();
73
void
searchNeighbors
();
74
void
performTiming
();
75
void
saveTimingData
();
76
void
getIdParticleData
();
77
void
setTimeStepSize
();
78
void
setTimingFileName
(
const
std::string &timingFileName) {
m_timingFileName
=timingFileName;}
79
const
std::string &
getTimingFileName
()
const
{
return
m_timingFileName
;}
80
void
do2dCalculations
();
81
void
getNumParticles
();
82
void
findParticleNearestToPoint
();
83
void
getParticlePosn
();
84
void
moveSingleParticle
();
85
// void getBondGroupIdPairs();
86
void
translateMeshBy
();
87
void
run
();
88
89
void
setVerbosity
();
90
91
virtual
void
saveCheckPointData
(std::ostream &oStream);
92
virtual
void
saveSnapShotData
(std::ostream &oStream);
93
94
virtual
void
loadCheckPointData
(std::istream &iStream);
95
96
};
97
98
#endif //__SUBLATTICECONTROLER_H
Parallel
SubLatticeControler.h
Generated on Mon May 6 2013 23:26:30 for ESyS-Particle by
1.8.3.1