-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "MEDCoupling.hxx"
#include "MEDCouplingStructuredMesh.hxx"
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class MEDCouplingCMesh;
MEDCOUPLING_EXPORT std::string getAxisUnit() const;
MEDCOUPLING_EXPORT double getMeasureOfAnyCell() const;
MEDCOUPLING_EXPORT MEDCouplingCMesh *convertToCartesian() const;
+ MEDCOUPLING_EXPORT void refineWithFactor(const std::vector<int>& factors);
+ MEDCOUPLING_EXPORT MEDCouplingIMesh *asSingleCell() const;
+ MEDCOUPLING_EXPORT static void CondenseFineToCoarse(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA);
+ MEDCOUPLING_EXPORT static void CondenseFineToCoarseGhost(const std::vector<int>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, DataArrayDouble *coarseDA, int ghostSize);
+ MEDCOUPLING_EXPORT static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts);
+ MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
+ MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<int>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
//
- MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const;
+ MEDCOUPLING_EXPORT MEDCouplingIMesh *deepCopy() const;
MEDCOUPLING_EXPORT MEDCouplingIMesh *clone(bool recDeepCpy) const;
+ MEDCOUPLING_EXPORT MEDCouplingIMesh *buildWithGhost(int ghostLev) const;
MEDCOUPLING_EXPORT void updateTime() const;
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
+ MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return IMAGE_GRID; }
MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const;
MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayInt *&cellCor) const;
- MEDCOUPLING_EXPORT void checkCoherency() const;
- MEDCOUPLING_EXPORT void checkCoherency1(double eps=1e-12) const;
- MEDCOUPLING_EXPORT void checkCoherency2(double eps=1e-12) const;
+ MEDCOUPLING_EXPORT void checkConsistencyLight() const;
+ MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
MEDCOUPLING_EXPORT int getSpaceDimension() const;
MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
MEDCOUPLING_EXPORT std::string simpleRepr() const;
MEDCOUPLING_EXPORT void scale(const double *point, double factor);
MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const;
+ MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
//some useful methods
- MEDCOUPLING_EXPORT void getSplitCellValues(int *res) const;
- MEDCOUPLING_EXPORT void getSplitNodeValues(int *res) const;
MEDCOUPLING_EXPORT void getNodeGridStructure(int *res) const;
MEDCOUPLING_EXPORT std::vector<int> getNodeGridStructure() const;
MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<int,int> >& cellPart) const;
MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<int>& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
private:
MEDCouplingIMesh();
- MEDCouplingIMesh(const MEDCouplingIMesh& other, bool deepCpy);
+ MEDCouplingIMesh(const MEDCouplingIMesh& other, bool deepCopy);
~MEDCouplingIMesh();
void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
std::string getVTKDataSetType() const;
std::vector<std::string> buildInfoOnComponents() const;
void checkSpaceDimension() const;
static void CheckSpaceDimension(int spaceDim);
+ static int FindIntRoot(int val, int order);
+ static void SpreadCoarseToFineGhost2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
+ static void SpreadCoarseToFineGhostZone2D(const double *inPtr, double *outPtr, int nbCompo, const std::vector<int>& coarseSt, const std::vector< std::pair<int,int> >& fineLocInCoarse, const std::vector<int>& facts, int ghostSize);
private:
int _space_dim;
double _origin[3];