X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FSplitterTetra.txx;h=38aab3c233bce06edbf49a475325afa7f9460575;hb=a3b5049dae89a91b027a945578ef88162a1518dd;hp=8364bb1b4a5782d9a547cf9e7cf820c0c47d7e31;hpb=6fabb8169338402d60db414052df84ae302f5a35;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/SplitterTetra.txx b/src/INTERP_KERNEL/SplitterTetra.txx index 8364bb1b4..38aab3c23 100644 --- a/src/INTERP_KERNEL/SplitterTetra.txx +++ b/src/INTERP_KERNEL/SplitterTetra.txx @@ -38,6 +38,9 @@ namespace INTERP_KERNEL { + template + const double SplitterTetra::SPARSE_TRUNCATION_LIMIT=1.0e-14; + /*! * output is expected to be allocated with 24*sizeof(void*) in order to store the 24 tetras. * These tetras have to be deallocated. @@ -56,6 +59,13 @@ namespace INTERP_KERNEL } /** + * SplitterTetra class computes for a list of cell ids of a given mesh \a srcMesh (badly named) the intersection with a + * single TETRA4 cell given by \a tetraCorners (of length 4) and \a nodesId (of length 4 too). \a nodedIds is given only to establish + * if a partial computation of a triangle has already been performed (to increase performance). + * + * The \a srcMesh can contain polyhedron cells. + * + * * Constructor creating object from the four corners of the tetrahedron. * * @param srcMesh mesh containing the source elements @@ -72,7 +82,7 @@ namespace INTERP_KERNEL _coords[6]=tetraCorners[2][0]; _coords[7]=tetraCorners[2][1]; _coords[8]=tetraCorners[2][2]; _coords[9]=tetraCorners[3][0]; _coords[10]=tetraCorners[3][1]; _coords[11]=tetraCorners[3][2]; // create the affine transform - createAffineTransform(tetraCorners); + _t=new TetraAffineTransform(_coords); } /** @@ -547,7 +557,6 @@ namespace INTERP_KERNEL * @param polyNodesNbr number of the nodes of the polygon source face * @param polyNodes numbers of the nodes of the polygon source face * @param polyCoords coordinates of the nodes of the polygon source face - * @param polyCoords coordinates of the nodes of the polygon source face * @param dimCaracteristic characteristic size of the meshes containing the triangles * @param precision precision for double float data used for comparison * @param listOfTetraFacesTreated list of tetra faces treated @@ -1075,25 +1084,10 @@ namespace INTERP_KERNEL */ template void SplitterTetra2::calculateGeneral48Tetra(typename std::vector< SplitterTetra* >& tetra) - { - // Define 8 hexahedral subzones as in Grandy, p449 - // the values correspond to the nodes that correspond to nodes 1,2,3,4,5,6,7,8 in the subcell - // For the correspondance of the nodes, see the GENERAL_48_SUB_NODES table in calculateSubNodes - static const int subZones[64] = - { - 0,8,21,12,9,20,26,22, - 8,1,13,21,20,10,23,26, - 12,21,16,3,22,26,25,17, - 21,13,2,16,26,23,18,25, - 9,20,26,22,4,11,24,14, - 20,10,23,26,11,5,15,24, - 22,26,25,17,14,24,19,7, - 26,23,18,25,24,15,6,19 - }; - + { for(int i = 0; i < 8; ++i) { - sixSplit(&subZones[8*i],tetra); + sixSplit(GENERAL_48_SUBZONES+8*i,tetra); } } @@ -1228,33 +1222,6 @@ namespace INTERP_KERNEL case GENERAL_48: { - // Each sub-node is the barycenter of two other nodes. - // For the edges, these lie on the original mesh. - // For the faces, these are the edge sub-nodes. - // For the cell these are two face sub-nodes. - static const int GENERAL_48_SUB_NODES[38] = - { - 0,1, // sub-node 9 (edge) - 0,4, // sub-node 10 (edge) - 1,5, // sub-node 11 (edge) - 4,5, // sub-node 12 (edge) - 0,3, // sub-node 13 (edge) - 1,2, // sub-node 14 (edge) - 4,7, // sub-node 15 (edge) - 5,6, // sub-node 16 (edge) - 2,3, // sub-node 17 (edge) - 3,7, // sub-node 18 (edge) - 2,6, // sub-node 19 (edge) - 6,7, // sub-node 20 (edge) - 8,11, // sub-node 21 (face) - 12,13, // sub-node 22 (face) - 9,17, // sub-node 23 (face) - 10,18, // sub-node 24 (face) - 14,15, // sub-node 25 (face) - 16,19, // sub-node 26 (face) - 20,25 // sub-node 27 (cell) - }; - for(int i = 0; i < 19; ++i) { double* barycenter = new double[3];