diff options
author | tradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef> | 2004-08-30 16:55:16 +0000 |
---|---|---|
committer | tradke <tradke@21a6bef8-4479-4f54-8f8d-0db94a2919ef> | 2004-08-30 16:55:16 +0000 |
commit | 7583c1f9d2bcab7833f3ad741e089e4a96918fac (patch) | |
tree | c001bd536b73f019c1b47bc6fea11317c6dd3441 /src/AMRHierLib/AMRGridCell.icc | |
parent | 4bc44285491ac553e14b26d6888104c0d7e18f54 (diff) |
Bring development version in sync with stable version from /packages/FlexIO.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/FlexIO/trunk@68 21a6bef8-4479-4f54-8f8d-0db94a2919ef
Diffstat (limited to 'src/AMRHierLib/AMRGridCell.icc')
-rw-r--r-- | src/AMRHierLib/AMRGridCell.icc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/AMRHierLib/AMRGridCell.icc b/src/AMRHierLib/AMRGridCell.icc new file mode 100644 index 0000000..4365728 --- /dev/null +++ b/src/AMRHierLib/AMRGridCell.icc @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// +// Project: AMR Visualization +// Module: $RCSfile$ +// Language: C++ +// Date: $Date$ +// Author: $Author$ +// Version: $Revision$ +// +//------------------------------------------------------------------------------ + +inline Vertex AMRGridCell::pos() const +{ + return Vertex( + mGrid->origin[0] + (mIdx[0]+0.5) * mGrid->delta[0], + mGrid->origin[1] + (mIdx[1]+0.5) * mGrid->delta[1], + mGrid->origin[2] + (mIdx[2]+0.5) * mGrid->delta[2] + ); +} + +inline double AMRGridCell::val() const +{ + return mGrid->getValue(mIdx[0], mIdx[1], mIdx[2]); +} + +inline AMRHierarchy::GridId AMRGridCell::containingId() const +{ + return mGrid->index(); +} + +inline AMRHierarchy::GridId AMRGridCell::refiningId() const +{ + if (mRefiningGridId == AMRGrid::Unknown) { + mRefiningGridId = mGrid->getCellRefiningGridId(mIdx); + } + return mRefiningGridId; +} + +inline AMRGrid* AMRGridCell::grid() const +{ + return mGrid; +} + +inline int AMRGridCell::idx(AxisType axis) const +{ + return mIdx[axis]; +} |