From: vbd Date: Thu, 13 Sep 2007 08:38:06 +0000 (+0000) Subject: staffan : X-Git-Tag: trio_trio_coupling~43 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=959a97a74d59ffa355468d8444d1203c6e4c9995;p=tools%2Fmedcoupling.git staffan : * added TargetIntersector.hxx * update IntersectorTetra --- diff --git a/src/INTERP_KERNEL/IntersectorTetra.cxx b/src/INTERP_KERNEL/IntersectorTetra.cxx index eb2b089ef..2df69a7d5 100644 --- a/src/INTERP_KERNEL/IntersectorTetra.cxx +++ b/src/INTERP_KERNEL/IntersectorTetra.cxx @@ -35,7 +35,6 @@ namespace INTERP_UTILS { const medGeometryElement targetType = targetMesh.getElementType(MED_CELL, targetCell); - // maybe we should do something more civilized here assert(targetType == MED_TETRA4); // get array of corners of target tetraeder @@ -126,7 +125,7 @@ namespace INTERP_UTILS const int globalNodeNum = getGlobalNumberOfNode(i, element, _srcMesh); if(_nodes.find(globalNodeNum) == _nodes.end()) { - const double* node = calculateNode(globalNodeNum); + calculateNode(globalNodeNum); } checkIsOutside(_nodes[globalNodeNum], isOutside); diff --git a/src/INTERP_KERNEL/IntersectorTetra.hxx b/src/INTERP_KERNEL/IntersectorTetra.hxx index 6ebf41588..d09af0b38 100644 --- a/src/INTERP_KERNEL/IntersectorTetra.hxx +++ b/src/INTERP_KERNEL/IntersectorTetra.hxx @@ -4,7 +4,7 @@ #include "MEDMEM_define.hxx" #include "MEDMEM_Mesh.hxx" -#include "Intersector.hxx" +#include "TargetIntersector.hxx" #include #include #include @@ -152,7 +152,7 @@ namespace INTERP_UTILS * source elements with triangular or quadratilateral faces. * */ - class IntersectorTetra + class IntersectorTetra : public TargetIntersector { public: @@ -168,7 +168,7 @@ namespace INTERP_UTILS private: // member functions - inline void createAffineTransform(const double* corners); + inline void createAffineTransform(const double** corners); inline void checkIsOutside(const double* pt, bool* isOutside) const; inline void calculateNode(int globalNodeNum); inline void calculateVolume(TransformedTriangle& tri, const TriangleFaceKey& key); @@ -203,7 +203,7 @@ namespace INTERP_UTILS inline void IntersectorTetra::createAffineTransform(const double** corners) { // create AffineTransform from tetrahedron - _t = new TetraAffineTransform( tetraCorners ); + _t = new TetraAffineTransform( corners ); } /** diff --git a/src/INTERP_KERNEL/TargetIntersector.hxx b/src/INTERP_KERNEL/TargetIntersector.hxx new file mode 100644 index 000000000..ffd4b0743 --- /dev/null +++ b/src/INTERP_KERNEL/TargetIntersector.hxx @@ -0,0 +1,20 @@ +#ifndef __TARGET_INTERSECTOR__HXX__ +#define __TARGET_INTERSECTOR__HXX__ + +namespace INTERP_UTILS +{ + class TargetIntersector + { + public: + virtual ~TargetIntersector() {} + + /** + * Calculate the volume of the intersection of two cells + * + * @param srcCell global number of the source cell + */ + virtual double intersectSourceCell(int srcCell) = 0; + }; +}; + +#endif