1 // Copyright (C) 2013-2016 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 of DataArray* classes
22 // * groupping methods into "Basic API", "Advanced" and "Others..." sections
27 //================================================================================
29 * Checks if \a this and another MEDCouplingMesh are equal without considering
30 * textual data like mesh name, names of spatial components etc.
31 * \param [in] other - an instance of MEDCouplingMesh to compare with \a this one.
32 * \param [in] prec - precision value used to compare node coordinates.
33 * \return bool - \c true if the two meshes are equal, \c false else.
35 //================================================================================
37 bool MEDCouplingMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const {}
40 * Checks if \a this and \a other meshes are geometrically equivalent, else an
41 * exception is thrown. The meshes are
42 * considered equivalent if (1) \a this mesh contains the same nodes as the \a other
43 * mesh (with a specified precision) and (2) \a this mesh contains the same cells as
44 * the \a other mesh (with use of a specified cell comparison technique). The mapping
45 * from \a other to \a this for nodes and cells is returned via out parameters.
46 * \param [in] other - the mesh to compare with.
47 * \param [in] cellCompPol - id [0-2] of cell comparison method. See meaning of
48 * each method in description of MEDCouplingUMesh::zipConnectivityTraducer().
49 * \param [in] prec - the precision used to compare nodes of the two meshes.
50 * \param [out] cellCor - a cell permutation array in "Old to New" mode. The caller is
51 * to delete this array using decrRef() as it is no more needed.
52 * \param [out] nodeCor - a node permutation array in "Old to New" mode. The caller is
53 * to delete this array using decrRef() as it is no more needed.
54 * \throw If the two meshes do not match.
56 void MEDCouplingMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const throw(INTERP_KERNEL::Exception) {}
59 * Checks if \a this and \a other meshes are geometrically equivalent, else an
60 * exception is thrown. The meshes are considered equivalent if (1) they share the same
61 * node coordinates array(s) and (2) they contain the same cells (with use of a specified
62 * cell comparison technique). The mapping from cells of the \a other to ones of \a this
63 * is returned via an out parameter.
64 * \param [in] other - the mesh to compare with.
65 * \param [in] cellCompPol - id [0-2] of cell comparison method. See the meaning of
66 * each method in description of MEDCouplingUMesh::zipConnectivityTraducer().
67 * \param [in] prec - a not used parameter.
68 * \param [out] cellCor - the permutation array in "Old to New" mode. The caller is
69 * to delete this array using decrRef() as it is no more needed.
70 * \throw If the two meshes do not match.
72 void MEDCouplingMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,DataArrayInt *&cellCor) const throw(INTERP_KERNEL::Exception) {}
77 //================================================================================
78 /////////////////////// GROUPPING members of MEDCouplingMesh /////////////////////
79 //================================================================================
80 /*! \name Basic API */
82 MEDCouplingMesh::MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
83 MEDCouplingMesh::MergeMeshes(std::vector<const MEDCouplingMesh *>& meshes);
84 MEDCouplingMesh::checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,DataArrayInt *&cellCor) const;
85 MEDCouplingMesh::checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
86 MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const;
87 MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const;
88 MEDCouplingMesh::fillFromAnalytic2(TypeOfField t, int nbOfComp, const std::string& func) const;
89 MEDCouplingMesh::fillFromAnalytic3(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const;
90 MEDCouplingMesh::getCellsContainingPoint(const double *pos, double eps, std::vector<int>& elts) const;
91 MEDCouplingMesh::getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, std::vector<int>& elts, std::vector<int>& eltsIndex) const;
92 MEDCouplingMesh::isEqual(const MEDCouplingMesh *other, double prec) const;
93 MEDCouplingMesh::isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const = 0;
94 MEDCouplingMesh::writeVTK(const char *fileName) const;
97 /*! \name Advanced API */
99 MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const;
102 /*! \name Others... */
104 MEDCouplingMesh::GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
105 MEDCouplingMesh::GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
106 MEDCouplingMesh::MEDCouplingMesh();
107 MEDCouplingMesh::~MEDCouplingMesh();
108 MEDCouplingMesh::MEDCouplingMesh(const MEDCouplingMesh& other);
109 MEDCouplingMesh::advancedRepr() const = 0;
110 MEDCouplingMesh::areCompatibleForMerge(const MEDCouplingMesh *other) const;
111 MEDCouplingMesh::buildOrthogonalField() const = 0;
112 MEDCouplingMesh::buildPart(const int *start, const int *end) const = 0;
113 MEDCouplingMesh::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const = 0;
114 MEDCouplingMesh::buildUnstructured() const;
115 MEDCouplingMesh::checkCoherency() const;
116 MEDCouplingMesh::checkCoherency1(double eps=1e-12) const;
117 MEDCouplingMesh::checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
118 MEDCouplingMesh::checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec,DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
119 MEDCouplingMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const;
120 MEDCouplingMesh::computeIsoBarycenterOfNodesPerCell() const;
121 MEDCouplingMesh::computeNbOfNodesPerCell() const;
122 MEDCouplingMesh::copyTinyInfoFrom(const MEDCouplingMesh *other);
123 MEDCouplingMesh::copyTinyStringsFrom(const MEDCouplingMesh *other);
124 MEDCouplingMesh::deepCpy() const = 0;
125 MEDCouplingMesh::getAllGeoTypes() const = 0;
126 MEDCouplingMesh::getBarycenterAndOwner() const = 0;
127 MEDCouplingMesh::getBoundingBox(double *bbox) const = 0;
128 MEDCouplingMesh::getCellContainingPoint(const double *pos, double eps) const = 0;
129 MEDCouplingMesh::getCoordinatesAndOwner() const = 0;
130 MEDCouplingMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
131 MEDCouplingMesh::getDescription() const;
132 MEDCouplingMesh::getDistributionOfTypes() const;
133 // MEDCouplingMesh::getHeapMemorySize() const;
134 MEDCouplingMesh::getMeasureField(bool isAbs) const = 0;
135 MEDCouplingMesh::getMeasureFieldOnNode(bool isAbs) const = 0;
136 MEDCouplingMesh::getMeshDimension() const = 0;
137 MEDCouplingMesh::getName() const;
138 MEDCouplingMesh::getNodeIdsOfCell(int cellId, std::vector<int>& conn) const = 0;
139 MEDCouplingMesh::getNumberOfCells() const = 0;
140 MEDCouplingMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
141 MEDCouplingMesh::getNumberOfNodes() const = 0;
142 MEDCouplingMesh::getSpaceDimension() const = 0;
143 MEDCouplingMesh::getTime(int& iteration, int& order) const;
144 MEDCouplingMesh::getTimeUnit() const;
145 MEDCouplingMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
146 MEDCouplingMesh::getType() const = 0;
147 MEDCouplingMesh::getTypeOfCell(int cellId) const = 0;
148 MEDCouplingMesh::getVTKDataSetType() const;
149 MEDCouplingMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
150 MEDCouplingMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
151 MEDCouplingMesh::isStructured() const;
152 MEDCouplingMesh::mergeMyselfWith(const MEDCouplingMesh *other) const = 0;
153 MEDCouplingMesh::renumberCells(const int *old2NewBg, bool check=true);
154 MEDCouplingMesh::reprQuickOverview(std::ostream& stream) const;
155 MEDCouplingMesh::resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
156 MEDCouplingMesh::rotate(const double *center, const double *vector, double angle) = 0;
157 MEDCouplingMesh::scale(const double *point, double factor) = 0;
158 MEDCouplingMesh::serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const = 0;
159 MEDCouplingMesh::setDescription(const char *descr);
160 MEDCouplingMesh::setName(const char *name);
161 MEDCouplingMesh::setTime(double val, int iteration, int order);
162 MEDCouplingMesh::setTimeUnit(const char *unit);
163 MEDCouplingMesh::simpleRepr() const = 0;
164 MEDCouplingMesh::simplexize(int policy);
165 MEDCouplingMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const;
166 MEDCouplingMesh::translate(const double *vector) = 0;
167 MEDCouplingMesh::unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,const std::vector<std::string>& littleStrings) = 0;
168 //MEDCouplingMesh::writeVTKAdvanced(const char *fileName, const std::string& cda, const std::string& pda) const;
169 MEDCouplingMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const;
170 MEDCouplingMesh::_description;
171 MEDCouplingMesh::_iteration;
172 MEDCouplingMesh::_name;
173 MEDCouplingMesh::_order;
174 MEDCouplingMesh::_time;
175 MEDCouplingMesh::_time_unit;