From: abn Date: Thu, 8 Oct 2015 15:08:07 +0000 (+0200) Subject: Still working on doc. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f060e8e2fb29ae4f2adb8c5e88be748e458e1079;p=tools%2Fmedcoupling.git Still working on doc. --- diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderAdvancedAPI.dox b/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderAdvancedAPI.dox index 4f2995d74..1de327a5c 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderAdvancedAPI.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderAdvancedAPI.dox @@ -1,17 +1,21 @@ /*! -\page MEDLoaderAdvancedAPIPage Advanced MEDLoader API. +\page MEDLoaderAdvancedAPIPage Advanced MEDLoader API [TOC] This method is much closer to MED file organization than \ref MEDLoaderBasicAPI "basic MEDLoader API". All MED file concepts are exposed to the user. As a consequence, this advanced -API is lead to change with MED file data model enhancement. +API is meant to evolve with MED file data model enhancement. -In reading mode, the user can scan entirely and directly the contents of its MED file as it is organized in its MED file. +In reading mode, the user can scan entirely and directly the contents of +its MED file directly as it is organized on the disk. Inversely, in writing mode, the user can describe its data in the same -way that MED file does. +way that MED file does on the disk. + +When looking for a specific point in the API, the diagram provided at the +end of this section might help: \section AdvMEDLoaderBasics Some of basics of advanced API @@ -255,4 +259,36 @@ Here is a \ref py_mcfield_writefile_allentities "Python example". Here is a \ref py_mcfield_writefile_partial "Python example". \endif +\section AdvMEDLoaderDiagram Simplified class diagram of the advanced API + +\image html med-loader-adv-classes.png "Class diagram of the advanced MEDLoader API" + +The blue rectangles show the links to the MEDCoupling objects. Note that in MEDCoupling there is no +representation of a field of integer. Those are extracted directly as \ref ParaMEDMEM::DataArrayInt "DataArrayInt". + +The classes shown on this diagram (all part of the \ref cpp "unfortunately named ParaMEDMEM namespace"): +- \ref ParaMEDMEM::MEDFileData "MEDFileData", the encapsulation of a complete MED file + +and also: +- \ref ParaMEDMEM::MEDFileMeshes "MEDFileMeshes", the set of meshes in the file +- \ref ParaMEDMEM::MEDFileMeshMultiTS "MEDFileMeshMultiTS", a single mesh with muliple time steps +- \ref ParaMEDMEM::MEDFileMesh "MEDFileMesh", a single mesh on a single timestep +- \ref ParaMEDMEM::MEDFileUMesh "MEDFileUMesh", a single unstructured mesh + +and also: +- \ref ParaMEDMEM::MEDFileFields "MEDFileFields", the set of fields in a MED file +- \ref ParaMEDMEM::MEDFileAnyTypeFieldMultiTS "MEDFileAnyTypeFieldMultiTS", a single field with multiple +time steps (can be an integer field or a double field) +- \ref ParaMEDMEM::MEDFileFieldMultiTS "MEDFileFieldMultiTS", a single field of doubles with multiple time steps +- \ref ParaMEDMEM::MEDFileIntFieldMultiTS "MEDFileIntFieldMultiTS", a single field of int with multiple time steps +- \ref ParaMEDMEM::MEDFileFieldMultiTS "MEDFileAnyTypeField1TS", a single field with a single time step +(integer or double) +- \ref ParaMEDMEM::MEDFileField1TS "MEDFileField1TS", a single field of doubles with a single time step +- \ref ParaMEDMEM::MEDFileIntField1TS "MEDFileIntField1TS", a single field of ints with a single time step + +and finally: +- \ref ParaMEDMEM::MEDFileParameters "MEDFileParameters", numerical parameters stored in a MED file + + + */ diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderBasicAPI.dox b/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderBasicAPI.dox index d4f553d36..c4eb56848 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderBasicAPI.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/MEDLoaderBasicAPI.dox @@ -1,6 +1,6 @@ /*! -\page MEDLoaderBasicAPIPage Basic MEDLoader API. +\page MEDLoaderBasicAPIPage Basic MEDLoader API [TOC] diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox b/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox index d343ad833..560d70ab5 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/intro-medloader.dox @@ -28,7 +28,7 @@ Whatever the approach(es) you choose, it is advisable to know main concepts of M \subsection MEDLoaderBasicApproach Basic API approach -\subpage MEDLoaderBasicAPIPage "A specific page dedicated to the basic API is available here". +\ref MEDLoaderBasicAPIPage "A specific page dedicated to the basic API is available here". This approach is less close to MED file concepts, but closer to \ref MEDCouplingMainConc "MEDCoupling concepts". @@ -46,7 +46,7 @@ As MED file concepts are more complex than MEDCoupling concepts, this approach i \subsection MEDLoaderAdvApproach Advanced API approach -\subpage MEDLoaderAdvancedAPIPage "A specific page dedicated to the advanced API is available here". +\ref MEDLoaderAdvancedAPIPage "A specific page dedicated to the advanced API is available here". This approach is the closest to MED file. By using this advanced API approach the user will manipulate classes that represent MED file concepts. diff --git a/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox b/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox index 3b4442a34..641af911a 100644 --- a/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox +++ b/doc2/user/doxygen/doxfiles/reference/medloader/medloader.dox @@ -1,8 +1,16 @@ /*! \page medloader MEDLoader: Writing, reading MED files +MEDLoader is built on top of the **MEDCoupling** library and uses its core structure +(\ref arrays DataArray, \ref meshes Meshes, \ref fields Fields). +It is an extension dedicated to the writing and reading of mesh and fields to MED files (files with a .med +extension). + - \subpage intro-medloader - \subpage MEDLoaderBasicAPIPage - \subpage MEDLoaderAdvancedAPIPage +More information on the MED file format itself can be found at: +- \ref med-file + */ \ No newline at end of file diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx index 444aefe3d..9c310bbca 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx @@ -51,6 +51,7 @@ void ComposedEdge::setValueAt(int i, Edge *e, bool direction) *it=new ElementaryEdge(e,direction); } +/*! \cond HIDDEN_ITEMS */ struct AbsEdgeCmp { AbsEdgeCmp(ElementaryEdge *b):_b1(b) { } @@ -58,6 +59,7 @@ struct AbsEdgeCmp ElementaryEdge *_b1; }; +/*! \endcond */ double ComposedEdge::getCommonLengthWith(const ComposedEdge& other) const { diff --git a/src/INTERP_KERNEL/Interpolation3D.cxx b/src/INTERP_KERNEL/Interpolation3D.cxx index 932fde926..16bd09cc0 100644 --- a/src/INTERP_KERNEL/Interpolation3D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D.cxx @@ -24,7 +24,6 @@ namespace INTERP_KERNEL { /** - * \defgroup interpolation3D Interpolation3D * \class Interpolation3D * \brief Class used to calculate the volumes of intersection between the elements of two 3D meshes. * diff --git a/src/INTERP_KERNEL/Interpolation3D.txx b/src/INTERP_KERNEL/Interpolation3D.txx index 4a09787c5..bc68b525c 100644 --- a/src/INTERP_KERNEL/Interpolation3D.txx +++ b/src/INTERP_KERNEL/Interpolation3D.txx @@ -36,7 +36,7 @@ #include "PointLocator3DIntersectorP1P1.txx" #include "Barycentric3DIntersectorP1P1.txx" #include "Log.hxx" -/// If defined, use recursion to traverse the binary search tree, else use the BBTree class +// If defined, use recursion to traverse the binary search tree, else use the BBTree class //#define USE_RECURSIVE_BBOX_FILTER #ifdef USE_RECURSIVE_BBOX_FILTER diff --git a/src/INTERP_KERNEL/Interpolation3D2D.cxx b/src/INTERP_KERNEL/Interpolation3D2D.cxx index 81729979c..4e8cee7f7 100644 --- a/src/INTERP_KERNEL/Interpolation3D2D.cxx +++ b/src/INTERP_KERNEL/Interpolation3D2D.cxx @@ -21,12 +21,6 @@ namespace INTERP_KERNEL { - /** - * \defgroup interpolation3D Interpolation3D - * \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/PlanarIntersector.hxx b/src/INTERP_KERNEL/PlanarIntersector.hxx index 55edd4366..b0662104c 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.hxx +++ b/src/INTERP_KERNEL/PlanarIntersector.hxx @@ -41,9 +41,7 @@ namespace INTERP_KERNEL static const NumberingPolicy numPol=MyMeshType::My_numPol; typedef typename std::map > DuplicateFacesType; public: - //! \addtogroup InterpKerGrpIntPlan @{ PlanarIntersector(const MyMeshType& meshT, const MyMeshType& meshS, double dimCaracteristic, double precision, double md3DSurf, double minDot3DSurf, double medianPlane, bool doRotate, int orientation, int printLevel); - //! @} virtual ~PlanarIntersector(); void createBoundingBoxes(const MyMeshType& mesh, std::vector& bbox); void adjustBoundingBoxes(std::vector& bbox, double surf3DAdjustmentEps, double surf3DAdjustmentEpsAbs); diff --git a/src/INTERP_KERNEL/TargetIntersector.hxx b/src/INTERP_KERNEL/TargetIntersector.hxx index b580ca912..e79d1e747 100644 --- a/src/INTERP_KERNEL/TargetIntersector.hxx +++ b/src/INTERP_KERNEL/TargetIntersector.hxx @@ -38,10 +38,6 @@ namespace INTERP_KERNEL public: typedef typename MyMeshType::MyConnType ConnType; public: - /*! - * \addtogroup InterpKerGrpIntPlan - * @{ - */ /*! * Tool for cell intersection, result is always positive. * @param icellT id of cell in target mesh in \b C \b mode. @@ -49,8 +45,7 @@ namespace INTERP_KERNEL * @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; - //! @} - //Tool for cell filtering + virtual int getNumberOfRowsOfResMatrix() const = 0; virtual int getNumberOfColsOfResMatrix() const = 0; virtual ~TargetIntersector() { } diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 141154de3..bbaaa3dd9 100644 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -484,10 +484,12 @@ void MEDCouplingPointSet::zipCoords() traducer->decrRef(); } +/*! \cond HIDDEN_ITEMS */ struct MEDCouplingCompAbs { bool operator()(double x, double y) { return std::abs(x)& oldCode, std::vector& newCode return ret; } +/*! \cond HIDDEN_ITEMS */ struct MEDLoaderAccVisit1 { MEDLoaderAccVisit1():_new_nb_of_nodes(0) { } int operator()(bool val) { return val?_new_nb_of_nodes++:-1; } int _new_nb_of_nodes; }; +/*! \endcond */ /*! * Array returned is the correspondance in \b old \b to \b new format. The returned array is newly created and should be dealt by the caller. diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index 9c7189655..70c6d889a 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -44,6 +44,15 @@ #include #include +/*! \class MEDLoader + * + * \brief Static class offering the "basic" API to read and write MED files/ + * + * This class implements only static methods and offers the high level API to access MED files. + * Take a look at \ref medloader for more details. + * + */ + med_geometry_type typmai[MED_N_CELL_FIXED_GEO] = { MED_POINT1, MED_SEG2, MED_SEG3, diff --git a/src/ParaMEDMEM/CommInterface.cxx b/src/ParaMEDMEM/CommInterface.cxx index ae9e2d9f1..948f099d8 100644 --- a/src/ParaMEDMEM/CommInterface.cxx +++ b/src/ParaMEDMEM/CommInterface.cxx @@ -21,14 +21,17 @@ namespace ParaMEDMEM { - /*! \defgroup comm_interface CommInterface - Class \a CommInterface is the gateway to the MPI library. + /*! \anchor CommInterface-det + \class CommInterface + + The class \a CommInterface is the gateway to the MPI library. + It is a helper class that gathers the calls to the MPI - library that are made in the ParaMEDMEM library. This gathering + library that are made in the %ParaMEDMEM library. This gathering allows easier gathering of information about the communication in the library. - It is typically called after the MPI_Init() call in a program. It is afterwards passed as a parameter to the constructors of ParaMEDMEM objects so that they access the MPI library via the CommInterface. + It is typically called after the MPI_Init() call in a program. It is afterwards passed as a parameter to the constructors of %ParaMEDMEM objects so that they access the MPI library via the CommInterface. As an example, the following code excerpt initializes a processor group made of the zero processor. diff --git a/src/ParaMEDMEM/DisjointDEC.cxx b/src/ParaMEDMEM/DisjointDEC.cxx index f3f9bf666..1ddd25aa1 100644 --- a/src/ParaMEDMEM/DisjointDEC.cxx +++ b/src/ParaMEDMEM/DisjointDEC.cxx @@ -31,49 +31,47 @@ #include #include -/*! \defgroup dec DEC - * - * \section decintroduction Introduction - * - * Interface class for creation of a link between two - * processor groups for exhanging mesh or field data. - * The \c DEC is defined by attaching a field on the receiving or on the - * sending side. - * On top of attaching a \c ParaMEDMEM::FIELD, it is possible to - * attach a ICoCo::Field. This class is an abstract class that enables - * coupling of codes that respect the ICoCo interface \ref icoco. It has two implementations: - * one for codes that express their fields as \ref medoupling fields (ICoCo::MEDField). - * - * \section dec_options DEC Options - * Options supported by \c DEC objects are - * - * - * - * - *
OptionDescriptionDefault value
ForcedRenormalizationAfter receiving data, the target field is renormalized so that L2-norms of the source and target fields match. false
- - - The following code excerpt shows how to set options for an object that inherits from \c DEC : - - \code - InterpKernelDEC dec(source_group,target_group); - dec.setOptions("ForcedRenormalization",true); - dec.attachLocalField(field); - dec.synchronize(); - if (source_group.containsMyRank()) - dec.sendData(); - else - dec.recvData(); - \endcode -*/ namespace ParaMEDMEM { - - /*! \addtogroup dec - @{ + /*! + * \anchor DisjointDEC-det + * \class DisjointDEC + * + * Interface class for creation of a link between two + * processor groups for exhanging mesh or field data. + * The \c DEC is defined by attaching a field on the receiving or on the + * sending side. + * On top of attaching a \c ParaMEDMEM::ParaFIELD, it is possible to + * attach a ICoCo::Field. This class is an abstract class that enables + * coupling of codes that respect the ICoCo interface \ref icoco. It has two implementations: + * one for codes that express their fields as \ref medoupling fields (ICoCo::MEDField). + * + * \section dec_options DEC Options + * Options supported by \c DEC objects are + * + * + * + * + *
OptionDescriptionDefault value
ForcedRenormalizationAfter receiving data, the target field is renormalized so that L2-norms of the source and target fields match. false
+ + + The following code excerpt shows how to set options for an object that inherits from \c DEC : + + \code + InterpKernelDEC dec(source_group,target_group); + dec.setOptions("ForcedRenormalization",true); + dec.attachLocalField(field); + dec.synchronize(); + if (source_group.containsMyRank()) + dec.sendData(); + else + dec.recvData(); + \endcode */ + + DisjointDEC::DisjointDEC(ProcessorGroup& source_group, ProcessorGroup& target_group):_local_field(0), _source_group(&source_group), _target_group(&target_group), @@ -305,7 +303,6 @@ namespace ParaMEDMEM } } } - /*! @} */ bool DisjointDEC::isInSourceSide() const { diff --git a/src/ParaMEDMEM/ExplicitCoincidentDEC.cxx b/src/ParaMEDMEM/ExplicitCoincidentDEC.cxx index 79852a1ca..5d30c60d4 100644 --- a/src/ParaMEDMEM/ExplicitCoincidentDEC.cxx +++ b/src/ParaMEDMEM/ExplicitCoincidentDEC.cxx @@ -32,7 +32,14 @@ using namespace std; namespace ParaMEDMEM { - /*! \defgroup explicitcoincidentdec ExplicitCoincidentDEC + /*! + * \anchor ExplicitCoincidentDEC-det + * \class ExplicitCoincidentDEC + * + * TODO: doc + */ + + /*! Constructor */ ExplicitCoincidentDEC::ExplicitCoincidentDEC():_toposource(0),_topotarget(0) { @@ -42,12 +49,6 @@ namespace ParaMEDMEM { } - - /*! - \addtogroup explicitcoincidentdec - @{ - */ - /*! Synchronization process for exchanging topologies */ void ExplicitCoincidentDEC::synchronize() @@ -388,8 +389,5 @@ namespace ParaMEDMEM _comm_interface->allToAllV(_sendbuffer, _sendcounts, _senddispls, MPI_DOUBLE, _recvbuffer, _recvcounts, _recvdispls, MPI_DOUBLE,MPI_COMM_WORLD); } - /*! - @} - */ } diff --git a/src/ParaMEDMEM/InterpKernelDEC.cxx b/src/ParaMEDMEM/InterpKernelDEC.cxx index e8605ded2..8b9c77354 100644 --- a/src/ParaMEDMEM/InterpKernelDEC.cxx +++ b/src/ParaMEDMEM/InterpKernelDEC.cxx @@ -34,9 +34,10 @@ namespace ParaMEDMEM { /*! - \defgroup interpkerneldec InterpKernelDEC + \anchor InterpKernelDEC-det + \class InterpKernelDEC - \section overview Overview + \section dec-over Overview The InterpKernelDEC enables the \ref conservativeremapping of fields between two parallel codes. This remapping is based on the computation of intersection volumes between elements from code A and elements from code B. The computation is possible for 3D meshes, 2D meshes, and 3D-surface meshes. Dimensions must be similar 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). @@ -98,11 +99,6 @@ namespace ParaMEDMEM \warning{ Options must be set before calling the synchronize method. } */ - - /*! - \addtogroup interpkerneldec - @{ - */ InterpKernelDEC::InterpKernelDEC():_interpolation_matrix(0) { @@ -272,9 +268,5 @@ namespace ParaMEDMEM _interpolation_matrix->getAccessDEC()->setTime(time,deltatime); sendData() ; } - - /*! - @} - */ } diff --git a/src/ParaMEDMEM/InterpolationMatrix.cxx b/src/ParaMEDMEM/InterpolationMatrix.cxx index 99c12981a..8b8c50f61 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.cxx +++ b/src/ParaMEDMEM/InterpolationMatrix.cxx @@ -39,27 +39,20 @@ #include -// class InterpolationMatrix -// This class enables the storage of an interpolation matrix Wij mapping -// source field Sj to target field Ti via Ti=Vi^(-1).Wij.Sj. -// The matrix is built and stored on the processors belonging to the source -// group. - using namespace std; namespace ParaMEDMEM { - // ==================================================================== - // 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_group processor group containing the local processors - // param target_group processor group containing the distant processors - // param method interpolation method - // ==================================================================== - + /**! + 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_group processor group containing the local processors + \param target_group processor group containing the distant processors + \param method interpolation method + */ InterpolationMatrix::InterpolationMatrix(const ParaMEDMEM::ParaFIELD *source_field, const ProcessorGroup& source_group, const ProcessorGroup& target_group, @@ -84,22 +77,21 @@ namespace ParaMEDMEM } - // ====================================================================== - // \brief Adds the contribution of a distant subdomain to the* - // interpolation matrix. - // The method adds contribution to the interpolation matrix. - // For each row of the matrix, elements are addded as - // a (column, coeff) pair in the _coeffs array. This column number refers - // to an element on the target side via the _col_offsets array. - // It is made of a series of (iproc, ielem) pairs. - // The number of elements per row is stored in the row_offsets array. - - // param distant_support local representation of the distant subdomain - // param iproc_distant id of the distant subdomain (in the distant group) - // param distant_elems mapping between the local representation of - // the subdomain and the actual elem ids on the distant subdomain - // ====================================================================== - + /*! + \brief Adds the contribution of a distant subdomain to the* + interpolation matrix. + The method adds contribution to the interpolation matrix. + For each row of the matrix, elements are addded as + a (column, coeff) pair in the _coeffs array. This column number refers + to an element on the target side via the _col_offsets array. + It is made of a series of (iproc, ielem) pairs. + The number of elements per row is stored in the row_offsets array. + + param distant_support local representation of the distant subdomain + param iproc_distant id of the distant subdomain (in the distant group) + param distant_elems mapping between the local representation of + the subdomain and the actual elem ids on the distant subdomain + */ void InterpolationMatrix::addContribution ( MEDCouplingPointSet& distant_support, int iproc_distant, const int* distant_elems, @@ -840,14 +832,13 @@ namespace ParaMEDMEM } } - // ================================================================== - // The call to this method updates the arrays on the target side - // so that they know which amount of data from which processor they - // should expect. - // That call makes actual interpolations via multiply method - // available. - // ================================================================== + /**! The call to this method updates the arrays on the target side + so that they know which amount of data from which processor they + should expect. + That call makes actual interpolations via multiply method + available. + */ void InterpolationMatrix::prepare() { int nbelems = _source_field->getField()->getNumberOfTuples(); @@ -859,18 +850,18 @@ namespace ParaMEDMEM } - // ======================================================================= - // brief performs t=Ws, where t is the target field, s is the source field - // The call to this method must be called both on the working side - // and on the idle side. On the working side, the vector T=VT^(-1).(W.S) - // is computed and sent. On the idle side, no computation is done, but the - // result from the working side is received and the field is updated. + /*! + \brief performs t=Ws, where t is the target field, s is the source field - // param field source field on processors involved on the source side, - // target field on processors on the target side - // ======================================================================= + The call to this method must be called both on the working side + and on the idle side. On the working side, the vector T=VT^(-1).(W.S) + is computed and sent. On the idle side, no computation is done, but the + result from the working side is received and the field is updated. + \param field source field on processors involved on the source side, + target field on processors on the target side + */ void InterpolationMatrix::multiply(MEDCouplingFieldDouble& field) const { int nbcomp = field.getArray()->getNumberOfComponents(); @@ -917,20 +908,19 @@ namespace ParaMEDMEM } - // ========================================================================= - // brief performs s=WTt, where t is the target field, s is the source field, - // WT is the transpose matrix from W - - // The call to this method must be called both on the working side - // and on the idle side. On the working side, the target vector T is - // received and the vector S=VS^(-1).(WT.T) is computed to update - // the field. - // On the idle side, no computation is done, but the field is sent. + /**! + \brief performs s=WTt, where t is the target field, s is the source field, + WT is the transpose matrix from W - // param field source field on processors involved on the source side, - // target field on processors on the target side - // ========================================================================= + The call to this method must be called both on the working side + and on the idle side. On the working side, the target vector T is + received and the vector S=VS^(-1).(WT.T) is computed to update + the field. + On the idle side, no computation is done, but the field is sent. + param field source field on processors involved on the source side, + target field on processors on the target side + */ void InterpolationMatrix::transposeMultiply(MEDCouplingFieldDouble& field) const { int nbcomp = field.getArray()->getNumberOfComponents(); diff --git a/src/ParaMEDMEM/InterpolationMatrix.hxx b/src/ParaMEDMEM/InterpolationMatrix.hxx index 71f4eeca0..97fc2a300 100644 --- a/src/ParaMEDMEM/InterpolationMatrix.hxx +++ b/src/ParaMEDMEM/InterpolationMatrix.hxx @@ -29,6 +29,12 @@ namespace ParaMEDMEM { class ElementLocator; + /**! class InterpolationMatrix + This class enables the storage of an interpolation matrix Wij mapping + source field Sj to target field Ti via Ti=Vi^(-1).Wij.Sj. + The matrix is built and stored on the processors belonging to the source + group. + */ class InterpolationMatrix : public INTERP_KERNEL::InterpolationOptions, public DECOptions { diff --git a/src/ParaMEDMEM/MPIAccess.cxx b/src/ParaMEDMEM/MPIAccess.cxx index 2ca867122..b9389cdcc 100644 --- a/src/ParaMEDMEM/MPIAccess.cxx +++ b/src/ParaMEDMEM/MPIAccess.cxx @@ -26,8 +26,11 @@ using namespace std; namespace ParaMEDMEM { - /*! \defgroup mpi_access MPIAccess - Class \a MPIAccess is the gateway to the MPI library. + /**! + \anchor MPIAccess-det + \class MPIAccess + + The class \a MPIAccess is the gateway to the MPI library. It is a helper class that gathers the calls to the MPI library that are made in the ParaMEDMEM library. This gathering allows easier gathering of information about the communication diff --git a/src/ParaMEDMEM/MPIProcessorGroup.cxx b/src/ParaMEDMEM/MPIProcessorGroup.cxx index 055cc5122..5b7c24055 100644 --- a/src/ParaMEDMEM/MPIProcessorGroup.cxx +++ b/src/ParaMEDMEM/MPIProcessorGroup.cxx @@ -29,36 +29,34 @@ using namespace std; -/*! \defgroup processor_group Processor Groups - * - * \section processor_group_overview Overview - * The MPIProcessorGroup class is used to set up processor groups that help to define - * the MPI topology of the couplings. They can be set up in various ways, the most common being - * the use of the \c MPIProcessorGroup(Comminterface, int pfirst, int plast) - * constructor. - * - * The following code excerpt creates two processor groups on respectively 3 and 2 processors. - \verbatim - int main() - { - MPI_Init(&argc,&argv); - CommInterface comm_interface; - MPIProcessorGroup codeA_group(comm_interface, 0, 2); - MPIProcessorGroup codeB_group(comm_interface, 3, 4); - - ... - } - \endverbatim -*/ - namespace ParaMEDMEM { - /*! - \addtogroup processor_group - @{ + /*! + * \anchor MPIProcessorGroup-det + * \class MPIProcessorGroup + * + * \section processor_group_overview Overview + * The MPIProcessorGroup class is used to set up processor groups that help to define + * the MPI topology of the couplings. They can be set up in various ways, the most common being + * the use of the \c MPIProcessorGroup(Comminterface, int pfirst, int plast) + * constructor. + * + * The following code excerpt creates two processor groups on respectively 3 and 2 processors. + \verbatim + int main() + { + MPI_Init(&argc,&argv); + CommInterface comm_interface; + MPIProcessorGroup codeA_group(comm_interface, 0, 2); // groups processors 0, 1 and 2 + MPIProcessorGroup codeB_group(comm_interface, 3, 4); // groups processors 3 and 4 + + ... + } + \endverbatim */ + /*! * Creates a processor group that is based on all the MPI_COMM_WORLD processor.This routine must be called by all processors in MPI_COMM_WORLD. @@ -164,9 +162,6 @@ namespace ParaMEDMEM delete[] ranks; _comm_interface.groupFree(&group_world); // MPI_Group is a C structured and won't get de-allocated automatically? } - /*! - @} - */ MPIProcessorGroup::MPIProcessorGroup (const ProcessorGroup& proc_group, set proc_ids) : ProcessorGroup(proc_group.getCommInterface()),_world_comm(MPI_COMM_WORLD) @@ -188,10 +183,6 @@ namespace ParaMEDMEM _comm_interface.commFree(&_comm); } - /*! - \addtogroup processor_group - @{ - */ /*! Translation of the rank id between two processor groups. This method translates rank \a rank on the current processor group to the rank on group pointed by \a group. @@ -251,9 +242,6 @@ namespace ParaMEDMEM return rank; } - /*! - @} - */ ProcessorGroup* MPIProcessorGroup::createProcGroup() const { set procs; diff --git a/src/ParaMEDMEM/NonCoincidentDEC.cxx b/src/ParaMEDMEM/NonCoincidentDEC.cxx index 830d3d11c..97d728736 100644 --- a/src/ParaMEDMEM/NonCoincidentDEC.cxx +++ b/src/ParaMEDMEM/NonCoincidentDEC.cxx @@ -38,9 +38,8 @@ namespace ParaMEDMEM { /*! - \defgroup noncoincidentdec NonCoincidentDEC - - \section overview Overview + \anchor NonCoincidentDEC-det + \class NonCoincidentDEC \c NonCoincidentDEC enables nonconservative remapping of fields between two parallel codes. @@ -242,11 +241,6 @@ namespace ParaMEDMEM { } - /*! - \addtogroup noncoincidentdec - @{ - */ - /*! Constructor of a non coincident \ref dec with * a source group on which lies a field lying on a mesh and a * target group on which lies a mesh. @@ -392,7 +386,4 @@ namespace ParaMEDMEM renormalizeTargetField(); } - /*! - @} - */ } diff --git a/src/ParaMEDMEM/OverlapDEC.cxx b/src/ParaMEDMEM/OverlapDEC.cxx index 61f80ba6a..004a5a93b 100644 --- a/src/ParaMEDMEM/OverlapDEC.cxx +++ b/src/ParaMEDMEM/OverlapDEC.cxx @@ -24,8 +24,13 @@ #include "MPIProcessorGroup.hxx" #include "OverlapElementLocator.hxx" #include "OverlapInterpolationMatrix.hxx" + +namespace ParaMEDMEM +{ /*! - \defgroup overlapdec OverlapDEC + \anchor OverlapDEC-det + \class OverlapDEC + 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 same \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 is that this \ref dec manages 2 field templates on each processor of the processor group (A and B) called source and target. Furthermore all processors in processor group cooperates in global interpolation matrix computation. In this respect \ref InterpKernelIDEC is a specialization of \c OverlapDEC. @@ -152,8 +157,6 @@ The method in charge to perform this is : ParaMEDMEM::OverlapMapping::prepare. */ -namespace ParaMEDMEM -{ OverlapDEC::OverlapDEC(const std::set& procIds, const MPI_Comm& world_comm):_own_group(true),_interpolation_matrix(0), _source_field(0),_own_source_field(false), _target_field(0),_own_target_field(false) diff --git a/src/ParaMEDMEM/ParaFIELD.cxx b/src/ParaMEDMEM/ParaFIELD.cxx index f33acf919..9995ccae1 100644 --- a/src/ParaMEDMEM/ParaFIELD.cxx +++ b/src/ParaMEDMEM/ParaFIELD.cxx @@ -35,17 +35,22 @@ namespace ParaMEDMEM { /*! - \defgroup parafield ParaFIELD - This class encapsulates parallel fields. It basically encapsulates + \anchor ParaFIELD-det + \class ParaFIELD + + This class encapsulates parallel fields. + + It basically encapsulates a MEDCouplingField with extra information related to parallel topology. + It is most conveniently created by giving a pointer to a MEDCouplingField object and a \c ProcessorGroup. By default, a ParaFIELD object will be constructed with all field components located on the same processors. In some specific cases, it might be necessary to scatter components over several processors. In this case, the constructor using a ComponentTopology is required. - @{ */ + */ /*! diff --git a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx index af0f9fe84..4c0fb00b7 100644 --- a/src/ParaMEDMEM/StructuredCoincidentDEC.cxx +++ b/src/ParaMEDMEM/StructuredCoincidentDEC.cxx @@ -34,7 +34,9 @@ using namespace std; namespace ParaMEDMEM { - /*! \defgroup structuredcoincidentdec StructuredCoincidentDEC + /*! + \anchor StructuredCoincidentDEC-det + \class StructuredCoincidentDEC This class is meant for remapping fields that have identical supports with different parallel topologies. It can be used to couple @@ -101,10 +103,6 @@ namespace ParaMEDMEM delete _topo_target; } - /*! - \addtogroup structuredcoincidentdec - @{ - */ StructuredCoincidentDEC::StructuredCoincidentDEC(ProcessorGroup& local_group, ProcessorGroup& distant_group):DisjointDEC(local_group,distant_group), _topo_source(0),_topo_target(0), _send_counts(0),_recv_counts(0), @@ -409,8 +407,5 @@ namespace ParaMEDMEM prepareTargetDE(); } } - /*! - @} - */ }