From: vbd Date: Wed, 8 Aug 2007 14:40:20 +0000 (+0000) Subject: staffan : X-Git-Tag: trio_trio_coupling~73 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bb6d87def3a68c864ec4203856c016992760522b;p=tools%2Fmedcoupling.git staffan : * commented out log messages to shorten length of log files --- diff --git a/src/INTERP_KERNEL/Interpolation3D.cxx b/src/INTERP_KERNEL/Interpolation3D.cxx index 59ae237a1..84aeac44f 100644 --- a/src/INTERP_KERNEL/Interpolation3D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D.cxx @@ -78,7 +78,7 @@ namespace MEDMEM 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); @@ -138,11 +138,11 @@ namespace MEDMEM { 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()); @@ -162,14 +162,14 @@ namespace MEDMEM 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(); @@ -180,8 +180,8 @@ namespace MEDMEM 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 ... @@ -189,13 +189,13 @@ namespace MEDMEM axis = (axis != BoundingBox::ZMAX) ? static_cast(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::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)) { @@ -209,10 +209,9 @@ namespace MEDMEM ++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) { @@ -231,12 +230,10 @@ namespace MEDMEM { delete rightNode; } - - } delete currNode; - std::cout << "Next iteration. Nodes left : " << nodes.size() << std::endl; + // std::cout << "Next iteration. Nodes left : " << nodes.size() << std::endl; } @@ -285,10 +282,10 @@ namespace MEDMEM // (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]; @@ -304,13 +301,13 @@ namespace MEDMEM 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 @@ -323,12 +320,12 @@ namespace MEDMEM int i = 0; for(vector::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 ) diff --git a/src/INTERP_KERNEL/MeshElement.cxx b/src/INTERP_KERNEL/MeshElement.cxx index f03ffbfbd..072c4ce75 100644 --- a/src/INTERP_KERNEL/MeshElement.cxx +++ b/src/INTERP_KERNEL/MeshElement.cxx @@ -19,6 +19,7 @@ namespace INTERP_UTILS { // get coordinates of vertices const int numNodes = getNumberNodes(); + const double* vertices[numNodes]; for(int i = 0 ; i < numNodes ; ++i) @@ -153,7 +154,7 @@ namespace INTERP_UTILS //{ not totally efficient since we transform each node once per face T.apply(&transformedNodes[3*(j-1)], node); - std::cout << "Node " << localNodeNumber << " = " << vToStr(node) << " transformed to " << vToStr(&transformedNodes[3*(j-1)]) << std::endl; + // std::cout << "Node " << localNodeNumber << " = " << vToStr(node) << " transformed to " << vToStr(&transformedNodes[3*(j-1)]) << std::endl; } @@ -170,7 +171,8 @@ namespace INTERP_UTILS // add other cases here to treat hexahedra, pyramides, etc default: - std::cout << "Only elements with triangular faces are supported at the moment." << std::endl; + // std::cout << "Only elements with triangular faces are supported at the moment." << std::endl; + ; } } diff --git a/src/INTERP_KERNEL/MeshRegion.cxx b/src/INTERP_KERNEL/MeshRegion.cxx index 72fd8388d..128b046c4 100644 --- a/src/INTERP_KERNEL/MeshRegion.cxx +++ b/src/INTERP_KERNEL/MeshRegion.cxx @@ -97,7 +97,7 @@ namespace INTERP_UTILS ++iter; } - // assert(std::abs(region1._elements.size() - region2._elements.size()) < 2); + // assert(std::abs(region1._elements.size() - region2._elements.size()) < 2); }