1 // Copyright (C) 2011-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
19 // File : MG_ADAPT.hxx
24 #include "SALOME_Component.idl"
25 #include "SALOME_Exception.idl"
26 #include "SALOME_GenericObj.idl"
27 #include "SALOMEDS.idl"
28 #include "SMESH_Mesh.idl"
32 typedef sequence<string> str_array ;
33 struct MgAdaptHypothesisData
35 string myFileInDir, myMeshFileIn, myInMeshName, myMeshFileBackground, myOutMeshName,
36 myMeshFileOut, myFileOutDir, myFileSizeMapDir, myFieldName;
38 boolean myPublish, myMeshOutMed;
39 boolean myUseLocalMap, myUseBackgroundMap, myUseConstantValue;
40 double myConstantValue;
41 long myRank, myTimeStep;
42 boolean myUseNoTimeStep, myUseLastTimeStep, myUseChosenTimeStep;
43 string myWorkingDir, myLogFile;
44 boolean myPrintLogInFile, myKeepFiles, myRemoveLogOnSuccess;
49 interface MG_ADAPT : SALOME::GenericObj
51 //MG_ADAPT CreateMG_ADAPT(in PortableServer::POA_var poa);
52 void setData( inout MgAdaptHypothesisData data);
54 void setMedFileIn(in string MedFileIn );
55 string getMedFileIn();
57 void setMedFileOut(in string MedFileOut);
58 string getMedFileOut();
60 void setMeshName(in string s);
63 void setMeshNameOut(in string s);
64 string getMeshNameOut();
66 void setMeshOutMed(in boolean b);
67 boolean getMeshOutMed();
69 void setPublish(in boolean b);
72 void setSizeMapFieldName(in string s);
73 string getSizeMapFieldName();
75 void setTimeStep(in long s);
78 void setTimeStepRank(in long s, in long f);
81 void setTimeStepRankLast();
84 void setLogFile(in string f);
87 void setVerbosityLevel(in long f);
88 long getVerbosityLevel();
90 void setRemoveOnSuccess(in boolean f);
91 boolean getRemoveOnSuccess();
93 MgAdaptHypothesisData getData();
95 void setUseLocalMap(in boolean f);
96 boolean getUseLocalMap();
98 void setUseBackgroundMap(in boolean f);
99 boolean getUseBackgroundMap();
101 void setUseConstantValue(in boolean f);
102 boolean getUseConstantValue();
104 void setConstantSize(in double f);
105 double getConstantSize() ;
107 void setSizeMapFile(in string f);
108 string getSizeMapFile();
110 void setFromMedFile(in boolean f);
111 boolean isFromMedFile();
113 void setKeepWorkingFiles(in boolean f);
114 boolean getKeepWorkingFiles();
116 void setPrintLogInFile(in boolean f);
117 boolean getPrintLogInFile();
119 void setWorkingDir(in string f);
120 string getWorkingDir() ;
122 void setSizeMapType(in string f);
124 string getCommandToRun() ;
125 //long compute(out string errStr);
128 string getFileName() ;
130 void copyMgAdaptHypothesisData(in MgAdaptHypothesisData f ) ;
132 //void checkDirPath(inout string f);
134 boolean hasOptionDefined( in string optionName ) ;
135 void setOptionValue(in string optionName, in string optionValue) raises (SALOME::SALOME_Exception);
136 string getOptionValue(in string optionName, inout boolean isDefault) raises (SALOME::SALOME_Exception);
137 str_array getCustomOptionValuesStrVec() ;
138 str_array getOptionValuesStrVec() ;
141 typedef MG_ADAPT MG_ADAPT_HYPOTHESIS;
142 interface MG_ADAPT_OBJECT : SALOME::GenericObj
144 void setMeshIn(in SMESH_Mesh theMesh ) raises (SALOME::SALOME_Exception);
145 void setMEDFileIn(in string f) raises (SALOME::SALOME_Exception);
146 void setMEDFileOut(in string f) raises (SALOME::SALOME_Exception);
147 void setMEDFileBackground(in string f) raises (SALOME::SALOME_Exception);
148 void AddHypothesis(in MG_ADAPT mg) raises (SALOME::SALOME_Exception);
149 long Compute(in boolean Publish) raises (SALOME::SALOME_Exception);
153 #endif // MG_ADAPT_IDL