-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020 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
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <string>
-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:
_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; }
};
}