Salome HOME
Copyright update 2020
[tools/medcoupling.git] / doc / developer / doxygen / fakesources / MEDFileMesh.C
1 // Copyright (C) 2013-2020  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // This file contains some code used only for
21 // * generation of documentation for inline methods,
22 // * groupping methods into "Basic API", "Advanced" and "Others..." sections
23
24
25 namespace MEDCoupling
26 {
27   /*!
28    * Sets the name of \a this mesh.
29    *  \param [in] name - the new mesh name.
30    */
31   void MEDFileMesh::setName(const std::string& name) {}
32   /*!
33    * Returns the name of \a this mesh.
34    *  \return const char* name - the mesh name.
35    */
36   const std::string& MEDFileMesh::getName() const {}
37   /*!
38    * Sets the universal name of \a this mesh. The universal name uniquely identifies the mesh.
39    *  \param [in] name - the new universal mesh name.
40    */
41   void MEDFileMesh::setUnivName(const std::string& name) {}
42   /*!
43    * Returns the universal name of \a this mesh. The universal name uniquely identifies the mesh.
44    *  \return const std::string&  - the universal mesh name.
45    */
46   const std::string& MEDFileMesh::getUnivName() const {}
47   /*!
48    * Sets the description of \a this mesh.
49    *  \param [in] name - the new mesh description.
50    */
51   void MEDFileMesh::setDescription(const std::string& name) {}
52   /*!
53    * Returns the description of \a this mesh.
54    *  \return const char* - the mesh description.
55    */
56   const std::string& MEDFileMesh::getDescription() const {}
57   /*!
58    * Sets the order number of iteration of \a this mesh state.
59    *  \param [in] order - the order number.
60    */
61   void MEDFileMesh::setOrder(int order) {}
62   /*!
63    * Returns the order number of iteration of \a this mesh state.
64    *  \return int - the order number.
65    */
66   int MEDFileMesh::getOrder() const {}
67   /*!
68    * Sets the number of iteration of \a this mesh state.
69    *  \param [in] it - the iteration number.
70    */
71   void MEDFileMesh::setIteration(int it) {}
72   /*!
73    * Returns the number of iteration of \a this mesh state.
74    *  \return int - the iteration number.
75    */
76   int MEDFileMesh::getIteration() const {}
77   /*!
78    * Sets the time of \a this mesh state.
79    *  \param [in] val - the time value.
80    */
81   void MEDFileMesh::setTimeValue(double time) {}
82   /*!
83    * Sets time, the number of iteration and the order number of iteration 
84    * of \a this mesh state.
85    *  \param [in] val - the time value.
86    *  \param [in] iteration - the iteration number.
87    *  \param [in] order - the order number.
88    */
89   void MEDFileMesh::setTime(int dt, int it, double time) {}
90   /*!
91    * Returns time, the number of iteration and the order number of iteration 
92    * of \a this mesh state.
93    *  \param [out] iteration - the iteration number.
94    *  \param [out] order - the order number.
95    *  \return double - the time value.
96    */
97   double MEDFileMesh::getTime(int& dt, int& it) {}
98   /*!
99    * Returns the time of \a this mesh state.
100    *  \return double - the time value.
101    */
102   double MEDFileMesh::getTimeValue() const {}
103   /*!
104    * Sets units in which the time is measured.
105    *  \param [in] unit - the time unit name.
106    */
107   void MEDFileMesh::setTimeUnit(const std::string& unit) {}
108   /*!
109    * Returns units in which the time is measured.
110    *  \return const std::string&  - the time unit name.
111    */
112   const std::string& MEDFileMesh::getTimeUnit() const {}
113   /*!
114    * Returns names and ids of all families in \a this mesh.
115    *  \return const std::map<std::string,int>& - a map of a family name to a family id.
116    */
117   const std::map<std::string,int>& MEDFileMesh::getFamilyInfo() const {}
118   /*!
119    * Returns names of all groups and families constituting them in \a this mesh.
120    *  \return const std::map<std::string, std::vector<std::string> >& - 
121    *  a map of a group name to a vector of names of families constituting the group.
122    */
123   const std::map<std::string, std::vector<std::string> >& MEDFileMesh::getGroupInfo() const {}
124   /*!
125    * Returns relative dimensions of mesh entities (excluding nodes) present in \a this mesh.
126    *  \return std::vector<int> - a sequence of the relative dimensions.
127    */
128   std::vector<int> MEDFileMesh::getNonEmptyLevels() const {}
129   /*!
130    * Returns relative dimensions of mesh entities (including nodes) present in \a this mesh.
131    *  \return std::vector<int> - a sequence of the relative dimensions.
132    */
133   std::vector<int> MEDFileMesh::getNonEmptyLevelsExt() const {}
134   /*!
135    * Returns number of mesh entities of a given relative dimension in \a this mesh.
136    *  \param [in] meshDimRelToMaxExt - the relative dimension of interest.
137    *  \return int - the number of entities.
138    *  \throw If no mesh entities of dimension \a meshDimRelToMaxExt are available in \a this mesh.
139    */
140   int MEDFileMesh::getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
141   /*!
142    * Returns a MEDCouplingMesh of a given relative dimension.
143    *  \param [in] meshDimRelToMax - the relative dimension of interest.
144    *  \param [in] renum - if \c true, the returned mesh is permuted according to the
145    *          optional numbers of mesh entities.
146    *  \return MEDCouplingMesh * - a pointer to MEDCouplingMesh that the caller is to
147    *          delete using decrRef() as it is no more needed. 
148    *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
149    *  \throw If \a renum == \c true but permutation is impossible.
150    */
151   MEDCouplingMesh *MEDFileMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception) {}
152   /*!
153    * Returns the dimension on cells in \a this mesh.
154    *  \return int - the mesh dimension.
155    *  \throw If there are no cells in this mesh.
156    */
157   int MEDFileMesh::getMeshDimension() const throw(INTERP_KERNEL::Exception) {}
158   /*!
159    * Returns a full textual description of \a this mesh.
160    *  \return std::string - the string holding the mesh description.
161    */
162   std::string MEDFileMesh::advancedRepr() const {}
163   /*!
164    * Sets the family field of a given relative dimension.
165    *  \param [in] meshDimRelToMaxExt - the relative dimension of entities for which
166    *          the family field is set.
167    *  \param [in] famArr - the array of the family field.
168    *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
169    *  \throw If \a famArr has an invalid size.
170    */
171   void MEDFileMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) throw(INTERP_KERNEL::Exception) {}
172   /*!
173    * Sets the optional numbers of mesh entities of a given dimension.
174    *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
175    *  \param [in] renumArr - the array of the numbers.
176    *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
177    *  \throw If \a renumArr has an invalid size.
178    */
179   void MEDFileMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) throw(INTERP_KERNEL::Exception) {}
180   /*!
181    * Returns the family field for mesh entities of a given dimension.
182    *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
183    *  \return const DataArrayInt * - the family field. It is an array of ids of families
184    *          each mesh entity belongs to. It can be NULL.
185    */
186   const DataArrayInt *MEDFileMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
187   /*!
188    * Returns the optional numbers of mesh entities of a given dimension.
189    *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
190    *  \return const DataArrayInt * - the array of the entity numbers.
191    *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
192    */
193   const DataArrayInt *MEDFileMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
194   /*!
195    * Returns the optional numbers of mesh entities of a given dimension transformed using
196    * DataArrayInt::invertArrayN2O2O2N().
197    *  \param [in] meshDimRelToMaxExt - the relative dimension of mesh entities.
198    *  \return const DataArrayInt * - the array of the entity numbers transformed using
199    *          DataArrayInt::invertArrayN2O2O2N().
200    *  \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
201    */
202   const DataArrayInt *MEDFileMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
203   /*!
204    * Returns ids of mesh entities contained in given families of a given dimension.
205    *  \param [in] meshDimRelToMaxExt - a relative dimension of the mesh entities whose ids
206    *          are required.
207    *  \param [in] fams - the names of the families of interest.
208    *  \param [in] renum - if \c true, the optional numbers of entities, if available, are
209    *          returned instead of ids.
210    *  \return DataArrayInt * - a new instance of DataArrayInt holding either ids or
211    *          numbers, if available and required, of mesh entities of the families. The caller
212    *          is to delete this array using decrRef() as it is no more needed. 
213    *  \throw If the family field is missing for \a meshDimRelToMaxExt.
214    */
215   DataArrayInt *MEDFileMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception) {}
216 }
217
218
219 namespace MEDCoupling
220 {
221   /*! \name Basic API   */
222   ///@{
223   MEDFileMesh::FindOrCreateAndGiveFamilyWithId(std::map<std::string,int>& families, int id, bool& created);
224 //MEDFileMesh::New(const std::string& fileName);
225 //MEDFileMesh::New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1);
226 MEDFileMesh::addFamily(const std::string& familyName, int id);
227 MEDFileMesh::addFamilyOnGrp(const std::string& grpName, const std::string& famName);
228 MEDFileMesh::advancedRepr() const = 0;
229 MEDFileMesh::areFamsEqual(const MEDFileMesh *other, std::string& what) const;
230 MEDFileMesh::areGrpsEqual(const MEDFileMesh *other, std::string& what) const;
231 MEDFileMesh::assignFamilyNameWithGroupName();
232 MEDFileMesh::changeFamilyId(int oldId, int newId);
233 MEDFileMesh::changeFamilyName(const std::string& oldName, const std::string& newName);
234 MEDFileMesh::changeGroupName(const std::string& oldName, const std::string& newName);
235 MEDFileMesh::copyFamGrpMapsFrom(const MEDFileMesh& other);
236 MEDFileMesh::createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName);
237 MEDFileMesh::existsFamily(const std::string& familyName) const;
238 MEDFileMesh::existsFamily(int famId) const;
239 MEDFileMesh::existsGroup(const std::string& groupName) const;
240 MEDFileMesh::findOrCreateAndGiveFamilyWithId(int id, bool& created);
241 MEDFileMesh::getDescription() const;
242 MEDFileMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
243 MEDFileMesh::getFamiliesIds(const std::vector<std::string>& famNames) const;
244 MEDFileMesh::getFamiliesIdsOnGroup(const std::string& name) const;
245 MEDFileMesh::getFamiliesNames() const;
246 MEDFileMesh::getFamiliesOnGroup(const std::string& name) const;
247 MEDFileMesh::getFamiliesOnGroups(const std::vector<std::string>& grps) const;
248 MEDFileMesh::getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
249 MEDFileMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
250 MEDFileMesh::getFamilyId(const std::string& name) const;
251 MEDFileMesh::getFamilyInfo() const;
252 MEDFileMesh::getFamilyNameGivenId(int id) const;
253 MEDFileMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
254 MEDFileMesh::getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
255 MEDFileMesh::getGroupInfo() const;
256 MEDFileMesh::getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
257 MEDFileMesh::getGroupsNames() const;
258 MEDFileMesh::getGroupsOnFamily(const std::string& name) const;
259 MEDFileMesh::getIteration() const;
260 MEDFileMesh::getMaxFamilyId() const;
261 MEDFileMesh::getMeshDimension() const;
262 MEDFileMesh::getName() const;
263 MEDFileMesh::getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
264 MEDFileMesh::getNodeFamilyArr(const std::string& fam, bool renum=false) const;
265 MEDFileMesh::getNodeGroupArr(const std::string& grp, bool renum=false) const;
266 MEDFileMesh::getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
267 MEDFileMesh::getNonEmptyLevels() const = 0;
268 MEDFileMesh::getNonEmptyLevelsExt() const = 0;
269 MEDFileMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
270 MEDFileMesh::getOrder() const;
271 MEDFileMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
272 MEDFileMesh::getSizeAtLevel(int meshDimRelToMaxExt) const;
273 MEDFileMesh::getTime(int& dt, int& it);
274 MEDFileMesh::getTimeUnit() const;
275 MEDFileMesh::getTimeValue() const;
276 MEDFileMesh::getUnivName() const;
277 MEDFileMesh::isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
278 MEDFileMesh::keepFamIdsOnlyOnLevs(const std::vector<int>& famIds, const std::vector<int>& levs);
279 MEDFileMesh::removeFamily(const std::string& name);
280 MEDFileMesh::removeGroup(const std::string& name);
281 MEDFileMesh::setDescription(const std::string& name);
282 MEDFileMesh::setFamiliesIdsOnGroup(const std::string& name, const std::vector<int>& famIds);
283 MEDFileMesh::setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams);
284 MEDFileMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
285 MEDFileMesh::setFamilyId(const std::string& familyName, int id);
286 MEDFileMesh::setFamilyInfo(const std::map<std::string,int>& info);
287 MEDFileMesh::setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
288 MEDFileMesh::setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayInt *>& grps, bool renum=false);
289 MEDFileMesh::setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps);
290 MEDFileMesh::setIteration(int it);
291 MEDFileMesh::setName(const std::string& name);
292 MEDFileMesh::setOrder(int order);
293 MEDFileMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
294 MEDFileMesh::setTime(int dt, int it, double time);
295 MEDFileMesh::setTimeUnit(const std::string& unit);
296 MEDFileMesh::setTimeValue(double time);
297 MEDFileMesh::setUnivName(const std::string& name);
298 MEDFileMesh::simpleRepr() const;
299 MEDFileMesh::write(const std::string& fileName, int mode) const;
300 MEDFileMesh::write(med_idt fid) const;
301 ///@}
302
303 /*! \name   Advanced API   */
304 ///@{
305 MEDFileMesh::clearNonDiscrAttributes() const;
306 ///@} 
307
308 /*! \name Others... */
309 ///@{
310 MEDFileMesh::ChangeAllGroupsContainingFamily(std::map<std::string, std::vector<std::string> >& groups, const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
311 MEDFileMesh::CreateNameNotIn(const std::string& nameTry, const std::vector<std::string>& namesToAvoid);
312 MEDFileMesh::MEDFileMesh();
313 MEDFileMesh::PutInThirdComponentOfCodeOffset(std::vector<int>& code, int strt);
314 MEDFileMesh::TranslateFamilyIds(int offset, DataArrayInt *famArr, std::vector< std::vector<int> >& famIdsPerGrp);
315 MEDFileMesh::addFamilyOnAllGroupsHaving(const std::string& famName, const std::string& otherFamName);
316 MEDFileMesh::appendFamilyEntries(const DataArrayInt *famIds, const std::vector< std::vector<int> >& fidsOfGrps, const std::vector<std::string>& grpNames);
317 MEDFileMesh::changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
318 MEDFileMesh::changeFamilyIdArr(int oldId, int newId);
319 MEDFileMesh::changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
320 MEDFileMesh::dealWithTinyInfo(const MEDCouplingMesh *m);
321 MEDFileMesh::deepCpy() const;
322 MEDFileMesh::ensureDifferentFamIdsPerLevel();
323 MEDFileMesh::getAllFamiliesIdsReferenced() const;
324 MEDFileMesh::getFamilyRepr(std::ostream& oss) const;
325 //MEDFileMesh::getHeapMemorySize() const;
326 MEDFileMesh::getMaxFamilyIdInArrays() const;
327 MEDFileMesh::getMinFamilyId() const;
328 MEDFileMesh::getMinFamilyIdInArrays() const;
329 MEDFileMesh::getNameFieldAtLevel(int meshDimRelToMaxExt) const;
330 MEDFileMesh::getNumberOfNodes() const;
331 MEDFileMesh::getTheMaxFamilyId() const;
332 MEDFileMesh::getTheMinFamilyId() const;
333 MEDFileMesh::normalizeFamIdsMEDFile();
334 MEDFileMesh::normalizeFamIdsTrio();
335 MEDFileMesh::setFamilyIdUnique(const std::string& familyName, int id);
336 MEDFileMesh::setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
337 MEDFileMesh::shallowCpy() const;
338 MEDFileMesh::synchronizeTinyInfoOnLeaves() const = 0;
339 MEDFileMesh::unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
340 MEDFileMesh::writeLL(med_idt fid) const;
341 int MEDFileMesh::_order;
342 int MEDFileMesh::_iteration;
343 double MEDFileMesh::_time;
344 std::string MEDFileMesh::_dt_unit;
345 std::string MEDFileMesh::_name;
346 std::string MEDFileMesh::_univ_name;
347 std::string MEDFileMesh::_desc_name;
348 std::map<std::string, std::vector<std::string> > MEDFileMesh::_groups;
349 std::map<std::string,int> MEDFileMesh::_families;
350 static const char MEDFileMesh::DFT_FAM_NAME[];
351 ///@} 
352 }
353