}
}
+std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingCMesh::getAllGeoTypes() const
+{
+ INTERP_KERNEL::NormalizedCellType ret;
+ switch(getMeshDimension())
+ {
+ case 3:
+ ret=INTERP_KERNEL::NORM_HEXA8;
+ case 2:
+ ret=INTERP_KERNEL::NORM_QUAD4;
+ case 1:
+ ret=INTERP_KERNEL::NORM_SEG2;
+ default:
+ throw INTERP_KERNEL::Exception("Unexpected dimension for MEDCouplingCMesh::getAllGeoTypes !");
+ }
+ std::set<INTERP_KERNEL::NormalizedCellType> ret2;
+ ret2.insert(ret);
+ return ret2;
+}
+
int MEDCouplingCMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
int ret=getNumberOfCells();
int getNodeIdFromPos(int i, int j, int k) const;
static void GetPosFromId(int nodeId, int spaceDim, const int *split, int *res);
INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
void getNodeIdsOfCell(int cellId, std::vector<int>& conn) const;
void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
return INTERP_KERNEL::CellModel::GetCellModel(tmp).getExtrudedType();
}
+std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingExtrudedMesh::getAllGeoTypes() const
+{
+ const std::set<INTERP_KERNEL::NormalizedCellType>& ret2D=_mesh2D->getAllTypes();
+ std::set<INTERP_KERNEL::NormalizedCellType> ret;
+ for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator it=ret2D.begin();it!=ret2D.end();it++)
+ ret.insert(INTERP_KERNEL::CellModel::GetCellModel(*it).getExtrudedType());
+ return ret;
+}
+
int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
int ret=0;
void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayInt *&cellCor) const throw(INTERP_KERNEL::Exception);
INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
void getNodeIdsOfCell(int cellId, std::vector<int>& conn) const;
void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
#include "NormalizedUnstructuredMesh.hxx"
#include "InterpKernelException.hxx"
+#include <set>
#include <vector>
namespace ParaMEDMEM
virtual DataArrayDouble *getBarycenterAndOwner() const = 0;
virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const = 0;
+ virtual std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const = 0;
virtual void getNodeIdsOfCell(int cellId, std::vector<int>& conn) const = 0;
virtual DataArrayInt *getCellIdsFullyIncludedInNodeIds(const int *partBg, const int *partEnd) const;
virtual void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const = 0;
updateTime();
}
+std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMesh::getAllGeoTypes() const
+{
+ return _types;
+}
+
/*!
* This method is a method that compares 'this' and 'other'.
* This method compares \b all attributes, even names and component names.
MEDCOUPLING_EXPORT void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void finishInsertingCells();
MEDCOUPLING_EXPORT const std::set<INTERP_KERNEL::NormalizedCellType>& getAllTypes() const { return _types; }
+ MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getTypesOfPart(const int *begin, const int *end) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true);
MEDCOUPLING_EXPORT const DataArrayInt *getNodalConnectivity() const { return _nodal_connec; }
return (INTERP_KERNEL::NormalizedCellType)desc_connec[desc_connec_index[cellId]+1];
}
+std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingUMeshDesc::getAllGeoTypes() const
+{
+ return _types;
+}
+
int MEDCouplingUMeshDesc::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
const int *desc_connec=_desc_connec->getConstPointer();
MEDCOUPLING_EXPORT int getFaceMeshLength() const;
MEDCOUPLING_EXPORT int getMeshDimension() const { return _mesh_dim; }
MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
+ MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
MEDCOUPLING_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
MEDCOUPLING_EXPORT void getNodeIdsOfCell(int cellId, std::vector<int>& conn) const;
MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
{ return ; }
self->rotate(c,v,alpha);
}
+
+ PyObject *getAllGeoTypes() const throw(INTERP_KERNEL::Exception)
+ {
+ std::set<INTERP_KERNEL::NormalizedCellType> result=self->getAllGeoTypes();
+ std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
+ PyObject *res=PyList_New(result.size());
+ for(int i=0;iL!=result.end(); i++, iL++)
+ PyList_SetItem(res,i,PyInt_FromLong(*iL));
+ return res;
+ }
}
};
}