Skip to content
Snippets Groups Projects
Commit 449d3dcc authored by Ben Boeckel's avatar Ben Boeckel Committed by Code Review
Browse files

Merge topic 'remove-unused-functions' into master

964d6c80 Filters/Geometry: Hide WriteGrid if ENABLE_IO isn't on
2b67930d Filters/Geometry: Remove some unused functions from tests
parents 30f6f34a 964d6c80
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ const double h0 = 1.0;
// Global origin
const double origin[3] = {0.0,0.0,0.0};
#ifdef ENABLE_IO
//------------------------------------------------------------------------------
void WriteGrid(vtkUniformGrid *grid, std::string prefix)
{
......@@ -94,11 +95,10 @@ void WriteGrid(vtkUniformGrid *grid, std::string prefix)
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInputData( grid );
#ifdef ENABLE_IO
writer->Write();
#endif
writer->Delete();
}
#endif
//------------------------------------------------------------------------------
void GetPoint(
......@@ -222,24 +222,6 @@ void AttachCellBlanking(vtkOverlappingAMR *amr)
}
//------------------------------------------------------------------------------
void ComputeCellCenter(
vtkUniformGrid *grid, vtkIdType cellIdx,double center[3])
{
assert("pre: input grid is NULL" && (grid != NULL) );
assert("pre: cell index is out-of-bounds" &&
(cellIdx < grid->GetNumberOfCells() ) );
vtkCell *myCell = grid->GetCell( cellIdx );
assert( "ERROR: Cell is NULL" && (myCell != NULL) );
double pcenter[3];
double *weights = new double[ myCell->GetNumberOfPoints() ];
int subId = myCell->GetParametricCenter( pcenter );
myCell->EvaluateLocation( subId, pcenter, center, weights );
delete [] weights;
}
//------------------------------------------------------------------------------
void ApplyXYZFieldToGrid( vtkUniformGrid *grd, std::string prefix )
{
......
......@@ -54,27 +54,6 @@
namespace
{
//------------------------------------------------------------------------------
// Description:
// Writes the grid to a file
void WriteGrid( vtkUniformGrid *grid, std::string prefix )
{
assert( "pre: input grid is NULL" && (grid != NULL) );
vtkXMLImageDataWriter *writer = vtkXMLImageDataWriter::New();
std::ostringstream oss;
oss << prefix << "." << writer->GetDefaultFileExtension();
writer->SetFileName( oss.str().c_str() );
writer->SetInputData( grid );
#ifdef ENABLE_IO
writer->Write();
#endif
writer->Delete();
}
//------------------------------------------------------------------------------
// Description:
// This method attaches a point array to the given grid that will label the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment