Escript
Revision_4320
Main Page
Namespaces
Classes
Files
File List
File Members
weipa
src
RipleyNodes.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 by University of Queensland
5
* http://www.uq.edu.au
6
*
7
* Primary Business: Queensland, Australia
8
* Licensed under the Open Software License version 3.0
9
* http://www.opensource.org/licenses/osl-3.0.php
10
*
11
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12
* Development since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
#ifndef __WEIPA_RIPLEYNODES_H__
17
#define __WEIPA_RIPLEYNODES_H__
18
19
#include <weipa/NodeData.h>
20
21
class
DBfile;
22
23
namespace
ripley {
24
class
RipleyDomain;
25
}
26
27
namespace
weipa {
28
29
class
RipleyNodes
;
30
typedef
boost::shared_ptr<RipleyNodes>
RipleyNodes_ptr
;
31
37
class
RipleyNodes
:
public
NodeData
38
{
39
public
:
41
RipleyNodes
(
const
std::string& meshName);
42
43
RipleyNodes
(
RipleyNodes_ptr
fullNodes,
IntVec
& requiredNodes,
44
const
std::string& meshName);
45
47
RipleyNodes
(
const
RipleyNodes
& m);
48
50
virtual
~RipleyNodes
();
51
53
bool
initFromRipley
(
const
ripley::RipleyDomain
* ripleyDomain);
54
56
bool
writeToSilo
(DBfile* dbfile);
57
59
virtual
void
writeCoordinatesVTK
(std::ostream& os,
int
ownIndex);
60
62
void
setSiloPath
(
const
std::string& path) {
siloPath
= path; }
63
67
const
IntVec
&
getVarDataByName
(
const
std::string&
name
)
const
;
68
70
virtual
StringVec
getVarNames
()
const
;
71
73
virtual
std::string
getName
()
const
{
return
name
; }
74
76
std::string
getFullSiloName
()
const
;
77
79
virtual
const
IntVec
&
getNodeIDs
()
const
{
return
nodeID
; }
80
82
virtual
const
IntVec
&
getNodeDistribution
()
const
{
return
nodeDist
; }
83
85
virtual
const
IntVec
&
getGlobalNodeIndices
()
const
{
return
nodeGNI
; }
86
88
virtual
const
CoordArray
&
getCoords
()
const
{
return
coords
; }
89
91
virtual
int
getNumDims
()
const
{
return
numDims
; }
92
94
virtual
int
getNumNodes
()
const
{
return
numNodes
; }
95
97
virtual
int
getGlobalNumNodes
()
const
{
return
globalNumNodes
; }
98
99
protected
:
100
CoordArray
coords
;
101
int
numDims
;
102
int
numNodes
;
103
int
globalNumNodes
;
104
IntVec
nodeID
;
105
IntVec
nodeGNI
;
106
IntVec
nodeTag
;
107
IntVec
nodeDist
;
108
std::string
name
;
109
std::string
siloPath
;
110
};
111
112
113
inline
std::string
RipleyNodes::getFullSiloName
()
const
114
{
115
std::string result(
siloPath
);
116
if
(result.length() == 0 || *result.rbegin() !=
'/'
)
117
result +=
'/'
;
118
result +=
name
;
119
return
result;
120
}
121
122
}
// namespace weipa
123
124
#endif // __WEIPA_RIPLEYNODES_H__
125
Generated on Fri Mar 15 2013 14:07:51 for Escript by
1.8.1.2