Last change
on this file since 1517 was
887,
checked in by mhnguyen, 8 years ago
|
Adding a new type of element into grid: Scalar
+) Add a new node Scalar for xml
+) Make some change on writing scalar value
+) Reorganize some codes
+) Remove some redundant codes
Test
+) On Curie
+) All tests pass
|
File size:
605 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file distribution.hpp |
---|
3 | \author Ha NGUYEN |
---|
4 | \since 13 Jan 2015 |
---|
5 | \date 09 Feb 2015 |
---|
6 | |
---|
7 | \brief Index distribution on server side. |
---|
8 | */ |
---|
9 | #include "distribution.hpp" |
---|
10 | |
---|
11 | namespace xios { |
---|
12 | |
---|
13 | CDistribution::CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex) |
---|
14 | : rank_(rank), dims_(dims), globalIndex_(globalIndex.shape()) |
---|
15 | { |
---|
16 | if (0 != globalIndex.numElements()) |
---|
17 | globalIndex_ = globalIndex; |
---|
18 | } |
---|
19 | |
---|
20 | CDistribution::~CDistribution() |
---|
21 | { /* Nothing to do */ } |
---|
22 | |
---|
23 | int CDistribution::getDims() const |
---|
24 | { |
---|
25 | return dims_; |
---|
26 | } |
---|
27 | |
---|
28 | int CDistribution::getRank() const |
---|
29 | { |
---|
30 | return rank_; |
---|
31 | } |
---|
32 | |
---|
33 | } // namespace xios |
---|
Note: See
TracBrowser
for help on using the repository browser.