| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file grid_properties.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:54:05 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief VMG::GlobalIndices, VMG::LocalIndices and VMG::SpatialExtent
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifdef HAVE_CONFIG_H
|
|---|
| 11 | #include <config.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | #include "grid/grid_properties.hpp"
|
|---|
| 15 |
|
|---|
| 16 | using namespace VMG;
|
|---|
| 17 |
|
|---|
| 18 | GlobalIndices::GlobalIndices()
|
|---|
| 19 | {
|
|---|
| 20 | begin_finest = end_finest = size_finest = 0;
|
|---|
| 21 | begin_local = end_local = size_local = 0;
|
|---|
| 22 | size_global = 0;
|
|---|
| 23 | boundary = EmptyGrid;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 | LocalIndices::LocalIndices()
|
|---|
| 27 | {
|
|---|
| 28 | size = 0;
|
|---|
| 29 | sizeTotal = 0;
|
|---|
| 30 | begin = 0;
|
|---|
| 31 | end = 0;
|
|---|
| 32 | haloBegin1 = 0;
|
|---|
| 33 | haloEnd1 = 0;
|
|---|
| 34 | haloBegin2 = 0;
|
|---|
| 35 | haloEnd2 = 0;
|
|---|
| 36 | boundaryBegin1 = 0;
|
|---|
| 37 | boundaryEnd1 = 0;
|
|---|
| 38 | boundaryBegin2 = 0;
|
|---|
| 39 | boundaryEnd2 = 0;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | SpatialExtent::SpatialExtent()
|
|---|
| 43 | {
|
|---|
| 44 | size = 0.0;
|
|---|
| 45 | size_factor = 0;
|
|---|
| 46 | begin = 0.0;
|
|---|
| 47 | end = 0.0;
|
|---|
| 48 | meshWidth = 0.0;
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | Index LocalIndices::HasHalo1() const
|
|---|
| 52 | {
|
|---|
| 53 | Index has_halo;
|
|---|
| 54 |
|
|---|
| 55 | for (int i=0; i<3; ++i)
|
|---|
| 56 | has_halo[i] = (haloEnd1[i]-haloBegin1[i] > 0 ? 1 : 0);
|
|---|
| 57 |
|
|---|
| 58 | return has_halo;
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | Index LocalIndices::HasHalo2() const
|
|---|
| 62 | {
|
|---|
| 63 | Index has_halo;
|
|---|
| 64 |
|
|---|
| 65 | for (int i=0; i<3; ++i)
|
|---|
| 66 | has_halo[i] = (haloEnd2[i]-haloBegin2[i] > 0 ? 1 : 0);
|
|---|
| 67 |
|
|---|
| 68 | return has_halo;
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | Index LocalIndices::HasBoundary1() const
|
|---|
| 72 | {
|
|---|
| 73 | Index has_bound;
|
|---|
| 74 |
|
|---|
| 75 | for (int i=0; i<3; ++i)
|
|---|
| 76 | has_bound[i] = (boundaryEnd1[i]-boundaryBegin1[i] > 0 ? 1 : 0);
|
|---|
| 77 |
|
|---|
| 78 | return has_bound;
|
|---|
| 79 | }
|
|---|
| 80 |
|
|---|
| 81 | Index LocalIndices::HasBoundary2() const
|
|---|
| 82 | {
|
|---|
| 83 | Index has_bound;
|
|---|
| 84 |
|
|---|
| 85 | for (int i=0; i<3; ++i)
|
|---|
| 86 | has_bound[i] = (boundaryEnd2[i]-boundaryBegin2[i] > 0 ? 1 : 0);
|
|---|
| 87 |
|
|---|
| 88 | return has_bound;
|
|---|
| 89 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.