[cig-commits] r13507 - cs/cigma/trunk/src
luis at geodynamics.org
luis at geodynamics.org
Tue Dec 9 18:12:52 PST 2008
Author: luis
Date: 2008-12-09 18:12:52 -0800 (Tue, 09 Dec 2008)
New Revision: 13507
Modified:
cs/cigma/trunk/src/AnnLocator.cpp
cs/cigma/trunk/src/MeshPart.cpp
cs/cigma/trunk/src/MeshPart.h
Log:
Eliminating MeshPart methods selectCell & setCell
No need to have a cell member variable. A simple
cell type suffices.
Modified: cs/cigma/trunk/src/AnnLocator.cpp
===================================================================
--- cs/cigma/trunk/src/AnnLocator.cpp 2008-12-10 02:12:51 UTC (rev 13506)
+++ cs/cigma/trunk/src/AnnLocator.cpp 2008-12-10 02:12:52 UTC (rev 13507)
@@ -82,9 +82,7 @@
for (i = 0; i < npts; i++)
{
ANNpoint pt = dataPoints[i];
- //mesh.selectCell(i); // XXX: use iterator
mesh.getCell(i, *cell);
- //mesh.cell->bbox(minpt, maxpt);
cell->bbox(minpt, maxpt);
for (j = 0; j < ndim; j++)
{
Modified: cs/cigma/trunk/src/MeshPart.cpp
===================================================================
--- cs/cigma/trunk/src/MeshPart.cpp 2008-12-10 02:12:51 UTC (rev 13506)
+++ cs/cigma/trunk/src/MeshPart.cpp 2008-12-10 02:12:52 UTC (rev 13507)
@@ -12,12 +12,6 @@
{
}
-/*
-void MeshPart::setCell(const shared_ptr<Cell>& cell)
-{
- this->cell = cell;
-} */
-
void MeshPart::setCellType(Cell::type cell_type)
{
this->cell_type = cell_type;
@@ -40,13 +34,6 @@
this->locator = loc;
}
-/*
-void MeshPart::selectCell(int e)
-{
- assert(cell);
- this->getCellCoords(e, cell->globverts, cell->n_celldim());
-} */
-
void MeshPart::getCell(int e, Cell& cell) const
{
this->getCellCoords(e, cell.globverts, cell.n_celldim());
@@ -58,7 +45,6 @@
coords->getBoundingBox(minpt, maxpt);
}
-
void MeshPart::getCellCoords(int cellIndex, double *globalCoords, int dim) const
{
assert(coords);
@@ -113,7 +99,6 @@
e = locator->idx(i);
assert((0 <= e) && (e < nel));
- //this->selectCell(e);
this->getCell(e, *cell);
if (cell->global_interior(globalPoint))
@@ -132,7 +117,6 @@
static int last_cell = -1;
if ((0 <= last_cell) && (last_cell < nel))
{
- //selectCell(last_cell);
this->getCell(last_cell, *cell);
if (cell->global_interior(globalPoint))
{
@@ -147,7 +131,6 @@
*/
for (e = 0; e < nel; e++)
{
- //selectCell(e);
this->getCell(e, *cell);
if (cell->global_interior(globalPoint))
{
Modified: cs/cigma/trunk/src/MeshPart.h
===================================================================
--- cs/cigma/trunk/src/MeshPart.h 2008-12-10 02:12:51 UTC (rev 13506)
+++ cs/cigma/trunk/src/MeshPart.h 2008-12-10 02:12:52 UTC (rev 13507)
@@ -24,14 +24,11 @@
int n_cells() const;
int n_dim() const;
- //void setCell(const boost::shared_ptr<Cell>& cell); /* XXX: setCellType(...) */
void setCellType(Cell::type cell_type);
void setNodeCoordinates(const boost::shared_ptr<NodeCoordinates>& nc);
void setElementBlock(const boost::shared_ptr<ElementBlock>& eb);
void setLocator(const boost::shared_ptr<Locator>& loc);
- //void selectCell(int e); /* XXX: replace by iterator */
-
void getCell(int e, Cell &cell) const; // XXX
void getBoundingBox(double *minpt, double *maxpt) const;
void getCellCoords(int cellIndex, double *globalCoords, int dim) const;
@@ -43,7 +40,6 @@
boost::shared_ptr<ElementBlock> connect;
boost::shared_ptr<NodeCoordinates> coords;
boost::shared_ptr<Locator> locator;
- //boost::shared_ptr<Cell> cell; // XXX: only need to save the Cell::type
Cell::type cell_type;
};
More information about the CIG-COMMITS
mailing list