[cig-commits] r13180 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Wed Oct 29 15:12:01 PDT 2008
Author: luis
Date: 2008-10-29 15:12:01 -0700 (Wed, 29 Oct 2008)
New Revision: 13180
Modified:
cs/cigma/trunk/src/MeshPart.cpp
cs/cigma/trunk/src/MeshPart.h
cs/cigma/trunk/src/NodeCoordinates.h
cs/cigma/trunk/src/nc_array.h
Log:
Changed method signatures to ensure const correctness
Modified: cs/cigma/trunk/src/MeshPart.cpp
===================================================================
--- cs/cigma/trunk/src/MeshPart.cpp 2008-10-29 22:11:59 UTC (rev 13179)
+++ cs/cigma/trunk/src/MeshPart.cpp 2008-10-29 22:12:01 UTC (rev 13180)
@@ -36,19 +36,19 @@
this->getCellCoords(e, cell->globverts, cell->n_celldim());
}
-void MeshPart::getCell(int e, Cell& cell)
+void MeshPart::getCell(int e, Cell& cell) const
{
this->getCellCoords(e, cell.globverts, cell.n_celldim());
}
-void MeshPart::getBoundingBox(double *minpt, double *maxpt)
+void MeshPart::getBoundingBox(double *minpt, double *maxpt) const
{
assert(coords);
coords->getBoundingBox(minpt, maxpt);
}
-void MeshPart::getCellCoords(int cellIndex, double *globalCoords, int dim)
+void MeshPart::getCellCoords(int cellIndex, double *globalCoords, int dim) const
{
assert(coords);
assert(connect);
Modified: cs/cigma/trunk/src/MeshPart.h
===================================================================
--- cs/cigma/trunk/src/MeshPart.h 2008-10-29 22:11:59 UTC (rev 13179)
+++ cs/cigma/trunk/src/MeshPart.h 2008-10-29 22:12:01 UTC (rev 13180)
@@ -27,10 +27,9 @@
void selectCell(int e); /* XXX: replace by iterator */
- void getCell(int e, Cell &cell); // XXX
-
- void getBoundingBox(double *minpt, double *maxpt);
- void getCellCoords(int cellIndex, double *globalCoords, int dim);
+ void getCell(int e, Cell &cell) const; // XXX
+ void getBoundingBox(double *minpt, double *maxpt) const;
+ void getCellCoords(int cellIndex, double *globalCoords, int dim) const;
bool findCell(double globalPoint[3], double uvw[3], int *cellIndex);
public:
Modified: cs/cigma/trunk/src/NodeCoordinates.h
===================================================================
--- cs/cigma/trunk/src/NodeCoordinates.h 2008-10-29 22:11:59 UTC (rev 13179)
+++ cs/cigma/trunk/src/NodeCoordinates.h 2008-10-29 22:12:01 UTC (rev 13180)
@@ -23,7 +23,7 @@
virtual int n_points() const = 0;
virtual int n_dim() const = 0;
virtual double getPoint(int i, int j) const = 0;
- virtual void getBoundingBox(double *minpt, double *maxpt) = 0;
+ virtual void getBoundingBox(double *minpt, double *maxpt) const = 0;
/* XXX: locator interface? */
};
Modified: cs/cigma/trunk/src/nc_array.h
===================================================================
--- cs/cigma/trunk/src/nc_array.h 2008-10-29 22:11:59 UTC (rev 13179)
+++ cs/cigma/trunk/src/nc_array.h 2008-10-29 22:12:01 UTC (rev 13180)
@@ -17,8 +17,9 @@
int n_points() const;
int n_dim() const;
+
double getPoint(int i, int j) const;
- void getBoundingBox(double *minpt, double *maxpt);
+ void getBoundingBox(double *minpt, double *maxpt) const;
double *getPointOffset(int i);
More information about the CIG-COMMITS
mailing list