From: vbd Date: Mon, 10 Sep 2007 09:02:14 +0000 (+0000) Subject: staffan : X-Git-Tag: trio_trio_coupling~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a31b737ba6e0342742612d39a40774504c15d13;p=tools%2Fmedcoupling.git staffan : * update doc * inlined some methods --- diff --git a/src/INTERP_KERNEL/Interpolation3D.cxx b/src/INTERP_KERNEL/Interpolation3D.cxx index df58fd052..b3d592477 100644 --- a/src/INTERP_KERNEL/Interpolation3D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D.cxx @@ -116,7 +116,6 @@ namespace MEDMEM 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 @@ -265,7 +264,9 @@ namespace MEDMEM } } + // all nodes are deleted here delete currNode; + LOG(4, "Next iteration. Nodes left : " << nodes.size()); } diff --git a/src/INTERP_KERNEL/MeshRegion.cxx b/src/INTERP_KERNEL/MeshRegion.cxx index 16f874092..0153435ea 100644 --- a/src/INTERP_KERNEL/MeshRegion.cxx +++ b/src/INTERP_KERNEL/MeshRegion.cxx @@ -1,7 +1,6 @@ #include "MeshRegion.hxx" #include "MeshElement.hxx" - #include "MeshUtils.hxx" namespace INTERP_UTILS @@ -33,6 +32,7 @@ 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) @@ -72,6 +72,7 @@ namespace INTERP_UTILS * @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) @@ -119,37 +120,9 @@ namespace INTERP_UTILS 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::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::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(); - } }; diff --git a/src/INTERP_KERNEL/MeshRegion.hxx b/src/INTERP_KERNEL/MeshRegion.hxx index b190154ce..4edaebbe6 100644 --- a/src/INTERP_KERNEL/MeshRegion.hxx +++ b/src/INTERP_KERNEL/MeshRegion.hxx @@ -4,7 +4,6 @@ #include #include "BoundingBox.hxx" - #include "MEDMEM_Mesh.hxx" namespace INTERP_UTILS @@ -30,15 +29,16 @@ namespace INTERP_UTILS bool isDisjointWithElementBoundingBox(const MeshElement& elem) const; - std::vector::const_iterator getBeginElements() const; + inline std::vector::const_iterator getBeginElements() const; - std::vector::const_iterator getEndElements() const; + inline std::vector::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 _elements; /// BoundingBox containing all the nodes of all the elements in the region. @@ -46,6 +46,36 @@ namespace INTERP_UTILS }; + /* + * Accessor to beginning of elements vector + * + * @return constant iterator pointing at the beginning of the vector or elements + */ + inline std::vector::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::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(); + } + }; diff --git a/src/INTERP_KERNEL/RegionNode.cxx b/src/INTERP_KERNEL/RegionNode.cxx index d49b3d9cd..3be27a8ea 100644 --- a/src/INTERP_KERNEL/RegionNode.cxx +++ b/src/INTERP_KERNEL/RegionNode.cxx @@ -18,23 +18,6 @@ namespace INTERP_UTILS { } - /** - * 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; - } + }; diff --git a/src/INTERP_KERNEL/RegionNode.hxx b/src/INTERP_KERNEL/RegionNode.hxx index b8352c368..8820abb11 100644 --- a/src/INTERP_KERNEL/RegionNode.hxx +++ b/src/INTERP_KERNEL/RegionNode.hxx @@ -19,17 +19,39 @@ namespace INTERP_UTILS ~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; + } + };