X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParaMEDMEM%2FDECOptions.hxx;h=4083f58289437da52f1e86663363827a78e9422c;hb=ffdef130a5a36893d8e58d538884e79413975c7a;hp=04671e55820d49f10271e20f69c565e64e3c2c91;hpb=659f8c67d0348350e12fde38fe8c4de1ff95dffe;p=tools%2Fmedcoupling.git diff --git a/src/ParaMEDMEM/DECOptions.hxx b/src/ParaMEDMEM/DECOptions.hxx index 04671e558..4083f5828 100644 --- a/src/ParaMEDMEM/DECOptions.hxx +++ b/src/ParaMEDMEM/DECOptions.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -22,12 +22,31 @@ #include -namespace ParaMEDMEM +namespace MEDCoupling { - //Enum describing the allToAll method used in the communication pattern + //! Enum describing the allToAll method used in the communication pattern typedef enum { Native, PointToPoint } AllToAllMethod; + //! Enum describing the time interpolation method typedef enum { WithoutTimeInterp, LinearTimeInterp } TimeInterpolationMethod; + /*! + This class groups the various options accepted by all \ref para-dec "DECs" (which all inherit from %DECOptions). + + The following code excerpt shows how to set options on a %DEC : + + \code + InterpKernelDEC dec(source_group,target_group); + dec.setForcedRenormalization(true); + dec.attachLocalField(field); + dec.synchronize(); + if (source_group.containsMyRank()) + dec.sendData(); + else + dec.recvData(); + \endcode + * + * + */ class DECOptions { protected: @@ -54,19 +73,55 @@ namespace ParaMEDMEM _allToAllMethod=deco._allToAllMethod; } + + /*! + * \sa setMethod() + */ const std::string& getMethod() const { return _method; } + /*! + * Set interpolation method. Defaults to "P0". + */ void setMethod(const char *m) { _method=m; } + /*! + * \sa setTimeInterpolationMethod() + */ TimeInterpolationMethod getTimeInterpolationMethod() const { return DECOptions::_timeInterpolationMethod; } + /*! + * Set time interpolation method. Default to WithoutTimeInterp. + */ void setTimeInterpolationMethod(TimeInterpolationMethod it) { DECOptions::_timeInterpolationMethod=it; } + /*! + * \sa setForcedRenormalization() + */ bool getForcedRenormalization() const { return DECOptions::_forcedRenormalization; } + + /*! + * Force renormalization of the field after it has been received so that the total sum + * of the field values are the same on both the sending and the receiving side. Defaults to + * false. + */ void setForcedRenormalization( bool dr) { DECOptions::_forcedRenormalization = dr; } + + /*! + * \sa setAsynchronous() + */ bool getAsynchronous() const { return DECOptions::_asynchronous; } + + /*! + * Switch to asynchronous data transfer mode. Default is false. + */ void setAsynchronous( bool dr) { DECOptions::_asynchronous = dr; } + /*! + * \sa setAllToAllMethod() + */ AllToAllMethod getAllToAllMethod() const { return _allToAllMethod; } + /*! + * Set the broadcast method for synchronisation processes. Default to Native. + */ void setAllToAllMethod(AllToAllMethod sp) { _allToAllMethod=sp; } }; }