int totalFiltered = 0;
#ifdef USE_RECURSIVE_BBOX_FILTER
-
/*
* Performs a depth-first search over srcMesh, using bounding boxes to recursively eliminate the elements of targetMesh
}
}
+ // all nodes are deleted here
delete currNode;
+
LOG(4, "Next iteration. Nodes left : " << nodes.size());
}
#include "MeshRegion.hxx"
#include "MeshElement.hxx"
-
#include "MeshUtils.hxx"
namespace INTERP_UTILS
* exist, it is created here. This creation is delayed to make it possible to have empty MeshRegions
*
* @param element pointer to element to add to region
+ * @param mesh mesh to which element belongs
*
*/
void MeshRegion::addElement(MeshElement* const element, const MEDMEM::MESH& mesh)
* @param region1 region in which to store one half of this region
* @param region2 region in which to store the other of this region
* @param coord coordinate of BoundingBox to use when splitting the region
+ * @param mesh mesh to which region belongs
*
*/
void MeshRegion::split(MeshRegion& region1, MeshRegion& region2, BoundingBox::BoxCoord coord, const MEDMEM::MESH& mesh)
assert(elemBox != 0);
return _box->isDisjointWith(*elemBox);
- }
+ }
- /*
- * Accessor to beginning of elements vector
- *
- * @return constant iterator pointing at the beginning of the vector or elements
- */
- std::vector<MeshElement*>::const_iterator MeshRegion::getBeginElements() const
- {
- return _elements.begin();
- }
-
- /*
- * Accessor to end of elements vector
- *
- * @return constant iterator pointing at the end of the vector or elements
- */
- std::vector<MeshElement*>::const_iterator MeshRegion::getEndElements() const
- {
- return _elements.end();
- }
- /*
- * Gives information on how many elements are contained in the region.
- *
- * @return the number of elements contained in the region
- */
- int MeshRegion::getNumberOfElements() const
- {
- return _elements.size();
- }
};
#include <vector>
#include "BoundingBox.hxx"
-
#include "MEDMEM_Mesh.hxx"
namespace INTERP_UTILS
bool isDisjointWithElementBoundingBox(const MeshElement& elem) const;
- std::vector<MeshElement*>::const_iterator getBeginElements() const;
+ inline std::vector<MeshElement*>::const_iterator getBeginElements() const;
- std::vector<MeshElement*>::const_iterator getEndElements() const;
+ inline std::vector<MeshElement*>::const_iterator getEndElements() const;
- int getNumberOfElements() const;
+ inline int getNumberOfElements() const;
private:
- /// Vector of pointers to elements. NB : these pointers are not owned by the region object, and are thus
- /// neither allocated or liberated in this class. The elements must therefore be allocated and liberated outside this class
+ /// Vector of pointers to contained MeshElements.
+ /// NB : these pointers are not owned by the region object, and are thus
+ /// neither allocated or liberated in this class. The elements must therefore be allocated and liberated outside the class.
std::vector<MeshElement*> _elements;
/// BoundingBox containing all the nodes of all the elements in the region.
};
+ /*
+ * Accessor to beginning of elements vector
+ *
+ * @return constant iterator pointing at the beginning of the vector or elements
+ */
+ inline std::vector<MeshElement*>::const_iterator MeshRegion::getBeginElements() const
+ {
+ return _elements.begin();
+ }
+
+ /*
+ * Accessor to end of elements vector
+ *
+ * @return constant iterator pointing at the end of the vector or elements
+ */
+ inline std::vector<MeshElement*>::const_iterator MeshRegion::getEndElements() const
+ {
+ return _elements.end();
+ }
+
+ /*
+ * Gives information on how many elements are contained in the region.
+ *
+ * @return the number of elements contained in the region
+ */
+ inline int MeshRegion::getNumberOfElements() const
+ {
+ return _elements.size();
+ }
+
};
{
}
- /**
- * Accessor to source region
- *
- * @return reference to source region
- */
- MeshRegion& RegionNode::getSrcRegion()
- {
- return _srcRegion;
- }
- /**
- * Accessor to target region
- *
- * @return reference to target region
- */
- MeshRegion& RegionNode::getTargetRegion()
- {
- return _targetRegion;
- }
+
};
~RegionNode();
- MeshRegion& getSrcRegion();
+ inline MeshRegion& getSrcRegion();
- MeshRegion& getTargetRegion();
+ inline MeshRegion& getTargetRegion();
private:
-
- MeshRegion _srcRegion; /// source region
- MeshRegion _targetRegion; /// target region
+
+ /// source region
+ MeshRegion _srcRegion;
+
+ /// target region
+ MeshRegion _targetRegion;
};
+ /**
+ * Accessor to source region
+ *
+ * @return reference to source region
+ */
+ inline MeshRegion& RegionNode::getSrcRegion()
+ {
+ return _srcRegion;
+ }
+ /**
+ * Accessor to target region
+ *
+ * @return reference to target region
+ */
+ inline MeshRegion& RegionNode::getTargetRegion()
+ {
+ return _targetRegion;
+ }
+
};