From: abn Date: Mon, 21 Sep 2020 15:08:41 +0000 (+0200) Subject: Various doc fixes - thanks "-Wdocumentation" in clang X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3eeb6625d6ab2df87ab6bbf70536f53671720bea;p=tools%2Fmedcoupling.git Various doc fixes - thanks "-Wdocumentation" in clang --- diff --git a/src/INTERP_KERNEL/BBTreePts.txx b/src/INTERP_KERNEL/BBTreePts.txx index 3bfbaee6f..b7af6a43b 100644 --- a/src/INTERP_KERNEL/BBTreePts.txx +++ b/src/INTERP_KERNEL/BBTreePts.txx @@ -130,12 +130,12 @@ public: delete _right; } - /*! returns in \a elems the list of elements potentially containing the point pointed to by \a xx + /*! returns in \a elem an element potentially containing the point pointed to by \a xx Contrary to BBTreePts::getElementsAroundPoint the norm 2 is used here. - \param [in] xx pointer to query point coords - \param [in] threshold - \param elems list of elements (given in 0-indexing) intersecting the bounding box + \param[in] xx pointer to query point coords + \param[in] threshold detection precision + \param[out] elem the element intersecting the bounding box \sa BBTreePts::getElementsAroundPoint */ double getElementsAroundPoint2(const double *xx, double threshold, ConnType& elem) const diff --git a/src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx b/src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx index 6af2ee279..30582aeb6 100644 --- a/src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx @@ -33,7 +33,6 @@ namespace INTERP_KERNEL * * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used */ template Barycentric3DIntersectorP1P1::Barycentric3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx index 684255f99..989419f9d 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeLin.cxx @@ -131,10 +131,8 @@ bool SegSegIntersector::areColinears() const /*! * Should be called \b once ! non const method. - * \param whereToFind specifies the box where final seek should be done. Essentially it is used for caracteristic reason. - * \param colinearity returns if regarding QuadraticPlanarPrecision::getPrecision() ; e1 and e2 are colinears - * If true 'this' is modified ! So this method be called once above all if true is returned for this parameter. - * \param areOverlapped if colinearity if true, this parameter looks if e1 and e2 are overlapped, i.e. is they lie on the same line (= this is different from + * \param obviousNoIntersection set to true if it is obvious that there is no intersection + * \param areOverlapped if the two segs are colinears, this parameter looks if e1 and e2 are overlapped, i.e. is they lie on the same line (= this is different from * a true intersection, two segments can be in "overlap" mode, without intersecting) */ void SegSegIntersector::areOverlappedOrOnlyColinears(bool& obviousNoIntersection, bool& areOverlapped) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx index 6cc7268f8..5c38608ba 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DElementaryEdge.cxx @@ -97,7 +97,7 @@ void ElementaryEdge::initLocations() const } /*! - * WARNING use this method if and only if this is so that it is completely in/out/on of @param pol. + * WARNING use this method if and only if this is so that it is completely in/out/on of param 'pol'. */ TypeOfEdgeLocInPolygon ElementaryEdge::locateFullyMySelf(const ComposedEdge& pol, TypeOfEdgeLocInPolygon precEdgeLoc) const { diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index ce1f2860e..9df9026a1 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -672,8 +672,8 @@ void QuadraticPolygon::appendCrudeData(const std::map& edgesThis, std::set& edgesBoundaryOther, const std::map& mapp, mcIdType idThis, mcIdType idOther, mcIdType offset, @@ -1080,7 +1080,7 @@ std::list QuadraticPolygon::zipConsecutiveInSegments() const } /*! - * @param [in] pol1zip is a list of set of edges (=an opened polygon) coming from split polygon 1. + * @param [in] pol1Zip is a list of set of edges (=an opened polygon) coming from split polygon 1. * @param [in] pol1 should be considered as pol1Simplified. * @param [in] pol2 is split pol2. * @param [out] results the resulting \b CLOSED polygons. diff --git a/src/INTERP_KERNEL/Interpolation1D0D.cxx b/src/INTERP_KERNEL/Interpolation1D0D.cxx index f5419fe00..71e326950 100644 --- a/src/INTERP_KERNEL/Interpolation1D0D.cxx +++ b/src/INTERP_KERNEL/Interpolation1D0D.cxx @@ -23,13 +23,6 @@ namespace INTERP_KERNEL { - /** - * \class Interpolation1D0D - * \brief Class used to calculate the interpolation between a 1D mesh and 0D mesh (in 3D space) - * Can be seen as a specialization of Interpolation3D, and allows notably the adjustment of bounind boxes. - * - */ - Interpolation1D0D::Interpolation1D0D() {} diff --git a/src/INTERP_KERNEL/Interpolation1D0D.hxx b/src/INTERP_KERNEL/Interpolation1D0D.hxx index 5a80e398f..6f120a22c 100644 --- a/src/INTERP_KERNEL/Interpolation1D0D.hxx +++ b/src/INTERP_KERNEL/Interpolation1D0D.hxx @@ -30,6 +30,12 @@ namespace INTERP_KERNEL { + /** + * \class Interpolation1D0D + * \brief Class used to calculate the interpolation between a 1D mesh and 0D mesh (in 3D space) + * Can be seen as a specialization of Interpolation3D, and allows notably the adjustment of bounind boxes. + * + */ class INTERPKERNEL_EXPORT Interpolation1D0D : public Interpolation { public: diff --git a/src/INTERP_KERNEL/Interpolation3D.cxx b/src/INTERP_KERNEL/Interpolation3D.cxx index 4d48bc4e1..763ef4887 100644 --- a/src/INTERP_KERNEL/Interpolation3D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D.cxx @@ -23,11 +23,6 @@ namespace INTERP_KERNEL { - /** - * \class Interpolation3D - * \brief Class used to calculate the volumes of intersection between the elements of two 3D meshes. - * - */ /** * Default constructor * diff --git a/src/INTERP_KERNEL/Interpolation3D.hxx b/src/INTERP_KERNEL/Interpolation3D.hxx index 6a6aaa1a7..43290d9f5 100755 --- a/src/INTERP_KERNEL/Interpolation3D.hxx +++ b/src/INTERP_KERNEL/Interpolation3D.hxx @@ -27,7 +27,12 @@ #include "InterpolationOptions.hxx" namespace INTERP_KERNEL -{ +{ + /** + * \class Interpolation3D + * \brief Class used to calculate the volumes of intersection between the elements of two 3D meshes. + */ + class INTERPKERNEL_EXPORT Interpolation3D : public Interpolation { public: diff --git a/src/INTERP_KERNEL/Interpolation3D1D.cxx b/src/INTERP_KERNEL/Interpolation3D1D.cxx index 5e890d0bc..3b3812990 100644 --- a/src/INTERP_KERNEL/Interpolation3D1D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D1D.cxx @@ -23,13 +23,6 @@ namespace INTERP_KERNEL { - /** - * \class Interpolation3D1D - * \brief Class used to calculate the interpolation between a 3D mesh and 1D mesh (in 3D space) - * Can be seen as a specialization of Interpolation3D, and allows notably the adjustment of bounind boxes. - * - */ - Interpolation3D1D::Interpolation3D1D() { } Interpolation3D1D::Interpolation3D1D(const InterpolationOptions& io):Interpolation(io) { } diff --git a/src/INTERP_KERNEL/Interpolation3D1D.hxx b/src/INTERP_KERNEL/Interpolation3D1D.hxx index 100d1bc96..02ba51161 100755 --- a/src/INTERP_KERNEL/Interpolation3D1D.hxx +++ b/src/INTERP_KERNEL/Interpolation3D1D.hxx @@ -28,7 +28,13 @@ #include namespace INTERP_KERNEL -{ +{ + /** + * \class Interpolation3D1D + * \brief Class used to calculate the interpolation between a 3D mesh and 1D mesh (in 3D space) + * Can be seen as a specialization of Interpolation3D, and allows notably the adjustment of bounding boxes. + */ + class INTERPKERNEL_EXPORT Interpolation3D1D : public Interpolation { public: diff --git a/src/INTERP_KERNEL/InterpolationCC.txx b/src/INTERP_KERNEL/InterpolationCC.txx index ee1e89c84..dfa25089c 100644 --- a/src/INTERP_KERNEL/InterpolationCC.txx +++ b/src/INTERP_KERNEL/InterpolationCC.txx @@ -63,8 +63,8 @@ namespace INTERP_KERNEL * \brief Fills the matrix by precomputed cell interferences along axes * \param inter_of_axis - cell/cell interferences along each axis * \param result - matrix to fill in - * \param src_nb_cells[] - nb of cells along each of axes in the source mesh - * \param tgt_nb_cells[] - nb of cells along each of axes in the target mesh + * \param src_nb_cells - nb of cells along each of axes in the source mesh + * \param tgt_nb_cells - nb of cells along each of axes in the target mesh * \param src_i_cell - source cell number accumulated by previous axes * \param tgt_i_cell - target cell number accumulated by previous axes * \param src_prev_area - factor by which this axis icreases cell number diff --git a/src/INTERP_KERNEL/InterpolationCU.txx b/src/INTERP_KERNEL/InterpolationCU.txx index 6ab9f852d..d17dd78f9 100644 --- a/src/INTERP_KERNEL/InterpolationCU.txx +++ b/src/INTERP_KERNEL/InterpolationCU.txx @@ -84,8 +84,8 @@ namespace INTERP_KERNEL * the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j]. * - * @param srcMesh cartesian source mesh - * @param targetMesh unstructured target mesh + * @param src_mesh cartesian source mesh + * @param tgt_mesh unstructured target mesh * @param result matrix in which the result is stored * @param method interpolation method */ @@ -208,8 +208,8 @@ namespace INTERP_KERNEL * the indexing is more natural : the intersection volume of the target element i with source element j is found at matrix[i-1][j]. * - * @param srcMesh 2-dimesional unstructured target mesh - * @param targetMesh 2-dimensional cartesian source mesh + * @param meshS 2-dimesional unstructured target mesh + * @param meshT 2-dimensional cartesian source mesh * @param result matrix in which the result is stored * @param method interpolation method */ diff --git a/src/INTERP_KERNEL/InterpolationCurve.hxx b/src/INTERP_KERNEL/InterpolationCurve.hxx index f9c0e9caa..e561d6bf0 100755 --- a/src/INTERP_KERNEL/InterpolationCurve.hxx +++ b/src/INTERP_KERNEL/InterpolationCurve.hxx @@ -29,7 +29,15 @@ #include namespace INTERP_KERNEL -{ +{ + /** + * \defgroup interpolationCurve InterpolationCurve + * + * \class InterpolationCurve + * \brief Class used to compute the coefficients of the interpolation matrix between + * two local meshes in two dimensions. + */ + template class InterpolationCurve : public Interpolation< InterpolationCurve > { diff --git a/src/INTERP_KERNEL/InterpolationCurve.txx b/src/INTERP_KERNEL/InterpolationCurve.txx index 16b481748..f56d32f96 100755 --- a/src/INTERP_KERNEL/InterpolationCurve.txx +++ b/src/INTERP_KERNEL/InterpolationCurve.txx @@ -33,13 +33,7 @@ namespace INTERP_KERNEL { - /** - * \defgroup interpolationCurve InterpolationCurve - * - * \class InterpolationCurve - * \brief Class used to compute the coefficients of the interpolation matrix between - * two local meshes in two dimensions. - */ + template InterpolationCurve::InterpolationCurve() { diff --git a/src/INTERP_KERNEL/InterpolationPlanar.hxx b/src/INTERP_KERNEL/InterpolationPlanar.hxx index 23f0f852b..dd26cbea4 100755 --- a/src/INTERP_KERNEL/InterpolationPlanar.hxx +++ b/src/INTERP_KERNEL/InterpolationPlanar.hxx @@ -27,7 +27,15 @@ #include "InterpolationOptions.hxx" namespace INTERP_KERNEL -{ +{ + /** + * \defgroup interpolationPlanar InterpolationPlanar + * + * \class InterpolationPlanar + * \brief Class used to compute the coefficients of the interpolation matrix between + * two local meshes in two dimensions. Meshes can contain mixed triangular and quadrangular elements. + */ + template class InterpolationPlanar : public Interpolation< InterpolationPlanar > { diff --git a/src/INTERP_KERNEL/InterpolationPlanar.txx b/src/INTERP_KERNEL/InterpolationPlanar.txx index cbbbe68d0..cba0c0ec5 100755 --- a/src/INTERP_KERNEL/InterpolationPlanar.txx +++ b/src/INTERP_KERNEL/InterpolationPlanar.txx @@ -50,13 +50,6 @@ namespace INTERP_KERNEL { - /** - * \defgroup interpolationPlanar InterpolationPlanar - * - * \class InterpolationPlanar - * \brief Class used to compute the coefficients of the interpolation matrix between - * two local meshes in two dimensions. Meshes can contain mixed triangular and quadrangular elements. - */ template InterpolationPlanar::InterpolationPlanar():_dim_caracteristic(1) diff --git a/src/INTERP_KERNEL/InterpolationUtils.hxx b/src/INTERP_KERNEL/InterpolationUtils.hxx index f429f2fd8..de5778c54 100644 --- a/src/INTERP_KERNEL/InterpolationUtils.hxx +++ b/src/INTERP_KERNEL/InterpolationUtils.hxx @@ -166,8 +166,8 @@ namespace INTERP_KERNEL * This method builds a potentially non-convex polygon cell built with the first point of 'triIn' the barycenter of two edges starting or ending with * the first point of 'triIn' and the barycenter of 'triIn'. * - * @param triIn is a 6 doubles array in full interlace mode, that represents a triangle. - * @param quadOut is a 8 doubles array filled after the following call. + * @param polygIn is a 6 doubles array in full interlace mode, that represents a triangle. + * @param polygOut is a 8 doubles array filled after the following call. */ template inline void fillDualCellOfPolyg(const double *polygIn, mcIdType nPtsPolygonIn, double *polygOut) @@ -337,8 +337,9 @@ namespace INTERP_KERNEL /*! * \brief Solve system equation in matrix form using Gaussian elimination algorithm - * \param M - N x N+NB_OF_VARS matrix - * \param sol - vector of N solutions + * \param matrix - N x N+NB_OF_VARS matrix + * \param solutions - vector of N solutions + * \param eps - precision * \retval bool - true if succeeded */ template diff --git a/src/INTERP_KERNEL/Intersector3D.txx b/src/INTERP_KERNEL/Intersector3D.txx index cafd60520..f5bfe2e7a 100644 --- a/src/INTERP_KERNEL/Intersector3D.txx +++ b/src/INTERP_KERNEL/Intersector3D.txx @@ -48,7 +48,7 @@ namespace INTERP_KERNEL } /*! - * @param icellT in format of MyMeshType. + * @param icellS in format of MyMeshType. */ template void Intersector3D::getRealSourceCoordinates(ConnType icellS, std::vector& coordsS) const @@ -76,7 +76,7 @@ namespace INTERP_KERNEL } /*! - * @param icellT in C format. + * @param icellS in C format. * @return is in format of MyMeshType */ template @@ -89,7 +89,7 @@ namespace INTERP_KERNEL /*! * @param icellS in format of MyMeshType. - * @param res ; out param in format of MyMeshType. + * @param[out] res out param in format of MyMeshType. */ template void Intersector3D::getConnOfSourceCell(ConnType icellS, typename std::vector& res) const diff --git a/src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx b/src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx index bd86bd760..33c65b32a 100644 --- a/src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx @@ -33,7 +33,6 @@ namespace INTERP_KERNEL * * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used */ template MappedBarycentric3DIntersectorP1P1::MappedBarycentric3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx index 886fba0f3..9272cbb96 100644 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx +++ b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P0.txx @@ -33,7 +33,6 @@ namespace INTERP_KERNEL /** * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used */ template PointLocator3DIntersectorP0P0::PointLocator3DIntersectorP0P0(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx index b67dfe876..7ad8c2fe5 100644 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx +++ b/src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx @@ -30,7 +30,6 @@ namespace INTERP_KERNEL /** * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used */ template PointLocator3DIntersectorP0P1::PointLocator3DIntersectorP0P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx index cb5b14182..949577dcc 100644 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx +++ b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P0.txx @@ -29,7 +29,6 @@ namespace INTERP_KERNEL /** * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used * * WARNING : in _split attribute, sourceMesh and targetMesh are switched in order to fit intersectCells feature. */ diff --git a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx index b78b5ecc7..c9ddc4cb9 100644 --- a/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx +++ b/src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx @@ -32,7 +32,6 @@ namespace INTERP_KERNEL * * @param targetMesh mesh containing the target elements * @param srcMesh mesh containing the source elements - * @param policy splitting policy to be used */ template PointLocator3DIntersectorP1P1::PointLocator3DIntersectorP1P1(const MyMeshType& targetMesh, const MyMeshType& srcMesh, double precision): diff --git a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx b/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx index 1697e5172..ebce93c45 100755 --- a/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx +++ b/src/INTERP_KERNEL/PolyhedronIntersectorP1P0Bary.txx @@ -84,8 +84,8 @@ namespace INTERP_KERNEL //================================================================================ /*! * \brief This method computes a value per each node of source cell for each target cell. - * \param srcCell - a source tetrahedron - * \param tgtCells - target elements + * \param srcCells - source elements + * \param tgtCell - target element * \param res - matrix to fill in */ //================================================================================ diff --git a/src/INTERP_KERNEL/SplitterTetra.txx b/src/INTERP_KERNEL/SplitterTetra.txx index 7d9bf8561..df1724ac0 100644 --- a/src/INTERP_KERNEL/SplitterTetra.txx +++ b/src/INTERP_KERNEL/SplitterTetra.txx @@ -374,7 +374,7 @@ namespace INTERP_KERNEL /** * Calculates the intersection surface of two coplanar triangles. * - * @param palneNormal normal of the plane for the first triangle + * @param planeNormal normal of the plane for the first triangle * @param planeConstant constant of the equation of the plane for the first triangle * @param p1 coordinates of the first node of the first triangle * @param p2 coordinates of the second node of the first triangle @@ -540,7 +540,7 @@ namespace INTERP_KERNEL * Determine if a face is coplanar with a triangle. * The first face is characterized by the equation of her plane * - * @param palneNormal normal of the plane for the first triangle + * @param planeNormal normal of the plane for the first triangle * @param planeConstant constant of the equation of the plane for the first triangle * @param coordsFace coordinates of the triangle face * @param precision precision for double float data used for comparison @@ -1253,7 +1253,6 @@ namespace INTERP_KERNEL * * @param targetMesh the target mesh * @param targetCell the global number of the cell that the object represents, in targetMesh mode. - * @param policy the splitting policy of the object * */ template diff --git a/src/INTERP_KERNEL/TargetIntersector.hxx b/src/INTERP_KERNEL/TargetIntersector.hxx index c9db70821..25b9e69e6 100644 --- a/src/INTERP_KERNEL/TargetIntersector.hxx +++ b/src/INTERP_KERNEL/TargetIntersector.hxx @@ -40,8 +40,8 @@ namespace INTERP_KERNEL public: /*! * Tool for cell intersection, result is always positive. - * @param icellT id of cell in target mesh in \b C \b mode. - * @param icellsS ids of cells in source mesh in \b C \b mode. + * @param targetCell id of cell in target mesh in \b C \b mode. + * @param srcCells ids of cells in source mesh in \b C \b mode. * @param res is an IN/OUT parameter that represents the icellTth row in final matrix, fed with at most icellsS elements. */ virtual void intersectCells(ConnType targetCell, const std::vector& srcCells, MyMatrix& res) = 0; diff --git a/src/INTERP_KERNELTest/QuadraticPlanarInterpTest2.cxx b/src/INTERP_KERNELTest/QuadraticPlanarInterpTest2.cxx index 8a348f93d..f0e648473 100644 --- a/src/INTERP_KERNELTest/QuadraticPlanarInterpTest2.cxx +++ b/src/INTERP_KERNELTest/QuadraticPlanarInterpTest2.cxx @@ -56,7 +56,7 @@ void QuadraticPlanarInterpTest::IntersectArcCircleBase() CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[0],center[0]+radius*cos(3*M_PI/4),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[1],center[0]+radius*cos(M_PI/3),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[2],center[1]+radius*sin(3*M_PI/4),ADMISSIBLE_ERROR); - CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[3],center[1]+radius*sin(M_PI/2),ADMISSIBLE_ERROR);//<< + CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[3],center[1]+radius*sin(M_PI/2),ADMISSIBLE_ERROR); e1->decrRef(); // e1=buildArcOfCircle(center,radius,3*M_PI/4,7*M_PI/8); @@ -67,7 +67,7 @@ void QuadraticPlanarInterpTest::IntersectArcCircleBase() e1->decrRef(); // e1=buildArcOfCircle(center,radius,7.*M_PI/8.,9.*M_PI/8.); - CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[0],center[0]+radius*cos(M_PI),ADMISSIBLE_ERROR);//<< + CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[0],center[0]+radius*cos(M_PI),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[1],center[0]+radius*cos(7*M_PI/8),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[2],center[1]+radius*sin(9*M_PI/8),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[3],center[1]+radius*sin(7*M_PI/8),ADMISSIBLE_ERROR); @@ -83,7 +83,7 @@ void QuadraticPlanarInterpTest::IntersectArcCircleBase() e1=buildArcOfCircle(center,radius,11.*M_PI/8.,7.*M_PI/4.); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[0],center[0]+radius*cos(11*M_PI/8),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[1],center[0]+radius*cos(7*M_PI/4),ADMISSIBLE_ERROR); - CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[2],center[1]+radius*sin(3*M_PI/2),ADMISSIBLE_ERROR);//<< + CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[2],center[1]+radius*sin(3*M_PI/2),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[3],center[1]+radius*sin(7*M_PI/4),ADMISSIBLE_ERROR); e1->decrRef(); // @@ -96,7 +96,7 @@ void QuadraticPlanarInterpTest::IntersectArcCircleBase() // e1=buildArcOfCircle(center,radius,-M_PI/8.,M_PI/4.); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[0],center[0]+radius*cos(M_PI/4),ADMISSIBLE_ERROR); - CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[1],center[0]+radius*cos(0.),ADMISSIBLE_ERROR); //<< + CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[1],center[0]+radius*cos(0.),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[2],center[1]+radius*sin(15*M_PI/8),ADMISSIBLE_ERROR); CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getBounds()[3],center[1]+radius*sin(M_PI/4),ADMISSIBLE_ERROR); e1->decrRef(); diff --git a/src/INTERP_KERNELTest/QuadraticPlanarInterpTest4.cxx b/src/INTERP_KERNELTest/QuadraticPlanarInterpTest4.cxx index 9114467f4..92444771d 100644 --- a/src/INTERP_KERNELTest/QuadraticPlanarInterpTest4.cxx +++ b/src/INTERP_KERNELTest/QuadraticPlanarInterpTest4.cxx @@ -518,9 +518,9 @@ void QuadraticPlanarInterpTest::checkHighLevelFunctionTest1() ElementaryEdge *e1=dynamic_cast((*pol)[1]); ElementaryEdge *e2=dynamic_cast((*pol)[0]); CPPUNIT_ASSERT(e0); CPPUNIT_ASSERT(e1); CPPUNIT_ASSERT(e2); - CPPUNIT_ASSERT(dynamic_cast(e0->getPtr()));//<- testing detection of colinearity + CPPUNIT_ASSERT(dynamic_cast(e0->getPtr()));// <- testing detection of colinearity CPPUNIT_ASSERT(dynamic_cast(e1->getPtr())); - CPPUNIT_ASSERT(dynamic_cast(e2->getPtr()));//<- testing detection of colinearity + CPPUNIT_ASSERT(dynamic_cast(e2->getPtr()));// <- testing detection of colinearity nodes.clear(); delete pol; nodes.push_back(new Node(coords)); @@ -536,9 +536,9 @@ void QuadraticPlanarInterpTest::checkHighLevelFunctionTest1() e1=dynamic_cast((*pol)[1]); e2=dynamic_cast((*pol)[0]); CPPUNIT_ASSERT(e0); CPPUNIT_ASSERT(e1); CPPUNIT_ASSERT(e2); - CPPUNIT_ASSERT(dynamic_cast(e0->getPtr()));//<- testing detection of colinearity + CPPUNIT_ASSERT(dynamic_cast(e0->getPtr()));// <- testing detection of colinearity CPPUNIT_ASSERT(dynamic_cast(e1->getPtr())); - CPPUNIT_ASSERT(dynamic_cast(e2->getPtr()));//<- testing detection of colinearity + CPPUNIT_ASSERT(dynamic_cast(e2->getPtr()));// <- testing detection of colinearity delete pol; const double coords2[]={ 0.,0., diff --git a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx index 72a4e2395..f029a4766 100644 --- a/src/MEDCoupling/MEDCoupling1GTUMesh.cxx +++ b/src/MEDCoupling/MEDCoupling1GTUMesh.cxx @@ -3072,7 +3072,6 @@ void MEDCoupling1DGTUMesh::unserialization(const std::vector& tinyInfoD, * Finds nodes not used in any cell and returns an array giving a new id to every node * by excluding the unused nodes, for which the array holds -1. The result array is * a mapping in "Old to New" mode. - * \param [out] nbrOfNodesInUse - number of node ids present in the nodal connectivity. * \return DataArrayIdType * - a new instance of DataArrayIdType. Its length is \a * this->getNumberOfNodes(). It holds for each node of \a this mesh either -1 * if the node is unused or a new id else. The caller is to delete this diff --git a/src/MEDCoupling/MEDCouplingAMRAttribute.cxx b/src/MEDCoupling/MEDCouplingAMRAttribute.cxx index 180420336..45db74684 100755 --- a/src/MEDCoupling/MEDCouplingAMRAttribute.cxx +++ b/src/MEDCoupling/MEDCouplingAMRAttribute.cxx @@ -819,7 +819,7 @@ void MEDCouplingAMRAttribute::spillInfoOnComponents(const std::vector< std::vect /*! * Assign nature for each fields in \a this. - * \param [in] nfs + * \param [in] nfs vector of field natures. */ void MEDCouplingAMRAttribute::spillNatures(const std::vector& nfs) { diff --git a/src/MEDCoupling/MEDCouplingCMesh.cxx b/src/MEDCoupling/MEDCouplingCMesh.cxx index f7e96c121..d1a1171f0 100755 --- a/src/MEDCoupling/MEDCouplingCMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCMesh.cxx @@ -665,7 +665,7 @@ void MEDCouplingCMesh::translate(const double *vector) /*! * Applies scaling transformation to all nodes of \a this mesh. - * \param [in] postd::size_t - coordinates of a scaling center. This array is to be of + * \param [in] point - coordinates of a scaling center. This array is to be of * size \a this->getSpaceDimension() at least. * \param [in] factor - a scale factor. */ diff --git a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx index f064b8818..808c41083 100755 --- a/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCartesianAMRMesh.cxx @@ -1266,7 +1266,6 @@ void MEDCouplingCartesianAMRMeshGen::fillCellFieldOnPatchOnlyOnGhostZone(mcIdTyp * * \param [in] patchId - The id of the patch \a cellFieldOnThis has to be put on. * \param [in] cellFieldOnThis - The array of the cell field on \c this->getImageMesh() to be projected to patch having id \a patchId. - * \param [in,out] cellFieldOnPatch - The array of the cell field on the requested patch to be filled. * \param [in] ghostLev - The size of the ghost zone (must be >=0 !) * \param [in] arrsOnPatches - \b WARNING arrsOnPatches[patchId] is \b NOT \b const. All others are const. * @@ -1900,12 +1899,12 @@ MEDCouplingCartesianAMRMesh *MEDCouplingCartesianAMRMesh::deepCopy(MEDCouplingCa /*! * This method creates a multi level patches split at once. - * This method calls as times as size of \a bso createPatchesFromCriterion. Size of \a bso and size of \a factors must be the same ! + * This method calls as many times as size of \a bso createPatchesFromCriterion. Size of \a bso and size of \a factors must be the same ! * \b WARNING, after the call the number of levels in \a this is equal to bso.size() + 1 ! * - * \param [in] bso - * \param [in] criterion - * \param [in] factors + * \param [in] bso vector of BoxSplittingOptions + * \param [in] criterion DataArrayDouble + * \param [in] factors vector of vector of factors * \param [in] eps - See DataArrayDouble::toVectorOfBool for more information about the semantic of eps. * * \sa createPatchesFromCriterion diff --git a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx index ddc2418b5..e5c4a5a2d 100755 --- a/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCurveLinearMesh.cxx @@ -376,7 +376,8 @@ MEDCouplingFieldDouble *MEDCouplingCurveLinearMesh::getMeasureField(bool isAbs) } /*! - * \param [in,out] f field fed with good values. + * \param [in] isAbs whether to compute signed or absolute values + * \param [in,out] field field fed with good values. * \sa MEDCouplingCurveLinearMesh::getMeasureField */ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim1(bool isAbs, MEDCouplingFieldDouble *field) const @@ -402,7 +403,8 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim1(bool isAbs, MEDCoupling } /*! - * \param [in,out] f field fed with good values. + * \param [in] isAbs whether to compute signed or absolute values + * \param [in,out] field field fed with good values. * \sa MEDCouplingCurveLinearMesh::getMeasureField */ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCouplingFieldDouble *field) const @@ -428,7 +430,8 @@ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim2(bool isAbs, MEDCoupling } /*! - * \param [in,out] f field fed with good values. + * \param [in] isAbs whether to compute signed or absolute values + * \param [in,out] field field fed with good values. * \sa MEDCouplingCurveLinearMesh::getMeasureField */ void MEDCouplingCurveLinearMesh::getMeasureFieldMeshDim3(bool isAbs, MEDCouplingFieldDouble *field) const diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index 5da1e1388..38bd67efc 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -363,7 +363,7 @@ void MEDCouplingField::clearGaussLocalizations() * problem. * \param [in] locId - the id of the Gauss localization object of interest. * It must be in range 0 <= locId < getNbOfGaussLocalization() . - * \return \ref MEDCoupling::MEDCouplingGaussLocalization "MEDCouplingGaussLocalization" & - the + * \return the Gauss localization object as a \ref MEDCoupling::MEDCouplingGaussLocalization "MEDCouplingGaussLocalization" &. * Gauss localization object. * \throw If \a this field is not on Gauss points. * \throw If \a locId is not within the valid range. diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index 260b101d2..d4ae30283 100755 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -165,7 +165,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::deepCopy() const * \ref MEDCoupling::ONE_TIME "ONE_TIME", * \ref MEDCoupling::LINEAR_TIME "LINEAR_TIME", * \ref MEDCoupling::CONST_ON_TIME_INTERVAL "CONST_ON_TIME_INTERVAL"). - * \param [in] deepCopy - if \c true, the copy of the underlying data arrays is + * \param [in] deepCpy - if \c true, the copy of the underlying data arrays is * deep, else all data arrays of \a this field are shared by the new field. * \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The * caller is to delete this field using decrRef() as it is no more needed. diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 25148688f..327fbc8b0 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -1073,8 +1073,6 @@ namespace MEDCoupling * For more info on renumbering see \ref numbering. * \param [in] new2Old - C array of length equal to \a this->getNumberOfTuples() * giving a previous position of i-th new value. - * \return DataArrayDouble * - the new instance of DataArrayDouble that the caller - * is to delete using decrRef() as it is no more needed. */ template void DataArrayTemplate::renumberInPlaceR(const mcIdType *new2Old) @@ -1354,7 +1352,7 @@ namespace MEDCoupling * Changes the number of components within \a this array so that its raw data **does * not** change, instead splitting this data into tuples changes. * \warning This method erases all (name and unit) component info set before! - * \param [in] newNbOfComp - number of components for \a this array to have. + * \param [in] newNbOfCompo - number of components for \a this array to have. * \throw If \a this is not allocated * \throw If getNbOfElems() % \a newNbOfCompo != 0. * \throw If \a newNbOfCompo is lower than 1. @@ -4463,7 +4461,7 @@ struct NotInRange * from values of \a this array, which is supposed to contain a renumbering map in * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode. * To know how to use the renumbering maps see \ref numbering. - * \param [in] newNbOfElem - the number of tuples in the result array. + * \param [in] oldNbOfElem - the number of tuples in the result array. * \return DataArrayInt * - the new instance of DataArrayInt. * The caller is to delete this result array using decrRef() as it is no more * needed. @@ -4533,7 +4531,6 @@ struct NotInRange * from values of \a this array, which is supposed to contain a renumbering map in * "New to Old" mode. The result array contains a renumbering map in "Old to New" mode. * To know how to use the renumbering maps see \ref numbering. - * \param [in] newNbOfElem - the number of tuples in the result array. * \return MapII - the new instance of Map. * * \if ENABLE_EXAMPLES @@ -7216,7 +7213,7 @@ struct NotInRange * * \param [in] idsOfSelectStart begin of set of ids of the input extraction (included) * \param [in] idsOfSelectStop end of set of ids of the input extraction (excluded) - * \param [in] idsOfSelectStep + * \param [in] idsOfSelectStep step of set of ids of the input extraction * \param [in] arrIn arr origin array from which the extraction will be done. * \param [in] arrIndxIn is the input index array allowing to walk into \b arrIn * \param [out] arrOut the resulting array diff --git a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx index 3acb7faf1..ada99dd75 100755 --- a/src/MEDCoupling/MEDCouplingMemArrayChar.cxx +++ b/src/MEDCoupling/MEDCouplingMemArrayChar.cxx @@ -397,15 +397,12 @@ DataArrayIdType *DataArrayChar::findIdsInRange(char vmin, char vmax) const /*! * Returns a new DataArrayChar by concatenating two given arrays, so that (1) the number - * of tuples in the result array is a1->getNumberOfTuples() + a2->getNumberOfTuples() - - * offsetA2 and (2) + * of tuples in the result array is a1->getNumberOfTuples() + a2->getNumberOfTuples() and (2) * the number of component in the result array is same as that of each of given arrays. - * First \a offsetA2 tuples of \a a2 are skipped and thus are missing from the result array. * Info on components is copied from the first of the given arrays. Number of components * in the given arrays must be the same. * \param [in] a1 - an array to include in the result array. * \param [in] a2 - another array to include in the result array. - * \param [in] offsetA2 - number of tuples of \a a2 to skip. * \return DataArrayChar * - the new instance of DataArrayChar. * The caller is to delete this result array using decrRef() as it is no more * needed. diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 80be81941..85f87afe7 100755 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -370,7 +370,8 @@ void MEDCouplingPointSet::getNodeIdsNearPoints(const double *pos, mcIdType nbOfP /*! * @param comm in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). - * @param commI in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). + * @param commIndex in param in the same format than one returned by findCommonNodes method (\ref numbering-indirect). + * @param newNbOfNodes new number of nodes * @return the old to new correspondence array. */ DataArrayIdType *MEDCouplingPointSet::buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex, diff --git a/src/MEDCoupling/MEDCouplingRemapper.cxx b/src/MEDCoupling/MEDCouplingRemapper.cxx index 822101733..400862793 100755 --- a/src/MEDCoupling/MEDCouplingRemapper.cxx +++ b/src/MEDCoupling/MEDCouplingRemapper.cxx @@ -194,7 +194,7 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnly() * If meshes of \b srcField and \b targetField do not match exactly those given into \ref MEDCoupling::MEDCouplingRemapper::prepare "prepare method" an exception will be thrown. * * \param [in] srcField is the source field from which the interpolation will be done. The mesh into \b srcField should be the same than those specified on MEDCoupling::MEDCouplingRemapper::prepare. - * \param [in/out] targetField the destination field with the allocated array in which all tuples will be overwritten. + * \param [in,out] targetField the destination field with the allocated array in which all tuples will be overwritten. * \param [in] dftValue is the value that will be assigned in the targetField to each entity of target mesh (entity depending on the method selected on prepare invocation) that is not intercepted by any entity of source mesh. * For example in "P0P0" case (cell-cell) if a cell in target mesh is not overlapped by any source cell the \a dftValue value will be attached on that cell in the returned \a targetField. In some cases a target * cell not intercepted by any source cell is a bug so in this case it is advised to set a huge value (1e300 for example) to \a dftValue to quickly point to the problem. But for users doing parallelism a target cell can diff --git a/src/MEDCoupling/MEDCouplingSkyLineArray.cxx b/src/MEDCoupling/MEDCouplingSkyLineArray.cxx index ca2948b99..3aaa46847 100755 --- a/src/MEDCoupling/MEDCouplingSkyLineArray.cxx +++ b/src/MEDCoupling/MEDCouplingSkyLineArray.cxx @@ -481,7 +481,7 @@ const mcIdType * MEDCouplingSkyLineArray::getSimplePackSafePtr(const mcIdType ab * \param[in] superPackIndices the list of super-packs that should be inspected * \param[in] packBg the pack that the function is looking for in each of the provided super-pack * \param[in] packEnd the pack that the function is looking for in each of the provided super-pack - * \param[out] a vector of mcIdType, having the same size as superPackIndices and containing for each inspected super-pack + * \param[out] out a vector of mcIdType, having the same size as superPackIndices and containing for each inspected super-pack * the index of the first matching pack, or -1 if none found. */ void MEDCouplingSkyLineArray::findPackIds(const std::vector & superPackIndices, diff --git a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx index 3570a3b00..680d9f64e 100755 --- a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx +++ b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx @@ -1274,7 +1274,7 @@ mcIdType MEDCouplingStructuredMesh::getNumberOfNodes() const /*! * This method returns for a cell which id is \a cellId the location (locX,locY,locZ) of this cell in \a this. * - * \param [in] cellId + * \param [in] cellId ID of the cell * \return - A vector of size this->getMeshDimension() * \throw if \a cellId not in [ 0, this->getNumberOfCells() ) */ @@ -1297,7 +1297,7 @@ std::vector MEDCouplingStructuredMesh::getLocationFromCellId(mcIdType /*! * This method returns for a node which id is \a nodeId the location (locX,locY,locZ) of this node in \a this. * - * \param [in] nodeId + * \param [in] nodeId ID of the node * \return - A vector of size this->getSpaceDimension() * \throw if \a cellId not in [ 0, this->getNumberOfNodes() ) */ diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index c22552bae..839051cf1 100755 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -1710,7 +1710,6 @@ int MEDCouplingUMesh::AreCellsEqualPolicy7(const mcIdType *conn, const mcIdType * \param [in] startCellId specifies the cellId starting from which the equality computation will be carried out. By default it is 0, which it means that all cells in \a this will be scanned. * \param [out] commonCellsArr common cells ids (\ref numbering-indirect) * \param [out] commonCellsIArr common cells ids (\ref numbering-indirect) - * \return the correspondence array old to new in a newly allocated array. * */ void MEDCouplingUMesh::findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const @@ -1935,9 +1934,9 @@ MEDCouplingUMesh *MEDCouplingUMesh::mergeMyselfWithOnSameCoords(const MEDCouplin * By default coordinates are kept. This method is close to MEDCouplingUMesh::buildPartOfMySelf except that here input * cellIds is not given explicitly but by a range python like. * - * \param start - * \param end - * \param step + * \param start starting ID + * \param end end ID (excluded) + * \param step step size * \param keepCoords that specifies if you want or not to keep coords as this or zip it (see MEDCoupling::MEDCouplingUMesh::zipCoords). If true zipCoords is \b NOT called, if false, zipCoords is called. * \return a newly allocated * @@ -2232,7 +2231,7 @@ DataArrayIdType *MEDCouplingUMesh::findCellIdsOnBoundary() const * \throw if \b otherDimM1OnSameCoords is not part of constituent of \b this, or if coordinate pointer of \b this and \b otherDimM1OnSameCoords * are not same, or if this->getMeshDimension()-1!=otherDimM1OnSameCoords.getMeshDimension() * - * \param [in] otherDimM1OnSameCoords + * \param [in] otherDimM1OnSameCoords other mesh * \param [out] cellIdsRk0 a newly allocated array containing the cell ids of s0 (which are cell ids of \b this) in the above algorithm. * \param [out] cellIdsRk1 a newly allocated array containing the cell ids of s1 \b indexed into the \b cellIdsRk0 subset. To get the absolute ids of s1, simply invoke * cellIdsRk1->transformWithIndArr(cellIdsRk0->begin(),cellIdsRk0->end()); @@ -2638,7 +2637,7 @@ void MEDCouplingUMesh::duplicateNodesInConn(const mcIdType *nodeIdsToDuplicateBg * should be contained in[0;this->getNumberOfCells()). * * \param [in] old2NewBg is expected to be a dynamically allocated pointer of size at least equal to this->getNumberOfCells() - * \param check + * \param check whether to check content of old2NewBg */ void MEDCouplingUMesh::renumberCells(const mcIdType *old2NewBg, bool check) { @@ -3158,9 +3157,9 @@ bool MEDCouplingUMesh::isEmptyMesh(const std::vector& tinyInfo) const /*! * Second step of serialization process. * \param tinyInfo must be equal to the result given by getTinySerializationInformation method. - * \param a1 - * \param a2 - * \param littleStrings + * \param a1 DataArrayDouble + * \param a2 DataArrayDouble + * \param littleStrings string vector */ void MEDCouplingUMesh::resizeForUnserialization(const std::vector& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector& littleStrings) const { @@ -5811,7 +5810,7 @@ DataArrayIdType *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vect * The result is put in the array \a idsPerType. In the returned parameter \a code, foreach i \a code[3*i+2] refers (if different from -1) to a location into the \a idsPerType. * This method has 1 input \a profile and 3 outputs \a code \a idsInPflPerType and \a idsPerType. * - * \param [in] profile + * \param [in] profile list of IDs constituing the profile * \param [out] code is a vector of size 3*n where n is the number of different geometric type in \a this \b reduced to the profile \a profile. \a code has exactly the same semantic than in MEDCouplingUMesh::checkTypeConsistencyAndContig method. * \param [out] idsInPflPerType is a vector of size of different geometric type in the subpart defined by \a profile of \a this ( equal to \a code.size()/3). For each i, * \a idsInPflPerType[i] stores the tuple ids in \a profile that correspond to the geometric type code[3*i+0] @@ -6230,8 +6229,8 @@ DataArrayIdType *MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh() /*! * Convert the nodal connectivity of the mesh so that all the cells are of dynamic types (polygon or quadratic * polygon). This returns the corresponding new nodal connectivity in \ref numbering-indirect format. - * \param nodalConn - * \param nodalConnI + * \param nodalConn nodal connectivity + * \param nodalConnIndex nodal connectivity indices */ void MEDCouplingUMesh::convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndex) const { @@ -7189,8 +7188,7 @@ bool MEDCouplingUMesh::IsPyra5WellOriented(const mcIdType *begin, const mcIdType * * \param [in] eps is a relative precision that allows to establish if some 3D plane are coplanar or not. * \param [in] coords the coordinates with nb of components exactly equal to 3 - * \param [in] begin begin of the nodal connectivity (geometric type included) of a single polyhedron cell - * \param [in] end end of nodal connectivity of a single polyhedron cell (excluded) + * \param [in] index begin of the nodal connectivity (geometric type included) of a single polyhedron cell * \param [out] res the result is put at the end of the vector without any alteration of the data. */ void MEDCouplingUMesh::SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, mcIdType index, DataArrayIdType *res, MEDCouplingUMesh *faces, diff --git a/src/MEDCoupling/MEDCouplingUMesh_internal.cxx b/src/MEDCoupling/MEDCouplingUMesh_internal.cxx index c918cb650..9cc12330c 100755 --- a/src/MEDCoupling/MEDCouplingUMesh_internal.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh_internal.cxx @@ -1588,14 +1588,14 @@ void MEDCouplingUMesh::AppendExtrudedCell(const mcIdType *connBg, const mcIdType * This method allows to compute given the status of 3D curve cells and the descending connectivity 3DSurf->3DCurve to deduce the intersection of each 3D surf cells * with a plane. The result will be put in 'cut3DSuf' out parameter. * \param [in] cut3DCurve input parameter that gives for each 3DCurve cell if it owns fully to the plane or partially. - * \param [out] nodesOnPlane, returns all the nodes that are on the plane. + * \param [out] nodesOnPlane returns all the nodes that are on the plane. * \param [in] nodal3DSurf is the nodal connectivity of 3D surf mesh. * \param [in] nodalIndx3DSurf is the nodal connectivity index of 3D surf mesh. * \param [in] nodal3DCurve is the nodal connectivity of 3D curve mesh. - * \param [in] nodal3DIndxCurve is the nodal connectivity index of 3D curve mesh. + * \param [in] nodalIndx3DCurve is the nodal connectivity index of 3D curve mesh. * \param [in] desc is the descending connectivity 3DSurf->3DCurve * \param [in] descIndx is the descending connectivity index 3DSurf->3DCurve - * \param [out] cut3DSuf input/output param. + * \param [out] cut3DSurf input/output param. */ void MEDCouplingUMesh::AssemblyForSplitFrom3DCurve(const std::vector& cut3DCurve, std::vector& nodesOnPlane, const mcIdType *nodal3DSurf, const mcIdType *nodalIndx3DSurf, const mcIdType *nodal3DCurve, const mcIdType *nodalIndx3DCurve, diff --git a/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx b/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx index e72c9b5e2..3fce3e6f9 100644 --- a/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh_intersection.cxx @@ -1372,8 +1372,10 @@ void MEDCouplingUMesh::IntersectDescending2DMeshes(const MEDCouplingUMesh *m1, c * Private. Third step of the partitioning algorithm (Intersect2DMeshes): reconstruct full 2D cells from the * (newly created) nodes corresponding to the edge intersections. * Output params: - * @param[out] cr, crI connectivity of the resulting mesh - * @param[out] cNb1, cNb2 correspondence arrays giving for the merged mesh the initial cells IDs in m1 / m2 + * @param[out] cr connectivity of the resulting mesh + * @param[out] crI connectivity of the resulting mesh + * @param[out] cNb1 correspondence arrays giving for the merged mesh the initial cells IDs in m1 / m2 + * @param[out] cNb2 correspondence arrays giving for the merged mesh the initial cells IDs in m1 / m2 * TODO: describe input parameters */ void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const mcIdType *desc1, const mcIdType *descIndx1, @@ -1670,6 +1672,9 @@ mcIdType MEDCouplingUMesh::split2DCellsQuadratic(const DataArrayIdType *desc, co * The meshes should be in 2D space. In * addition, returns two arrays mapping cells of the result mesh to cells of the input * meshes. + * \b WARNING: the two meshes should be correctly oriented for this method to work properly. Methods changeSpaceDimension() and + * orientCorrectly2DCells() can be used for this. + * \b WARNING: the two meshes should be "clean" (no un-merged nodes, no non-conformal cells) * \param [in] m1 - the first input mesh which is a partitioned object. The mesh must be so that each point in the space covered by \a m1 * must be covered exactly by one entity, \b no \b more. If it is not the case, some tools are available to heal the mesh (conformize2D, mergeNodes) * \param [in] m2 - the second input mesh which is a partition tool. The mesh must be so that each point in the space covered by \a m2 @@ -1753,6 +1758,10 @@ MEDCouplingUMesh *MEDCouplingUMesh::Intersect2DMeshes(const MEDCouplingUMesh *m1 * and finally, in case of quadratic polygon the centers of edges new nodes. * The meshes should be in 2D space. In addition, returns two arrays mapping cells of the resulting mesh to cells of the input. * + * \b WARNING: the 2D mesh should be correctly oriented for this method to work properly. Methods changeSpaceDimension() and + * orientCorrectly2DCells() can be used for this. + * \b WARNING: the two meshes should be "clean" (no un-merged nodes, no non-conformal cells) + * * \param [in] mesh2D - the 2D mesh (spacedim=meshdim=2) to be intersected using \a mesh1D tool. The mesh must be so that each point in the space covered by \a mesh2D * must be covered exactly by one entity, \b no \b more. If it is not the case, some tools are available to heal the mesh (conformize2D, mergeNodes) * \param [in] mesh1D - the 1D mesh (spacedim=2 meshdim=1) the is the tool that will be used to intersect \a mesh2D. \a mesh1D must be ordered consecutively. If it is not the case diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index 138bfe200..ad26e8314 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -91,7 +91,7 @@ void MEDCouplingBasicsTest2::testGaussPointField1() CPPUNIT_ASSERT_EQUAL(ToIdType(0),f->getGaussLocalizationIdOfOneCell(0)); CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getGaussLocalizationIdOfOneCell(1)); CPPUNIT_ASSERT_EQUAL(ToIdType(1),f->getGaussLocalizationIdOfOneCell(2)); - CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);//<- cell 3 has no localization + CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);// <- cell 3 has no localization mcIdType ids4[1]={3}; std::vector _gsCoo2(_gsCoo1); std::vector _wg2(_wg1); @@ -102,11 +102,11 @@ void MEDCouplingBasicsTest2::testGaussPointField1() f->getCellIdsHavingGaussLocalization(0,tmpIds); CPPUNIT_ASSERT_EQUAL(2,(int)tmpIds.size()); CPPUNIT_ASSERT(std::equal(ids2,ids2+2,tmpIds.begin())); - CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);//<- it's always not ok because undelying array not with the good size. + CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);// <- it's always not ok because undelying array not with the good size. DataArrayDouble *array2=f->getArray()->subArray(0,10); f->setArray(array2); array2->decrRef(); - f->checkConsistencyLight();//<- here it is OK + f->checkConsistencyLight();// <- here it is OK MEDCouplingFieldDouble *f2=f->clone(true); CPPUNIT_ASSERT(f->isEqual(f2,1e-14,1e-14)); MEDCouplingGaussLocalization& gl1=f2->getGaussLocalization(0); diff --git a/src/MEDLoader/MEDFileField.txx b/src/MEDLoader/MEDFileField.txx index 0a10c74fe..d8fd37e57 100644 --- a/src/MEDLoader/MEDFileField.txx +++ b/src/MEDLoader/MEDFileField.txx @@ -611,7 +611,7 @@ namespace MEDCoupling * has not been constructed via file reading, an exception is thrown. * For more info, see \ref AdvMEDLoaderAPIFieldRW * \param [in] type - a spatial discretization of interest. - * \param [in] mName - a name of the supporting mesh. + * \param [in] mname - a name of the supporting mesh. * \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities. * \param [in] renumPol - specifies how to permute values of the result field according to * the optional numbers of cells and nodes, if any. The valid values are @@ -1179,7 +1179,6 @@ namespace MEDCoupling * field of interest lies on. If the field lies on all entities of the given * dimension, all ids in \a pfl are zero. The caller is to delete this array * using decrRef() as it is no more needed. - * \param [in] glob - the global data storing profiles and localization. * \return DataArrayDouble * - a new instance of DataArrayDouble holding values of the * field. The caller is to delete this array using decrRef() as it is no more needed. * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a mesh. diff --git a/src/MEDLoader/MEDFileField1TS.cxx b/src/MEDLoader/MEDFileField1TS.cxx index 085a6d6a8..aa655de53 100644 --- a/src/MEDLoader/MEDFileField1TS.cxx +++ b/src/MEDLoader/MEDFileField1TS.cxx @@ -2028,7 +2028,13 @@ int MEDFileAnyTypeField1TS::LocateField2(med_idt fid, int fieldIdCFormat, bool c /*! * This method throws an INTERP_KERNEL::Exception if \a fieldName field is not in file pointed by \a fid and with name \a fileName. * - * \param [out] + * \param [in] fid - MED file handler + * \param [in] fieldName - name of the field + * \param [out] posCFormat - index of the field in the file(?) + * \param [out] typcha - type of the field + * \param [out] infos - informations on the field + * \param [out] dtunitOut - time unit description + * \param [out] meshName - name of the mesh supporting the field * \return in case of success the number of time steps available for the field with name \a fieldName. */ int MEDFileAnyTypeField1TS::LocateField(med_idt fid, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector& infos, std::string& dtunitOut, std::string& meshName) diff --git a/src/MEDLoader/MEDFileFieldGlobs.cxx b/src/MEDLoader/MEDFileFieldGlobs.cxx index a5cbc3643..901102ce0 100644 --- a/src/MEDLoader/MEDFileFieldGlobs.cxx +++ b/src/MEDLoader/MEDFileFieldGlobs.cxx @@ -638,7 +638,7 @@ std::string MEDFileFieldGlobs::CreateNewNameNotIn(const std::string& prefix, con /*! * Creates a MEDFileFieldGlobsReal on a given file name. Nothing is read here. - * \param [in] fname - the file name. + * \param [in] fid - the MED file handler. */ MEDFileFieldGlobsReal::MEDFileFieldGlobsReal(med_idt fid):_globals(MEDFileFieldGlobs::New(fid)) { @@ -665,7 +665,7 @@ std::vector MEDFileFieldGlobsReal::getDirectChildrenWit /*! * Returns a string describing profiles and Gauss points held in \a this. - * \return std::string - the description string. + * \param[out] oss - the description string (in a std::ostream). */ void MEDFileFieldGlobsReal::simpleReprGlobs(std::ostream& oss) const { @@ -847,7 +847,7 @@ std::string MEDFileFieldGlobsReal::createNewNameOfLoc() const /*! * Sets the name of a MED file. - * \param [inout] fileName - the file name. + * \param [in,out] fileName - the file name. */ void MEDFileFieldGlobsReal::setFileName(const std::string& fileName) { @@ -1048,7 +1048,7 @@ int MEDFileFieldGlobsReal::getLocalizationId(const std::string& loc) const /*! * Returns an id of a profile by its name. - * \param [in] loc - the profile name of interest. + * \param [in] pfl - the profile name of interest. * \return int - the id of the profile. * \throw If there is no a profile named \a loc. */ @@ -1241,7 +1241,7 @@ std::string MEDFileFieldNameScope::getName() const /*! * Sets name of \a this field - * \param [in] name - the new field name. + * \param [in] fieldName - the new field name. */ void MEDFileFieldNameScope::setName(const std::string& fieldName) { diff --git a/src/MEDLoader/MEDFileFieldInternal.cxx b/src/MEDLoader/MEDFileFieldInternal.cxx index 399b0ea08..13688cddc 100644 --- a/src/MEDLoader/MEDFileFieldInternal.cxx +++ b/src/MEDLoader/MEDFileFieldInternal.cxx @@ -371,7 +371,8 @@ void MEDFileFieldPerMeshPerTypePerDisc::assignFieldNoProfile(mcIdType& start, mc /*! * Leaf method of field with profile assignment. This method is the most general one. No optimization is done here. - * \param [in] pflName input containing name of profile if any. 0 if no profile (except for GAUSS_PT where a no profile can hide a profile when split by loc_id). + * \param [in] isPflAlone whether there are several profiles or not + * \param [in] start starting ID * \param [in] multiTypePfl is the end user profile specified in high level API * \param [in] idsInPfl is the selection into the \a multiTypePfl whole profile that corresponds to the current geometric type. * \param [in] locIds is the profile needed to be created for MED file format. It can be null if all cells of current geometric type are fetched in \a multiTypePfl. diff --git a/src/MEDLoader/MEDFileJoint.cxx b/src/MEDLoader/MEDFileJoint.cxx index d0f1111b4..7565e0603 100644 --- a/src/MEDLoader/MEDFileJoint.cxx +++ b/src/MEDLoader/MEDFileJoint.cxx @@ -52,7 +52,7 @@ MEDFileJointCorrespondence::MEDFileJointCorrespondence(): /*! * Constructor. * \param [in] correspondence - correspondence. - * \param [in] is_nodal - is the correspondence of cells or nodes. + * \param [in] isNodal - is the correspondence of cells or nodes. * \param [in] loc_geo_type - the local geometry type of correspondence. * \param [in] rem_geo_type - the remote geometry type of correspondence. */ @@ -470,10 +470,9 @@ MEDFileJoint::MEDFileJoint() /*! * Returns a new MEDFileJoint holding the mesh data that has been read from a given MED * file. The Joint to load is specified by mesh name and a Joint iteration. - * \param [in] fileName - the name of MED file to read. + * \param [in] fid - the handler ID of MED file to read. * \param [in] mName - the name of the mesh to read. * \param [in] curJoint - the iteration number of current joint. - * \return MEDFileJoint * - a new instance of MEDFileJoint. * \throw If the file is not readable. * \throw If there is no mesh with given attributes in the file. */ diff --git a/src/MEDLoader/MEDFileMesh.cxx b/src/MEDLoader/MEDFileMesh.cxx index 0d0a16c6f..193e068b9 100644 --- a/src/MEDLoader/MEDFileMesh.cxx +++ b/src/MEDLoader/MEDFileMesh.cxx @@ -2091,14 +2091,14 @@ DataArrayIdType *MEDFileMesh::getNodeGroupsArr(const std::vector& g } /*! - * Returns ids of nodes contained in a given group. - * \param [in] grp - the name of the group of interest. + * Returns ids of nodes contained in a given family. + * \param [in] fam - the name of the family of interest. * \param [in] renum - if \c true, the optional numbers of nodes, if available, are * returned instead of ids. * \return DataArrayIdType * - a new instance of DataArrayIdType holding either ids or - * numbers, if available and required, of nodes of the group. The caller + * numbers, if available and required, of nodes of the family. The caller * is to delete this array using decrRef() as it is no more needed. - * \throw If the name of a nonexistent group is specified. + * \throw If the name of a nonexistent family is specified. * \throw If the family field is missing for nodes. */ DataArrayIdType *MEDFileMesh::getNodeFamilyArr(const std::string& fam, bool renum) const @@ -2454,7 +2454,7 @@ MEDFileUMesh *MEDFileUMesh::New() * \param [in] fileName - the name of the file. * \param [in] mName - the name of the mesh to be read. * \param [in] types - the list of the geo types of which some part will be taken. A geometric type in \a types must appear only once at most. - * \param [in] slicPerType - an array of size 3 times larger than \a types that specifies for each type in \a types (in the same order) resp the start, the stop and the step. + * \param [in] slicPerTyp - an array of size 3 times larger than \a types that specifies for each type in \a types (in the same order) resp the start, the stop and the step. * \param [in] dt - the iteration, that is to say the first element of the pair that locates the asked time step. * \param [in] it - the order, that is to say the second element of the pair that locates the asked time step. * \param [in] mrs - the request for what to be loaded. @@ -2487,7 +2487,7 @@ MEDFileUMesh *MEDFileUMesh::LoadPartOf(med_idt fid, const std::string& mName, co * \param [in] mName - Name of the mesh inside file pointed be \a fileName nodes to be read of. * \param [in] dt - Time iteration inside file pointed be \a fileName nodes to be read of. * \param [in] it - Time order inside file pointed be \a fileName nodes to be read of. - * \param [in] infosOnCompo - Components info of nodes to be read of. The size of string vector should be equal to space dimension of mesh to be read. + * \param [in] infosOnComp - Components info of nodes to be read of. The size of string vector should be equal to space dimension of mesh to be read. * \param [in] startNodeId - Start Node Id (included) of chunk of data to be read * \param [in] stopNodeId - Start Node Id (included) of chunk of data to be read * \param [out] coords - output coordinates of requested chunk (DataArrayDouble) @@ -3708,7 +3708,7 @@ DataArrayIdType *MEDFileUMesh::getFamiliesArr(int meshDimRelToMaxExt, const std: * valid**. This is a feature, because MEDLoader does not create cells that do not exist! * To build a valid MEDCouplingUMesh from the returned one in this case, * call MEDCouplingUMesh::Build0DMeshFromCoords(). - * \param [in] meshDimRelToMax - the relative dimension of interest. + * \param [in] meshDimRelToMaxExt - the relative dimension of interest. * \param [in] renum - if \c true, the returned mesh is permuted according to the * optional numbers of mesh entities. * \return MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to diff --git a/src/MEDLoader/MEDFileParameter.cxx b/src/MEDLoader/MEDFileParameter.cxx index 3547c43db..70d94ab36 100644 --- a/src/MEDLoader/MEDFileParameter.cxx +++ b/src/MEDLoader/MEDFileParameter.cxx @@ -689,7 +689,7 @@ std::vector< std::pair > MEDFileParameterMultiTS::getIterations() const } /*! - * \param [out] ret1 + * \param [out] ret1 - list of available timesteps */ std::vector< std::pair > MEDFileParameterMultiTS::getTimeSteps(std::vector& ret1) const { diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 30448af45..4ad0b49a3 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -3567,7 +3567,6 @@ void IntermediateMED::makeFieldNewName(std::set< std::string >& usedNames, //================================================================================ /*! * \brief Split sub-components with different nb of gauss points into several sub-components - * \param [in,out] fld - a field to split if necessary */ //================================================================================ diff --git a/src/MEDLoader/Test/MEDLoaderTest.cxx b/src/MEDLoader/Test/MEDLoaderTest.cxx index 39129611f..bf167d01c 100644 --- a/src/MEDLoader/Test/MEDLoaderTest.cxx +++ b/src/MEDLoader/Test/MEDLoaderTest.cxx @@ -358,7 +358,7 @@ void MEDLoaderTest::testFieldProfilRW1() WriteUMesh(fileName,mesh1,true); const mcIdType part1[5]={1,2,4,13,15}; MEDCouplingUMesh *mesh2=(MEDCouplingUMesh *)mesh1->buildPartOfMySelf(part1,part1+5,true); - mesh2->setName(mesh1->getName().c_str());//<- important for the test + mesh2->setName(mesh1->getName().c_str());// <- important for the test // mcIdType nbOfCells=mesh2->getNumberOfCells(); CPPUNIT_ASSERT_EQUAL(ToIdType(5),nbOfCells); @@ -375,7 +375,7 @@ void MEDLoaderTest::testFieldProfilRW1() f1->setTime(3.14,2,7); f1->checkConsistencyLight(); // - WriteField(fileName,f1,false);//<- false important for the test + WriteField(fileName,f1,false);// <- false important for the test // MEDCouplingFieldDouble *f2=dynamic_cast(ReadFieldCell(fileName,f1->getMesh()->getName().c_str(),0,f1->getName().c_str(),2,7)); std::vector types=GetTypesOfField(fileName,f1->getMesh()->getName().c_str(),f1->getName().c_str()); @@ -416,7 +416,7 @@ void MEDLoaderTest::testFieldNodeProfilRW1() const mcIdType arr2[2]={1,4};//node ids are 2,4,5,3,6,7 MEDCouplingFieldDouble *f2=f1->buildSubPart(arr2,arr2+2); (const_cast(f2->getMesh()))->setName(f1->getMesh()->getName().c_str()); - WriteField(fileName,f2,false);//<- false important for the test + WriteField(fileName,f2,false);// <- false important for the test // MEDCouplingFieldDouble *f3=dynamic_cast(ReadFieldNode(fileName,f2->getMesh()->getName().c_str(),0,f2->getName().c_str(),2,7)); f3->checkConsistencyLight(); @@ -426,7 +426,7 @@ void MEDLoaderTest::testFieldNodeProfilRW1() const mcIdType arr3[6]={1,3,0,5,2,4}; f2->renumberNodes(arr3); WriteUMesh(fileName2,m,true); - WriteField(fileName2,f2,false);//<- false important for the test + WriteField(fileName2,f2,false);// <- false important for the test f3=dynamic_cast(ReadFieldNode(fileName2,f2->getMesh()->getName().c_str(),0,f2->getName().c_str(),2,7)); f3->checkConsistencyLight(); CPPUNIT_ASSERT(f3->isEqual(f2,1e-12,1e-12)); @@ -463,7 +463,7 @@ void MEDLoaderTest::testFieldNodeProfilRW2() const mcIdType renumArr[12]={3,7,2,1,5,11,10,0,9,6,8,4}; f1->renumberNodes(renumArr); f1->checkConsistencyLight(); - WriteField(fileName,f1,false);//<- false important for the test + WriteField(fileName,f1,false);// <- false important for the test MEDCouplingFieldDouble *f2=dynamic_cast(ReadFieldNode(fileName,f1->getMesh()->getName().c_str(),0,f1->getName().c_str(),2,7)); CPPUNIT_ASSERT(f2->isEqual(f1,1e-12,1e-12)); // diff --git a/src/ParaMEDMEM/CommInterface.cxx b/src/ParaMEDMEM/CommInterface.cxx index b61c05bd7..aa17eba9b 100644 --- a/src/ParaMEDMEM/CommInterface.cxx +++ b/src/ParaMEDMEM/CommInterface.cxx @@ -27,41 +27,6 @@ namespace MEDCoupling MPI_Datatype ParaTraits::MPIDataType = MPI_LONG; - /*! \anchor CommInterface-det - \class CommInterface - - The class \a CommInterface is the gateway to the MPI library. - It is a wrapper around all MPI calls, thus trying to abstract the rest of the code from using the direct MPI API - (but this is not strictly respected overall in practice ...). It is used in all - the \ref parallel "DEC related classes". - - It is typically instantiated after the MPI_Init() call in a program and is afterwards passed as a - parameter to the constructors of various \ref parallel "parallel objects" so that they access the - MPI library via this common interface. - - As an example, the following code excerpt initializes a processor group made of the zero processor. - - \verbatim - #include "CommInterface.hxx" - #include "ProcessorGroup.hxx" - - int main(int argc, char** argv) - { - //initialization - MPI_Init(&argc, &argv); - MEDCoupling::CommInterface comm_interface; - - //setting up a processor group with proc 0 - set procs; - procs.insert(0); - MEDCoupling::ProcessorGroup group(procs, comm_interface); - - //cleanup - MPI_Finalize(); - } - \endverbatim - */ - void CommInterface::gatherArrays(MPI_Comm comm, int root, const DataArrayIdType *array, std::vector< MCAuto >& arraysOut) const { this->gatherArraysT2(comm,root,array,arraysOut); diff --git a/src/ParaMEDMEM/CommInterface.hxx b/src/ParaMEDMEM/CommInterface.hxx index 5ba1e95a2..6671c9703 100644 --- a/src/ParaMEDMEM/CommInterface.hxx +++ b/src/ParaMEDMEM/CommInterface.hxx @@ -53,6 +53,40 @@ namespace MEDCoupling static MPI_Datatype MPIDataType; }; + /*! \anchor CommInterface-det + \class CommInterface + + The class \a CommInterface is the gateway to the MPI library. + It is a wrapper around all MPI calls, thus trying to abstract the rest of the code from using the direct MPI API + (but this is not strictly respected overall in practice ...). It is used in all + the \ref parallel "DEC related classes". + + It is typically instantiated after the MPI_Init() call in a program and is afterwards passed as a + parameter to the constructors of various \ref parallel "parallel objects" so that they access the + MPI library via this common interface. + + As an example, the following code excerpt initializes a processor group made of the zero processor. + + \verbatim + #include "CommInterface.hxx" + #include "ProcessorGroup.hxx" + + int main(int argc, char** argv) + { + //initialization + MPI_Init(&argc, &argv); + MEDCoupling::CommInterface comm_interface; + + //setting up a processor group with proc 0 + set procs; + procs.insert(0); + MEDCoupling::ProcessorGroup group(procs, comm_interface); + + //cleanup + MPI_Finalize(); + } + \endverbatim + */ class CommInterface { public: diff --git a/src/ParaMEDMEM/DisjointDEC.cxx b/src/ParaMEDMEM/DisjointDEC.cxx index 98a661bf2..178f296f6 100644 --- a/src/ParaMEDMEM/DisjointDEC.cxx +++ b/src/ParaMEDMEM/DisjointDEC.cxx @@ -34,36 +34,6 @@ namespace MEDCoupling { - - /*! - * \anchor DisjointDEC-det - * \class DisjointDEC - * - * \section DisjointDEC-over Overview - * - * Abstract interface class representing a link between two - * processor groups for exchanging mesh or field data. The two processor groups must - * have a void intersection (\ref MEDCoupling::OverlapDEC "OverlapDEC" is to be considered otherwise). - * The %DEC is initialized by attaching a field on the receiving or on the - * sending side. - * - * The data is sent or received through calls to the (abstract) methods recvData() and sendData(). - * - * One can attach either a \c MEDCoupling::ParaFIELD, or a - * \c ICoCo::Field, or directly a \c MEDCoupling::MEDCouplingFieldDouble instance. - * See the various signatures of the method DisjointDEC::attachLocalField() - * - * The derivations of this class should be considered for practical instantiation: - * - \ref InterpKernelDEC-det "InterpKernelDEC" - * - \ref ExplicitCoincidentDEC-det "ExplicitCoincidentDEC" - * - \ref StructuredCoincidentDEC-det "StructuredCoincidentDEC" - * - * \section DisjointDEC-options DisjointDEC options - * The options supported by %DisjointDEC objects are the same that the ones supported for all - * DECs in general and are all inherited from the class \ref MEDCoupling::DECOptions "DECOptions" - * - */ - DisjointDEC::DisjointDEC(ProcessorGroup& source_group, ProcessorGroup& target_group): _local_field(0), _source_group(&source_group), diff --git a/src/ParaMEDMEM/DisjointDEC.hxx b/src/ParaMEDMEM/DisjointDEC.hxx index 211e25a74..289d618dd 100644 --- a/src/ParaMEDMEM/DisjointDEC.hxx +++ b/src/ParaMEDMEM/DisjointDEC.hxx @@ -36,7 +36,36 @@ namespace MEDCoupling { class ProcessorGroup; class ParaFIELD; - + + /*! + * \anchor DisjointDEC-det + * \class DisjointDEC + * + * \section DisjointDEC-over Overview + * + * Abstract interface class representing a link between two + * processor groups for exchanging mesh or field data. The two processor groups must + * have a void intersection (\ref MEDCoupling::OverlapDEC "OverlapDEC" is to be considered otherwise). + * The %DEC is initialized by attaching a field on the receiving or on the + * sending side. + * + * The data is sent or received through calls to the (abstract) methods recvData() and sendData(). + * + * One can attach either a \c MEDCoupling::ParaFIELD, or a + * \c ICoCo::Field, or directly a \c MEDCoupling::MEDCouplingFieldDouble instance. + * See the various signatures of the method DisjointDEC::attachLocalField() + * + * The derivations of this class should be considered for practical instantiation: + * - \ref InterpKernelDEC-det "InterpKernelDEC" + * - \ref ExplicitCoincidentDEC-det "ExplicitCoincidentDEC" + * - \ref StructuredCoincidentDEC-det "StructuredCoincidentDEC" + * + * \section DisjointDEC-options DisjointDEC options + * The options supported by %DisjointDEC objects are the same that the ones supported for all + * DECs in general and are all inherited from the class \ref MEDCoupling::DECOptions "DECOptions" + * + */ + class DisjointDEC : public DEC { public: diff --git a/src/ParaMEDMEM/InterpKernelDEC.cxx b/src/ParaMEDMEM/InterpKernelDEC.cxx index d8a8751f7..afdb821f8 100644 --- a/src/ParaMEDMEM/InterpKernelDEC.cxx +++ b/src/ParaMEDMEM/InterpKernelDEC.cxx @@ -31,105 +31,7 @@ #include "ElementLocator.hxx" namespace MEDCoupling -{ - - /*! - \anchor InterpKernelDEC-det - \class InterpKernelDEC - - \section InterpKernelDEC-over Overview - - The InterpKernelDEC enables the \ref InterpKerRemapGlobal "remapping" (or interpolation) of fields between - two parallel codes. - - The projection - methodology is based on the algorithms of %INTERP_KERNEL, that is to say, they work in a similar fashion than - what the \ref remapper "sequential remapper" does. The following \ref discretization "projection methods" - are supported: P0->P0 (the most common case), P1->P0, P0->P1. - - The computation is possible for 3D meshes, 2D meshes, and 3D-surface - meshes. Dimensions must be identical for code A and code B (for instance, though it could be - desirable, it is not yet possible to couple 3D surfaces with 2D surfaces). - - The name "InterpKernelDEC" comes from the fact that this class uses exactly the same algorithms - as the sequential remapper. Both this class and the sequential - \ref MEDCoupling::MEDCouplingRemapper "MEDCouplingRemapper" are built on top of the %INTERP_KERNEL - algorithms (notably the computation of the intersection volumes). - - Among the important properties inherited from the parent abstract class \ref DisjointDEC-det "DisjointDEC", - the two \ref MPIProcessorGroup-det "processor groups" (source and target) must have a void intersection. - - \image html NonCoincident_small.png "Transfer of a field supported by a quadrangular mesh to a triangular mesh". - - \image latex NonCoincident_small.eps "Transfer of a field supported by a quadrangular mesh to a triangular mesh" - - In the figure above we see the transfer of a field based on a quadrangular mesh to a new field supported by - a triangular mesh. In a P0-P0 interpolation, to obtain the value on a triangle, the values on the - quadrangles are weighted by their intersection area and summed. - - A typical use of InterpKernelDEC encompasses two distinct phases : - - A setup phase during which the intersection volumes are computed and the communication structures are - setup. This corresponds to calling the InterpKernelDEC::synchronize() method. - - A running phase during which the projections are actually performed. This corresponds to the calls to - sendData() and recvData() which actually trigger the data exchange. The data exchange are synchronous - in the current version of the library so that recvData() and sendData() calls must be synchronized - on code A and code B processor groups. - - The following code excerpt illustrates a typical use of the InterpKernelDEC class. - - \code - ... - InterpKernelDEC dec(groupA, groupB); - dec.attachLocalField(field); - dec.synchronize(); - if (groupA.containsMyRank()) - dec.recvData(); - else if (groupB.containsMyRank()) - dec.sendData(); - ... - \endcode - A \ref InterpKerRemapGlobal "remapping" of the field from the source mesh to the target mesh is performed by - the function synchronise(), which computes the interpolation matrix. - - Computing the field on the receiving side can be expressed in terms of a matrix-vector product : - \f$ \phi_t=W.\phi_s\f$, with \f$ \phi_t \f$ the field on the target side and \f$ \phi_s \f$ the field - on the source side. - When remapping a 3D surface to another 3D surface, a projection phase is necessary to match elements - from both sides. Care must be taken when defining this projection to obtain a - \ref InterpKerRemapGlobal "conservative remapping". - - In the P0-P0 case, this matrix is a plain rectangular matrix with coefficients equal to the - intersection areas between triangle and quadrangles. For instance, in the above figure, the matrix - is : - - \f[ - \begin{tabular}{|cccc|} - 0.72 & 0 & 0.2 & 0 \\ - 0.46 & 0 & 0.51 & 0.03\\ - 0.42 & 0.53 & 0 & 0.05\\ - 0 & 0 & 0.92 & 0.05 \\ - \end{tabular} - \f] - - \section InterpKernelDEC-options Options - On top of the usual \ref MEDCoupling::DECOptions "DEC options", the options supported by %InterpKernelDEC objects are - related to the underlying \ref InterpKerIntersectors "intersector class". - All the options available in the intersector objects are - available for the %InterpKernelDEC object. The various options available for intersectors can - be reviewed in \ref InterpKerIntersectors. - - For instance : - \verbatim - InterpKernelDEC dec(source_group, target_group); - dec.attachLocalField(field); - dec.setDoRotate(false); - dec.setPrecision(1e-12); - dec.synchronize(); - \endverbatim - - \warning{ Options must be set before calling the synchronize method. } - */ - +{ InterpKernelDEC::InterpKernelDEC(): DisjointDEC(), _nb_distant_points(0), _distant_coords(0), diff --git a/src/ParaMEDMEM/InterpKernelDEC.hxx b/src/ParaMEDMEM/InterpKernelDEC.hxx index 8c50310a5..4e6976198 100644 --- a/src/ParaMEDMEM/InterpKernelDEC.hxx +++ b/src/ParaMEDMEM/InterpKernelDEC.hxx @@ -28,6 +28,103 @@ namespace MEDCoupling { class InterpolationMatrix; + /*! + \anchor InterpKernelDEC-det + \class InterpKernelDEC + + \section InterpKernelDEC-over Overview + + The InterpKernelDEC enables the \ref InterpKerRemapGlobal "remapping" (or interpolation) of fields between + two parallel codes. + + The projection + methodology is based on the algorithms of %INTERP_KERNEL, that is to say, they work in a similar fashion than + what the \ref remapper "sequential remapper" does. The following \ref discretization "projection methods" + are supported: P0->P0 (the most common case), P1->P0, P0->P1. + + The computation is possible for 3D meshes, 2D meshes, and 3D-surface + meshes. Dimensions must be identical for code A and code B (for instance, though it could be + desirable, it is not yet possible to couple 3D surfaces with 2D surfaces). + + The name "InterpKernelDEC" comes from the fact that this class uses exactly the same algorithms + as the sequential remapper. Both this class and the sequential + \ref MEDCoupling::MEDCouplingRemapper "MEDCouplingRemapper" are built on top of the %INTERP_KERNEL + algorithms (notably the computation of the intersection volumes). + + Among the important properties inherited from the parent abstract class \ref DisjointDEC-det "DisjointDEC", + the two \ref MPIProcessorGroup-det "processor groups" (source and target) must have a void intersection. + + \image html NonCoincident_small.png "Transfer of a field supported by a quadrangular mesh to a triangular mesh". + + \image latex NonCoincident_small.eps "Transfer of a field supported by a quadrangular mesh to a triangular mesh" + + In the figure above we see the transfer of a field based on a quadrangular mesh to a new field supported by + a triangular mesh. In a P0-P0 interpolation, to obtain the value on a triangle, the values on the + quadrangles are weighted by their intersection area and summed. + + A typical use of InterpKernelDEC encompasses two distinct phases : + - A setup phase during which the intersection volumes are computed and the communication structures are + setup. This corresponds to calling the InterpKernelDEC::synchronize() method. + - A running phase during which the projections are actually performed. This corresponds to the calls to + sendData() and recvData() which actually trigger the data exchange. The data exchange are synchronous + in the current version of the library so that recvData() and sendData() calls must be synchronized + on code A and code B processor groups. + + The following code excerpt illustrates a typical use of the InterpKernelDEC class. + + \code + ... + InterpKernelDEC dec(groupA, groupB); + dec.attachLocalField(field); + dec.synchronize(); + if (groupA.containsMyRank()) + dec.recvData(); + else if (groupB.containsMyRank()) + dec.sendData(); + ... + \endcode + A \ref InterpKerRemapGlobal "remapping" of the field from the source mesh to the target mesh is performed by + the function synchronise(), which computes the interpolation matrix. + + Computing the field on the receiving side can be expressed in terms of a matrix-vector product : + \f$ \phi_t=W.\phi_s\f$, with \f$ \phi_t \f$ the field on the target side and \f$ \phi_s \f$ the field + on the source side. + When remapping a 3D surface to another 3D surface, a projection phase is necessary to match elements + from both sides. Care must be taken when defining this projection to obtain a + \ref InterpKerRemapGlobal "conservative remapping". + + In the P0-P0 case, this matrix is a plain rectangular matrix with coefficients equal to the + intersection areas between triangle and quadrangles. For instance, in the above figure, the matrix + is : + + \f[ + \begin{tabular}{|cccc|} + 0.72 & 0 & 0.2 & 0 \\ + 0.46 & 0 & 0.51 & 0.03\\ + 0.42 & 0.53 & 0 & 0.05\\ + 0 & 0 & 0.92 & 0.05 \\ + \end{tabular} + \f] + + \section InterpKernelDEC-options Options + On top of the usual \ref MEDCoupling::DECOptions "DEC options", the options supported by %InterpKernelDEC objects are + related to the underlying \ref InterpKerIntersectors "intersector class". + All the options available in the intersector objects are + available for the %InterpKernelDEC object. The various options available for intersectors can + be reviewed in \ref InterpKerIntersectors. + + For instance : + \verbatim + InterpKernelDEC dec(source_group, target_group); + dec.attachLocalField(field); + dec.setDoRotate(false); + dec.setPrecision(1e-12); + dec.synchronize(); + \endverbatim + + \warning{ Options must be set before calling the synchronize method. } + */ + class InterpKernelDEC : public DisjointDEC, public INTERP_KERNEL::InterpolationOptions { public: diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index cf7d7a441..bf4b8468f 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -48,10 +48,11 @@ namespace MEDCoupling Creates an empty matrix structure linking two distributed supports. The method must be called by all processors belonging to source and target groups. - \param source_support local support + \param source_field local source field \param source_group processor group containing the local processors \param target_group processor group containing the distant processors - \param method interpolation method + \param dec_options DEC options (including projection method P0, P1) + \param interp_options interpolation options */ InterpolationMatrix::InterpolationMatrix(const MEDCoupling::ParaFIELD *source_field, const ProcessorGroup& source_group, @@ -639,7 +640,6 @@ namespace MEDCoupling * This method introduce global ids aspects in computed 'rowsPartialSumD'. * As precondition rowsPartialSumD.size()==policyPartial.size()==globalIdsPartial.size(). Foreach i in [0;rowsPartialSumD.size() ) rowsPartialSumD[i].size()==globalIdsPartial[i].size() * @param rowsPartialSumD : in parameter, Partial row sum computed for each lazy procs connected with. - * @param rowsPartialSumI : in parameter, Corresponding local ids for each lazy procs connected with. * @param globalIdsPartial : in parameter, the global numbering, of elements connected with. * @param globalIdsLazySideInteraction : out parameter, constituted from all global ids of lazy procs connected with. * @para sumCorresponding : out parameter, relative to 'globalIdsLazySideInteraction' diff --git a/src/ParaMEDMEM/MPIAccessDEC.cxx b/src/ParaMEDMEM/MPIAccessDEC.cxx index 8ae5ca68b..21c128363 100644 --- a/src/ParaMEDMEM/MPIAccessDEC.cxx +++ b/src/ParaMEDMEM/MPIAccessDEC.cxx @@ -34,11 +34,7 @@ namespace MEDCoupling \param source_group working side ProcessorGroup \param target_group lazy side ProcessorGroup \param Asynchronous Communication mode (default asynchronous) - \param nStepBefore Number of Time step needed for the interpolation before current time - \param nStepAfter Number of Time step needed for the interpolation after current time - */ - MPIAccessDEC::MPIAccessDEC( const ProcessorGroup& source_group, const ProcessorGroup& target_group, bool Asynchronous ) diff --git a/src/ParaMEDMEM/OverlapDEC.cxx b/src/ParaMEDMEM/OverlapDEC.cxx index 34261ee76..ae6a4f0cc 100644 --- a/src/ParaMEDMEM/OverlapDEC.cxx +++ b/src/ParaMEDMEM/OverlapDEC.cxx @@ -29,186 +29,6 @@ namespace MEDCoupling { -/*! - \anchor OverlapDEC-det - \class OverlapDEC - - \section OverlapDEC-over Overview - - The \c OverlapDEC enables the \ref InterpKerRemapGlobal "conservative remapping" of fields between - two parallel codes. This remapping is based on the computation of intersection volumes on - a \b single \b processor \b group. On this processor group are defined two field-templates called A - and B. The computation is possible for 3D meshes, 2D meshes, 3D-surface meshes, 1D meshes and - 2D-curve meshes. Dimensions must be similar for the distribution templates A and B. - - The main difference with \ref InterpKernelDEC-det "InterpKernelDEC" is that this - \ref para-dec "DEC" works with a *single* processor group, in which processors will share the work. - Consequently each processor manages two \ref MEDCouplingFieldTemplatesPage "field templates" (A and B) - called source and target. - Furthermore all processors in the processor group cooperate in the global interpolation matrix - computation. In this respect \c InterpKernelDEC is a specialization of \c OverlapDEC. - - \section ParaMEDMEMOverlapDECAlgorithmDescription Algorithm description - - Let's consider the following use case that is ran in ParaMEDMEMTest_OverlapDEC.cxx to describes - the different steps of the computation. The processor group contains 3 processors. - \anchor ParaMEDMEMOverlapDECImgTest1 - \image html OverlapDEC1.png "Example split of the source and target mesh among the 3 procs" - - \subsection ParaMEDMEMOverlapDECAlgoStep1 Step 1 : Bounding box exchange and global interaction between procs computation. - - In order to reduce as much as possible the amount of communications between distant processors, - every processor computes a bounding box for A and B. Then a AllToAll communication is performed - so that - every processor can compute the \b global interactions between processor. - This computation leads every processor to compute the same global TODO list expressed as a list - of pair. A pair ( x, y ) means that proc \b x fieldtemplate A can interact with fieltemplate B of - proc \b y because the two bounding boxes interact. - In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" this computation leads to the following - a \b global TODO list : - - \b (0,0),(0,1),(1,0),(1,2),(2,0),(2,1),(2,2) - - Here the pair (0,2) does not appear because the bounding box of fieldtemplateA of proc#2 does - not intersect that of fieldtemplate B on proc#0. - - Stage performed by MEDCoupling::OverlapElementLocator::computeBoundingBoxes. - - \subsection ParaMEDMEMOverlapDECAlgoStep2 Step 2 : Computation of local TODO list - - Starting from the global interaction previously computed in \ref ParaMEDMEMOverlapDECAlgoStep1 - "Step 1", each proc computes the TODO list per proc. - The following rules is chosen : a pair (x,y) can be treated by either proc \#x or proc \#y, - in order to reduce the amount of data transfers among - processors. The algorithm chosen for load balancing is the following : Each processor has - an empty \b local TODO list at the beginning. Then for each pair (k,m) in - \b global TODO list, if proc\#k has less temporary local list than proc\#m pair, (k,m) is added - to temporary local TODO list of proc\#k. - If proc\#m has less temporary local TODO list than proc\#k pair, (k,m) is added to temporary - local TODO list of proc\#m. - If proc\#k and proc\#m have the same amount of temporary local TODO list pair, (k,m) is added to - temporary local TODO list of proc\#k. - - In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" this computation leads to the following - local TODO list : - - - proc\#0 : (0,0) - - proc\#1 : (0,1),(1,0) - - proc\#2 : (1,2),(2,0),(2,1),(2,2) - - The algorithm described here is not perfect for this use case, we hope to enhance it soon. - - At this stage each proc knows precisely its \b local TODO list (with regard to interpolation). - The \b local TODO list of other procs than local - is kept for future computations. - - \subsection ParaMEDMEMOverlapDECAlgoStep3 Step 3 : Matrix echange between procs - - Knowing the \b local TODO list, the aim now is to exchange field-templates between procs. - Each proc computes knowing TODO list per - proc computed in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step 2" the exchange TODO list : - - In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" the exchange TODO list gives the - following results : - - Sending TODO list per proc : - - - proc \#0 : Send fieldtemplate A to Proc\#1, Send fieldtemplate B to Proc\#1, Send fieldtemplate - B to Proc\#2 - - Proc \#1 : Send fieldtemplate A to Proc\#2, Send fieldtemplate B to Proc\#2 - - Proc \#2 : No send. - - Receiving TODO list per proc : - - - proc \#0 : No receiving - - proc \#1 : receiving fieldtemplate A from Proc\#0, receiving fieldtemplate B from Proc\#0 - - proc \#2 : receiving fieldtemplate B from Proc\#0, receiving fieldtemplate A from Proc\#1, - receiving fieldtemplate B from Proc\#1 - - To avoid as much as possible large volumes of transfers between procs, only relevant parts of - meshes are sent. In order for proc\#k to send fieldtemplate A to fieldtemplate B - of proc \#m., proc\#k computes the part of mesh A contained in the boundingbox B of proc\#m. It - implies that the corresponding cellIds or nodeIds of the - corresponding part are sent to proc \#m too. - - Let's consider the couple (k,m) in the TODO list. This couple is treated by either k or m as - seen in \ref ParaMEDMEMOverlapDECAlgoStep2 "here in Step2". - - As will be dealt in Step 6, for final matrix-vector computations, the resulting matrix of the - couple (k,m) wherever it is computed (proc \#k or proc \#m) - will be stored in \b proc\#m. - - - If proc \#k is in charge (performs the matrix computation) for this couple (k,m), target ids - (cells or nodes) of the mesh in proc \#m are renumbered, because proc \#m has seelected a sub mesh - of the target mesh to avoid large amounts of data to transfer. In this case as proc \#m is ultimately - in charge of the matrix, proc \#k must keep preciously the - source ids needed to be sent to proc\#m. No problem will appear for matrix assembling in proc m - for source ids because no restriction was done. - Concerning source ids to be sent for the matrix-vector computation, proc k will know precisely - which source ids field values to send to proc \#m. - This is embodied by OverlapMapping::keepTracksOfTargetIds in proc m. - - - If proc \#m is in charge (performs matrix computation) for this couple (k,m), source ids (cells - or nodes) of the mesh in proc \#k are renumbered, because proc \#k has selected a sub mesh of the - source mesh to avoid large amounts of data to transfer. In this case as proc \#k is ultimately - in charge of the matrix, proc \#m receives the source ids - from remote proc \#k, and thus the matrix is directly correct, no need for renumbering as - in \ref ParaMEDMEMOverlapDECAlgoStep5 "Step 5". However proc \#k must - keep track of the ids sent to proc \#m for the matrix-vector computation. - This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k. - - This step is performed in MEDCoupling::OverlapElementLocator::exchangeMeshes method. - - \subsection ParaMEDMEMOverlapDECAlgoStep4 Step 4 : Computation of the interpolation matrix - - After mesh exchange in \ref ParaMEDMEMOverlapDECAlgoStep3 "Step3" each processor has all the - required information to treat its \b local TODO list computed in - \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". This step is potentially CPU costly, which is why - the \b local TODO list per proc is expected to - be as well balanced as possible. - - The interpolation is performed as the \ref MEDCoupling::MEDCouplingRemapper "remapper" does. - - This operation is performed by OverlapInterpolationMatrix::addContribution method. - - \subsection ParaMEDMEMOverlapDECAlgoStep5 Step 5 : Global matrix construction. - - After having performed the TODO list at the end of \ref ParaMEDMEMOverlapDECAlgoStep4 "Step4" - we need to assemble the final matrix. - - The final aim is to have a distributed matrix \f$ M_k \f$ on each proc\#k. In order to reduce - data exchange during the matrix product process, - \f$ M_k \f$ is built using sizeof(Proc group) \c std::vector< \c std::map \c >. - - For a proc\#k, it is necessary to fetch info of all matrices built in - \ref ParaMEDMEMOverlapDECAlgoStep4 "Step4" where the first element in pair (i,j) - is equal to k. - - After this step, the matrix repartition is the following after a call to - MEDCoupling::OverlapMapping::prepare : - - - proc\#0 : (0,0),(1,0),(2,0) - - proc\#1 : (0,1),(2,1) - - proc\#2 : (1,2),(2,2) - - Tuple (2,1) computed on proc 2 is stored in proc 1 after execution of the function - "prepare". This is an example of item 0 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". - Tuple (0,1) computed on proc 1 is stored in proc 1 too. This is an example of item 1 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". - - In the end MEDCoupling::OverlapMapping::_proc_ids_to_send_vector_st will contain : - - - Proc\#0 : 0,1 - - Proc\#1 : 0,2 - - Proc\#2 : 0,1,2 - - In the end MEDCoupling::OverlapMapping::_proc_ids_to_recv_vector_st will contain : - - - Proc\#0 : 0,1,2 - - Proc\#1 : 0,2 - - Proc\#2 : 1,2 - - The method in charge to perform this is : MEDCoupling::OverlapMapping::prepare. -*/ OverlapDEC::OverlapDEC(const std::set& procIds, const MPI_Comm& world_comm): _load_balancing_algo(1), _own_group(true),_interpolation_matrix(0), _locator(0), diff --git a/src/ParaMEDMEM/OverlapDEC.hxx b/src/ParaMEDMEM/OverlapDEC.hxx index b65799dca..942653f1c 100644 --- a/src/ParaMEDMEM/OverlapDEC.hxx +++ b/src/ParaMEDMEM/OverlapDEC.hxx @@ -38,6 +38,187 @@ namespace MEDCoupling class ProcessorGroup; class ParaFIELD; + /*! + \anchor OverlapDEC-det + \class OverlapDEC + + \section OverlapDEC-over Overview + + The \c OverlapDEC enables the \ref InterpKerRemapGlobal "conservative remapping" of fields between + two parallel codes. This remapping is based on the computation of intersection volumes on + a \b single \b processor \b group. On this processor group are defined two field-templates called A + and B. The computation is possible for 3D meshes, 2D meshes, 3D-surface meshes, 1D meshes and + 2D-curve meshes. Dimensions must be similar for the distribution templates A and B. + + The main difference with \ref InterpKernelDEC-det "InterpKernelDEC" is that this + \ref para-dec "DEC" works with a *single* processor group, in which processors will share the work. + Consequently each processor manages two \ref MEDCouplingFieldTemplatesPage "field templates" (A and B) + called source and target. + Furthermore all processors in the processor group cooperate in the global interpolation matrix + computation. In this respect \c InterpKernelDEC is a specialization of \c OverlapDEC. + + \section ParaMEDMEMOverlapDECAlgorithmDescription Algorithm description + + Let's consider the following use case that is ran in ParaMEDMEMTest_OverlapDEC.cxx to describes + the different steps of the computation. The processor group contains 3 processors. + \anchor ParaMEDMEMOverlapDECImgTest1 + \image html OverlapDEC1.png "Example split of the source and target mesh among the 3 procs" + + \subsection ParaMEDMEMOverlapDECAlgoStep1 Step 1 : Bounding box exchange and global interaction between procs computation. + + In order to reduce as much as possible the amount of communications between distant processors, + every processor computes a bounding box for A and B. Then a AllToAll communication is performed + so that + every processor can compute the \b global interactions between processor. + This computation leads every processor to compute the same global TODO list expressed as a list + of pair. A pair ( x, y ) means that proc \b x fieldtemplate A can interact with fieltemplate B of + proc \b y because the two bounding boxes interact. + In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" this computation leads to the following + a \b global TODO list : + + \b (0,0),(0,1),(1,0),(1,2),(2,0),(2,1),(2,2) + + Here the pair (0,2) does not appear because the bounding box of fieldtemplateA of proc#2 does + not intersect that of fieldtemplate B on proc#0. + + Stage performed by MEDCoupling::OverlapElementLocator::computeBoundingBoxes. + + \subsection ParaMEDMEMOverlapDECAlgoStep2 Step 2 : Computation of local TODO list + + Starting from the global interaction previously computed in \ref ParaMEDMEMOverlapDECAlgoStep1 + "Step 1", each proc computes the TODO list per proc. + The following rules is chosen : a pair (x,y) can be treated by either proc \#x or proc \#y, + in order to reduce the amount of data transfers among + processors. The algorithm chosen for load balancing is the following : Each processor has + an empty \b local TODO list at the beginning. Then for each pair (k,m) in + \b global TODO list, if proc\#k has less temporary local list than proc\#m pair, (k,m) is added + to temporary local TODO list of proc\#k. + If proc\#m has less temporary local TODO list than proc\#k pair, (k,m) is added to temporary + local TODO list of proc\#m. + If proc\#k and proc\#m have the same amount of temporary local TODO list pair, (k,m) is added to + temporary local TODO list of proc\#k. + + In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" this computation leads to the following + local TODO list : + + - proc\#0 : (0,0) + - proc\#1 : (0,1),(1,0) + - proc\#2 : (1,2),(2,0),(2,1),(2,2) + + The algorithm described here is not perfect for this use case, we hope to enhance it soon. + + At this stage each proc knows precisely its \b local TODO list (with regard to interpolation). + The \b local TODO list of other procs than local + is kept for future computations. + + \subsection ParaMEDMEMOverlapDECAlgoStep3 Step 3 : Matrix echange between procs + + Knowing the \b local TODO list, the aim now is to exchange field-templates between procs. + Each proc computes knowing TODO list per + proc computed in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step 2" the exchange TODO list : + + In the \ref ParaMEDMEMOverlapDECImgTest1 "example above" the exchange TODO list gives the + following results : + + Sending TODO list per proc : + + - proc \#0 : Send fieldtemplate A to Proc\#1, Send fieldtemplate B to Proc\#1, Send fieldtemplate + B to Proc\#2 + - Proc \#1 : Send fieldtemplate A to Proc\#2, Send fieldtemplate B to Proc\#2 + - Proc \#2 : No send. + + Receiving TODO list per proc : + + - proc \#0 : No receiving + - proc \#1 : receiving fieldtemplate A from Proc\#0, receiving fieldtemplate B from Proc\#0 + - proc \#2 : receiving fieldtemplate B from Proc\#0, receiving fieldtemplate A from Proc\#1, + receiving fieldtemplate B from Proc\#1 + + To avoid as much as possible large volumes of transfers between procs, only relevant parts of + meshes are sent. In order for proc\#k to send fieldtemplate A to fieldtemplate B + of proc \#m., proc\#k computes the part of mesh A contained in the boundingbox B of proc\#m. It + implies that the corresponding cellIds or nodeIds of the + corresponding part are sent to proc \#m too. + + Let's consider the couple (k,m) in the TODO list. This couple is treated by either k or m as + seen in \ref ParaMEDMEMOverlapDECAlgoStep2 "here in Step2". + + As will be dealt in Step 6, for final matrix-vector computations, the resulting matrix of the + couple (k,m) wherever it is computed (proc \#k or proc \#m) + will be stored in \b proc\#m. + + - If proc \#k is in charge (performs the matrix computation) for this couple (k,m), target ids + (cells or nodes) of the mesh in proc \#m are renumbered, because proc \#m has seelected a sub mesh + of the target mesh to avoid large amounts of data to transfer. In this case as proc \#m is ultimately + in charge of the matrix, proc \#k must keep preciously the + source ids needed to be sent to proc\#m. No problem will appear for matrix assembling in proc m + for source ids because no restriction was done. + Concerning source ids to be sent for the matrix-vector computation, proc k will know precisely + which source ids field values to send to proc \#m. + This is embodied by OverlapMapping::keepTracksOfTargetIds in proc m. + + - If proc \#m is in charge (performs matrix computation) for this couple (k,m), source ids (cells + or nodes) of the mesh in proc \#k are renumbered, because proc \#k has selected a sub mesh of the + source mesh to avoid large amounts of data to transfer. In this case as proc \#k is ultimately + in charge of the matrix, proc \#m receives the source ids + from remote proc \#k, and thus the matrix is directly correct, no need for renumbering as + in \ref ParaMEDMEMOverlapDECAlgoStep5 "Step 5". However proc \#k must + keep track of the ids sent to proc \#m for the matrix-vector computation. + This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k. + + This step is performed in MEDCoupling::OverlapElementLocator::exchangeMeshes method. + + \subsection ParaMEDMEMOverlapDECAlgoStep4 Step 4 : Computation of the interpolation matrix + + After mesh exchange in \ref ParaMEDMEMOverlapDECAlgoStep3 "Step3" each processor has all the + required information to treat its \b local TODO list computed in + \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". This step is potentially CPU costly, which is why + the \b local TODO list per proc is expected to + be as well balanced as possible. + + The interpolation is performed as the \ref MEDCoupling::MEDCouplingRemapper "remapper" does. + + This operation is performed by OverlapInterpolationMatrix::addContribution method. + + \subsection ParaMEDMEMOverlapDECAlgoStep5 Step 5 : Global matrix construction. + + After having performed the TODO list at the end of \ref ParaMEDMEMOverlapDECAlgoStep4 "Step4" + we need to assemble the final matrix. + + The final aim is to have a distributed matrix \f$ M_k \f$ on each proc\#k. In order to reduce + data exchange during the matrix product process, + \f$ M_k \f$ is built using sizeof(Proc group) \c std::vector< \c std::map \c >. + + For a proc\#k, it is necessary to fetch info of all matrices built in + \ref ParaMEDMEMOverlapDECAlgoStep4 "Step4" where the first element in pair (i,j) + is equal to k. + + After this step, the matrix repartition is the following after a call to + MEDCoupling::OverlapMapping::prepare : + + - proc\#0 : (0,0),(1,0),(2,0) + - proc\#1 : (0,1),(2,1) + - proc\#2 : (1,2),(2,2) + + Tuple (2,1) computed on proc 2 is stored in proc 1 after execution of the function + "prepare". This is an example of item 0 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". + Tuple (0,1) computed on proc 1 is stored in proc 1 too. This is an example of item 1 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". + + In the end MEDCoupling::OverlapMapping::_proc_ids_to_send_vector_st will contain : + + - Proc\#0 : 0,1 + - Proc\#1 : 0,2 + - Proc\#2 : 0,1,2 + + In the end MEDCoupling::OverlapMapping::_proc_ids_to_recv_vector_st will contain : + + - Proc\#0 : 0,1,2 + - Proc\#1 : 0,2 + - Proc\#2 : 1,2 + + The method in charge to perform this is : MEDCoupling::OverlapMapping::prepare. + */ + class OverlapDEC : public DEC, public INTERP_KERNEL::InterpolationOptions { public: diff --git a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx index ab0240a6d..9408c267e 100644 --- a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx +++ b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx @@ -34,60 +34,6 @@ using namespace std; namespace MEDCoupling { - /*! - \anchor StructuredCoincidentDEC-det - \class StructuredCoincidentDEC - - This class aims at \ref interpolation "remapping fields" that have identical - structured supports (=the same underlying mesh) but different parallel topologies - (=different sub-domains in the structured mesh). It can be used to couple - together multi-physics codes that operate on the same domain - with different partitioning. This can be useful for example if one of - the computation is much faster than the other. It can also be used - to couple together codes that share an interface that was generated - in the same manner (with identical global ids). - Also, this \ref para-dec "DEC" can be used for fields that have component topologies, - i.e., components that are scattered over several processors. - - The remapping between the two supports is based on identity of global - ids, instead of geometrical considerations (as it is the case for - \ref InterpKernelDEC-det "InterpKernelDEC"). - Therefore, beware that this \ref para-dec "DEC" can not be used - for coincident meshes if they do *not* have the exact same numbering. - - With this %DEC no projection, and no interpolation of the field data is done, contrary - to what happens in \ref InterpKernelDEC-det "InterpKernelDEC". It is just - a matter of allocating the values from one side to the other, using directly the cell - identifiers. - - As all the other DECs, its usage requires two phases : - - a setup phase during which the topologies are exchanged so that - the target side knows from which processors it should expect - the data. - - a send/recv phase during which the field data is actually transferred. - - This example illustrates the sending of a field with - the \c StructuredCoincidentDEC : - \code - ... - StructuredCoincidentDEC dec(groupA, groupB); - dec.attachLocalField(field); - dec.synchronize(); - if (groupA.containsMyRank()) - dec.recvData(); - else if (groupB.containsMyRank()) - dec.sendData(); - ... - \endcode - - Creating a ParaFIELD to be attached to the %DEC is done in exactly the same way as for - the other DECs, if only the partitioning of the support mesh differs. - In the case where the - fields have also different *component* topologies, creating the ParaFIELD - requires some more effort. See the \ref para-over "parallelism" section for more details. - */ - - StructuredCoincidentDEC::StructuredCoincidentDEC():_topo_source(0),_topo_target(0), _send_counts(0),_recv_counts(0), _send_displs(0),_recv_displs(0), diff --git a/src/ParaMEDMEM/StructuredCoincidentDEC.hxx b/src/ParaMEDMEM/StructuredCoincidentDEC.hxx index 63f0f9120..d90b2d651 100644 --- a/src/ParaMEDMEM/StructuredCoincidentDEC.hxx +++ b/src/ParaMEDMEM/StructuredCoincidentDEC.hxx @@ -29,6 +29,58 @@ namespace MEDCoupling class DEC; class BlockTopology; + /*! + \anchor StructuredCoincidentDEC-det + \class StructuredCoincidentDEC + + This class aims at \ref interpolation "remapping fields" that have identical + structured supports (=the same underlying mesh) but different parallel topologies + (=different sub-domains in the structured mesh). It can be used to couple + together multi-physics codes that operate on the same domain + with different partitioning. This can be useful for example if one of + the computation is much faster than the other. It can also be used + to couple together codes that share an interface that was generated + in the same manner (with identical global ids). + Also, this \ref para-dec "DEC" can be used for fields that have component topologies, + i.e., components that are scattered over several processors. + + The remapping between the two supports is based on identity of global + ids, instead of geometrical considerations (as it is the case for + \ref InterpKernelDEC-det "InterpKernelDEC"). + Therefore, beware that this \ref para-dec "DEC" can not be used + for coincident meshes if they do *not* have the exact same numbering. + + With this %DEC no projection, and no interpolation of the field data is done, contrary + to what happens in \ref InterpKernelDEC-det "InterpKernelDEC". It is just + a matter of allocating the values from one side to the other, using directly the cell + identifiers. + + As all the other DECs, its usage requires two phases : + - a setup phase during which the topologies are exchanged so that + the target side knows from which processors it should expect + the data. + - a send/recv phase during which the field data is actually transferred. + + This example illustrates the sending of a field with + the \c StructuredCoincidentDEC : + \code + ... + StructuredCoincidentDEC dec(groupA, groupB); + dec.attachLocalField(field); + dec.synchronize(); + if (groupA.containsMyRank()) + dec.recvData(); + else if (groupB.containsMyRank()) + dec.sendData(); + ... + \endcode + + Creating a ParaFIELD to be attached to the %DEC is done in exactly the same way as for + the other DECs, if only the partitioning of the support mesh differs. + In the case where the + fields have also different *component* topologies, creating the ParaFIELD + requires some more effort. See the \ref para-over "parallelism" section for more details. + */ class StructuredCoincidentDEC : public DisjointDEC { public: