{
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
const int globalNodeNum = getGlobalNumberOfNode(i, element, _srcMesh);
if(_nodes.find(globalNodeNum) == _nodes.end())
{
- const double* node = calculateNode(globalNodeNum);
+ calculateNode(globalNodeNum);
}
checkIsOutside(_nodes[globalNodeNum], isOutside);
#include "MEDMEM_define.hxx"
#include "MEDMEM_Mesh.hxx"
-#include "Intersector.hxx"
+#include "TargetIntersector.hxx"
#include <vector>
#include <ext/hash_map>
#include <functional>
* source elements with triangular or quadratilateral faces.
*
*/
- class IntersectorTetra
+ class IntersectorTetra : public TargetIntersector
{
public:
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);
inline void IntersectorTetra::createAffineTransform(const double** corners)
{
// create AffineTransform from tetrahedron
- _t = new TetraAffineTransform( tetraCorners );
+ _t = new TetraAffineTransform( corners );
}
/**
--- /dev/null
+#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