const int numSrcElems = srcMesh.getNumberOfElements(MED_CELL, MED_ALL_ELEMENTS);
const int numTargetElems = targetMesh.getNumberOfElements(MED_CELL, MED_ALL_ELEMENTS);
- std::cout << "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements " << std::endl;
+ // std::cout << "Source mesh has " << numSrcElems << " elements and target mesh has " << numTargetElems << " elements " << std::endl;
// create empty maps for all source elements
matrix.resize(numSrcElems);
{
RegionNode* currNode = nodes.top();
nodes.pop();
- std::cout << "Popping node " << std::endl;
+ // std::cout << "Popping node " << std::endl;
if(currNode->getSrcRegion().getNumberOfElements() == 1)
{
- std::cout << " - One element" << std::endl;
+ // std::cout << " - One element" << std::endl;
// volume calculation
MeshElement* srcElement = *(currNode->getSrcRegion().getBeginElements());
const int targetIdx = (*iter)->getIndex();
volumes->insert(make_pair(targetIdx, vol));
- std::cout << "Result : V (" << srcIdx << ", " << targetIdx << ") = " << matrix[srcIdx][targetIdx] << std::endl;
+ // std::cout << "Result : V (" << srcIdx << ", " << targetIdx << ") = " << matrix[srcIdx][targetIdx] << std::endl;
}
}
}
else // recursion
{
- std::cout << " - Recursion" << std::endl;
+ // std::cout << " - Recursion" << std::endl;
RegionNode* leftNode = new RegionNode();
RegionNode* rightNode = new RegionNode();
currNode->getSrcRegion().split(leftNode->getSrcRegion(), rightNode->getSrcRegion(), axis);
- std::cout << "After split, left src region has " << leftNode->getSrcRegion().getNumberOfElements() <<
- " elements and right src region has " << rightNode->getSrcRegion().getNumberOfElements() << " elements" << std::endl;
+ // std::cout << "After split, left src region has " << leftNode->getSrcRegion().getNumberOfElements() <<
+ // " elements and right src region has " << rightNode->getSrcRegion().getNumberOfElements() << " elements" << std::endl;
// ugly hack to avoid problem with enum which does not start at 0
// I guess I ought to implement ++ for it instead ...
axis = (axis != BoundingBox::ZMAX) ? static_cast<BoundingBox::BoxCoord>(axis + 1) : BoundingBox::XMAX;
// add target elements of curr node that overlap the two new nodes
- std::cout << " -- Adding target elements" << std::endl;
+ // std::cout << " -- Adding target elements" << std::endl;
int numLeftElements = 0;
int numRightElements = 0;
for(vector<MeshElement*>::const_iterator iter = currNode->getTargetRegion().getBeginElements() ;
iter != currNode->getTargetRegion().getEndElements() ; ++iter)
{
- //std::cout << " --- New target node" << std::endl;
+ //// std::cout << " --- New target node" << std::endl;
if(!leftNode->getSrcRegion().isDisjointWithElementBoundingBox(**iter))
{
++numRightElements;
}
-
}
- std::cout << "Left target region has " << numLeftElements << " elements and right target region has " << numRightElements << " elements" << std::endl;
+ // std::cout << "Left target region has " << numLeftElements << " elements and right target region has " << numRightElements << " elements" << std::endl;
if(numLeftElements != 0)
{
{
delete rightNode;
}
-
-
}
delete currNode;
- std::cout << "Next iteration. Nodes left : " << nodes.size() << std::endl;
+ // std::cout << "Next iteration. Nodes left : " << nodes.size() << std::endl;
}
// (d) : without fine-level filtering (a) - (c) for the time being
- std::cout << "Source : ";
- srcElement.dumpCoords();
- std::cout << "Target : ";
- targetElement.dumpCoords();
+ // std::cout << "Source : ";
+ // srcElement.dumpCoords();
+ // std::cout << "Target : ";
+ // targetElement.dumpCoords();
// get array of points of target tetraeder
const double* tetraCorners[4];
if(T.determinant() == 0.0)
{
// tetra is planar
- std::cout << "Planar tetra -- volume 0" << std::endl;
+ // std::cout << "Planar tetra -- volume 0" << std::endl;
return 0.0;
}
- std::cout << "Transform : " << std::endl;
- T.dump();
- std::cout << std::endl;
+ // std::cout << "Transform : " << std::endl;
+ // T.dump();
+ // std::cout << std::endl;
// triangulate source element faces (assumed tetraeder for the time being)
// do nothing
int i = 0;
for(vector<TransformedTriangle>::iterator iter = triangles.begin() ; iter != triangles.end(); ++iter)
{
- std::cout << std::endl << "= > Triangle " << ++i << std::endl;
- iter->dumpCoords();
+ // std::cout << std::endl << "= > Triangle " << ++i << std::endl;
+ // iter->dumpCoords();
volume += iter->calculateIntersectionVolume();
}
- std::cout << "Volume = " << volume << ", det= " << T.determinant() << std::endl;
+ // std::cout << "Volume = " << volume << ", det= " << T.determinant() << std::endl;
//? trying without abs to see if the sign of the determinant will always cancel that of the volume
//? but maybe we should take abs( det ( T ) ) or abs ( 1 / det * vol )