Remove debugging print statements.

This commit is contained in:
Dave Pugmire 2019-05-22 14:37:06 -04:00
parent b9d109ab3d
commit d6e2e9588e
2 changed files with 1 additions and 43 deletions

@ -208,24 +208,6 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
const vtkm::IdComponent numPoints = field.GetNumberOfComponents();
VTKM_ASSERT(numPoints >= 1);
/*
std::cout<<"PolyLine: numPts= "<<numPoints<<std::endl;
std::cout<<" field= [";
for (int i = 0; i < numPoints; i++)
std::cout<<field[i]<<" ";
std::cout<<"]"<<std::endl;
std::cout<<" nodeT= [";
if (numPoints > 1)
{
float dn = 1.0f/(float)(numPoints-1);
float t = 0;
for (int i = 0; i < numPoints; i++, t+=dn)
std::cout<<t<<" ";
std::cout<<"]"<<std::endl;
}
std::cout<<" pcoords= "<<pcoords<<std::endl;
*/
switch (numPoints)
{
case 1:
@ -237,17 +219,12 @@ VTKM_EXEC typename FieldVecType::ComponentType CellInterpolate(
using T = ParametricCoordType;
T dt = 1 / static_cast<T>(numPoints - 1);
//vtkm::FloatDefault dt = 1 / static_cast<vtkm::FloatDefault>(numPoints - 1);
vtkm::IdComponent idx = static_cast<vtkm::IdComponent>(pcoords[0] / dt);
if (idx == numPoints - 1)
return field[numPoints - 1];
T t = (pcoords[0] - static_cast<T>(idx) * dt) / dt;
//vtkm::FloatDefault t = pcoords[0] - static_cast<vtkm::FloatDefault>(idx) * dt;
/*
std::cout<<" dt= "<<dt<<" idx= "<<idx<<" T= "<<t<<std::endl;
std::cout<<" Lerp("<<field[idx]<<", "<<field[idx+1]<<", "<<t<<")"<<std::endl;
*/
return vtkm::Lerp(field[idx], field[idx + 1], t);
}

@ -695,15 +695,6 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
pointWCoords, wcoords, vtkm::CellShapeTagLine(), success, worklet);
}
/*
std::cout<<std::endl<<std::endl;
std::cout << "worldCoordsToParam:" << std::endl;
std::cout << " PointWcoords= (";
for (int i = 0; i < numPoints; i++)
std::cout << pointWCoords[i] << " ";
std::cout << ")" << std::endl;
std::cout << "wCoords= " << wcoords << std::endl;
*/
using Vector3 = typename WorldCoordVector::ComponentType;
using T = typename Vector3::ComponentType;
@ -711,15 +702,10 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
vtkm::IdComponent idx = 0;
Vector3 vec = pointWCoords[0] - wcoords;
T minDistSq = vtkm::Dot(vec, vec);
/*
std::cout<<"Find idx: "<<std::endl;
std::cout<<" idx: "<<idx<<" "<<minDistSq<<std::endl;
*/
for (vtkm::IdComponent i = 1; i < numPoints; i++)
{
vec = pointWCoords[i] - wcoords;
T d = vtkm::Dot(vec, vec);
//std::cout<<" idx: "<<i<<" "<<d<<" "<<pointWCoords[i]<<" "<<wcoords<<std::endl;
if (d < minDistSq)
{
@ -739,7 +725,6 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
T denominator = vtkm::MagnitudeSquared(vec);
T segmentParam = numerator / denominator;
//std::cout<<"segment: "<<idx-1<<" "<<idx<<" p= "<<segmentParam<<std::endl;
//The point is on the OTHER side of idx. If there is a next segment reparam onto it.
if (segmentParam > 1 && idx < numPoints - 1)
{
@ -748,7 +733,6 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
numerator = vtkm::Dot(vec, wcoords - pointWCoords[idx - 1]);
denominator = vtkm::MagnitudeSquared(vec);
segmentParam = numerator / denominator;
//std::cout<<" +++ segment: "<<idx-1<<" "<<idx<<" p= "<<segmentParam<<std::endl;
}
//Segment param is [0,1] on that segment.
@ -756,9 +740,6 @@ WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords,
T dParam = static_cast<T>(1) / static_cast<T>(numPoints - 1);
T polyLineParam = static_cast<T>(idx - 1) * dParam + segmentParam * dParam;
//std::cout << "idx= " << idx << " dParam= "<<dParam<<std::endl;
//std::cout << "Param= " << Vector3(polyLineParam, 0, 0) << std::endl;
return Vector3(polyLineParam, 0, 0);
}