00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 #ifndef __DECOPTIONS_HXX__ 00021 #define __DECOPTIONS_HXX__ 00022 00023 #include <string> 00024 00025 namespace ParaMEDMEM 00026 { 00027 //Enum describing the allToAll method used in the communication pattern 00028 typedef enum { Native, PointToPoint } AllToAllMethod; 00029 typedef enum { WithoutTimeInterp, LinearTimeInterp } TimeInterpolationMethod; 00030 00031 class DECOptions 00032 { 00033 protected: 00034 std::string _method; 00035 bool _asynchronous; 00036 TimeInterpolationMethod _timeInterpolationMethod; 00037 AllToAllMethod _allToAllMethod; 00038 bool _forcedRenormalization; 00039 public: 00040 DECOptions():_method("P0"), 00041 _asynchronous(false), 00042 _timeInterpolationMethod(WithoutTimeInterp), 00043 _allToAllMethod(Native), 00044 _forcedRenormalization(false) 00045 { 00046 } 00047 00048 DECOptions(const DECOptions& deco) 00049 { 00050 _method=deco._method; 00051 _timeInterpolationMethod=deco._timeInterpolationMethod; 00052 _asynchronous=deco._asynchronous; 00053 _forcedRenormalization=deco._forcedRenormalization; 00054 _allToAllMethod=deco._allToAllMethod; 00055 } 00056 00057 const std::string& getMethod() const { return _method; } 00058 void setMethod(const char *m) { _method=m; } 00059 00060 TimeInterpolationMethod getTimeInterpolationMethod() const { return DECOptions::_timeInterpolationMethod; } 00061 void setTimeInterpolationMethod(TimeInterpolationMethod it) { DECOptions::_timeInterpolationMethod=it; } 00062 00063 bool getForcedRenormalization() const { return DECOptions::_forcedRenormalization; } 00064 void setForcedRenormalization( bool dr) { DECOptions::_forcedRenormalization = dr; } 00065 00066 bool getAsynchronous() const { return DECOptions::_asynchronous; } 00067 void setAsynchronous( bool dr) { DECOptions::_asynchronous = dr; } 00068 00069 AllToAllMethod getAllToAllMethod() const { return _allToAllMethod; } 00070 void setAllToAllMethod(AllToAllMethod sp) { _allToAllMethod=sp; } 00071 }; 00072 } 00073 00074 #endif