1 // Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE
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/ or email : webmaster.salome@opencascade.com
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
28 * Sets the name of \a this mesh.
29 * \param [in] name - the new mesh name.
31 void MEDFileMesh::setName(const char *name) {}
33 * Returns the name of \a this mesh.
34 * \return const char* name - the mesh name.
36 const char *MEDFileMesh::getName() const {}
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.
41 void MEDFileMesh::setUnivName(const char *name) {}
43 * Returns the universal name of \a this mesh. The universal name uniquely identifies the mesh.
44 * \return const char * - the universal mesh name.
46 const char *MEDFileMesh::getUnivName() const {}
48 * Sets the description of \a this mesh.
49 * \param [in] name - the new mesh description.
51 void MEDFileMesh::setDescription(const char *name) {}
53 * Returns the description of \a this mesh.
54 * \return const char* - the mesh description.
56 const char *MEDFileMesh::getDescription() const {}
58 * Sets the order number of iteration of \a this mesh state.
59 * \param [in] order - the order number.
61 void MEDFileMesh::setOrder(int order) {}
63 * Returns the order number of iteration of \a this mesh state.
64 * \return int - the order number.
66 int MEDFileMesh::getOrder() const {}
68 * Sets the number of iteration of \a this mesh state.
69 * \param [in] it - the iteration number.
71 void MEDFileMesh::setIteration(int it) {}
73 * Returns the number of iteration of \a this mesh state.
74 * \return int - the iteration number.
76 int MEDFileMesh::getIteration() const {}
78 * Sets the time of \a this mesh state.
79 * \param [in] val - the time value.
81 void MEDFileMesh::setTimeValue(double time) {}
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.
89 void MEDFileMesh::setTime(int dt, int it, double time) {}
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.
97 double MEDFileMesh::getTime(int& dt, int& it) {}
99 * Returns the time of \a this mesh state.
100 * \return double - the time value.
102 double MEDFileMesh::getTimeValue() const {}
104 * Sets units in which the time is measured.
105 * \param [in] unit - the time unit name.
107 void MEDFileMesh::setTimeUnit(const char *unit) {}
109 * Returns units in which the time is measured.
110 * \return const char * - the time unit name.
112 const char *MEDFileMesh::getTimeUnit() const {}
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.
117 const std::map<std::string,int>& MEDFileMesh::getFamilyInfo() const {}
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.
123 const std::map<std::string, std::vector<std::string> >& MEDFileMesh::getGroupInfo() const {}
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.
128 std::vector<int> MEDFileMesh::getNonEmptyLevels() const {}
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.
133 std::vector<int> MEDFileMesh::getNonEmptyLevelsExt() const {}
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.
140 int MEDFileMesh::getSizeAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
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.
151 MEDCouplingMesh *MEDFileMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const throw(INTERP_KERNEL::Exception) {}
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.
157 int MEDFileMesh::getMeshDimension() const throw(INTERP_KERNEL::Exception) {}
159 * Returns a full textual description of \a this mesh.
160 * \return std::string - the string holding the mesh description.
162 std::string MEDFileMesh::advancedRepr() const {}
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.
171 void MEDFileMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr) throw(INTERP_KERNEL::Exception) {}
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.
179 void MEDFileMesh::setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr) throw(INTERP_KERNEL::Exception) {}
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.
186 const DataArrayInt *MEDFileMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
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.
193 const DataArrayInt *MEDFileMesh::getNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
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.
202 const DataArrayInt *MEDFileMesh::getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception) {}
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
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.
215 DataArrayInt *MEDFileMesh::getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception) {}
221 /*! \name Basic API */
223 MEDFileMesh::FindOrCreateAndGiveFamilyWithId(std::map<std::string,int>& families, int id, bool& created);
224 MEDFileMesh::New(const char *fileName);
225 MEDFileMesh::New(const char *fileName, const char *mName, int dt=-1, int it=-1);
226 MEDFileMesh::addFamily(const char *familyName, int id);
227 MEDFileMesh::addFamilyOnGrp(const char *grpName, const char *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 char *oldName, const char *newName);
234 MEDFileMesh::changeGroupName(const char *oldName, const char *newName);
235 MEDFileMesh::copyFamGrpMapsFrom(const MEDFileMesh& other);
236 MEDFileMesh::createGroupOnAll(int meshDimRelToMaxExt, const char *groupName);
237 MEDFileMesh::existsFamily(const char *familyName) const;
238 MEDFileMesh::existsFamily(int famId) const;
239 MEDFileMesh::existsGroup(const char *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 char *name) const;
245 MEDFileMesh::getFamiliesNames() const;
246 MEDFileMesh::getFamiliesOnGroup(const char *name) const;
247 MEDFileMesh::getFamiliesOnGroups(const std::vector<std::string>& grps) const;
248 MEDFileMesh::getFamilyArr(int meshDimRelToMaxExt, const char *fam, bool renum=false) const;
249 MEDFileMesh::getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
250 MEDFileMesh::getFamilyId(const char *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 char *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 char *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 char *fam, bool renum=false) const;
265 MEDFileMesh::getNodeGroupArr(const char *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 char *name);
280 MEDFileMesh::removeGroup(const char *name);
281 MEDFileMesh::setDescription(const char *name);
282 MEDFileMesh::setFamiliesIdsOnGroup(const char *name, const std::vector<int>& famIds);
283 MEDFileMesh::setFamiliesOnGroup(const char *name, const std::vector<std::string>& fams);
284 MEDFileMesh::setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
285 MEDFileMesh::setFamilyId(const char *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 char *famName, const std::vector<std::string>& grps);
290 MEDFileMesh::setIteration(int it);
291 MEDFileMesh::setName(const char *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 char *unit);
296 MEDFileMesh::setTimeValue(double time);
297 MEDFileMesh::setUnivName(const char *name);
298 MEDFileMesh::simpleRepr() const;
299 MEDFileMesh::write(const char *fileName, int mode) const;
300 MEDFileMesh::write(med_idt fid) const;
303 /*! \name Advanced API */
305 MEDFileMesh::clearNonDiscrAttributes() const;
308 /*! \name Others... */
310 MEDFileMesh::ChangeAllGroupsContainingFamily(std::map<std::string, std::vector<std::string> >& groups, const char *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 char *famName, const char *otherFamName);
316 MEDFileMesh::appendFamilyEntries(const DataArrayInt *famIds, const std::vector< std::vector<int> >& fidsOfGrps, const std::vector<std::string>& grpNames);
317 MEDFileMesh::changeAllGroupsContainingFamily(const char *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 char *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[];