namespace INTERP_KERNEL
{
- class Exception : public std::exception
+ class INTERPKERNEL_EXPORT Exception : public std::exception
{
public:
- INTERPKERNEL_EXPORT Exception(const char *reason);
- INTERPKERNEL_EXPORT Exception(const std::string& reason);
- INTERPKERNEL_EXPORT Exception(const char *reason, const char *file, int line);
- INTERPKERNEL_EXPORT ~Exception() noexcept(true);
- INTERPKERNEL_EXPORT const char *what() const noexcept(true);
+ Exception(const char *reason);
+ Exception(const std::string& reason);
+ Exception(const char *reason, const char *file, int line);
+ ~Exception() noexcept(true);
+ const char *what() const noexcept(true);
protected:
std::string _reason;
};
/*!
* This class describes all static elements (different from polygons and polyhedron) 3D, 2D and 1D.
*/
- class CellModel
+ class INTERPKERNEL_EXPORT CellModel
{
public:
static const unsigned MAX_NB_OF_SONS=8;
CellModel(NormalizedCellType type);
static void buildUniqueInstance();
public:
- INTERPKERNEL_EXPORT static const CellModel& GetCellModel(NormalizedCellType type);
- INTERPKERNEL_EXPORT NormalizedCellType getEnum() const { return _type; }
- INTERPKERNEL_EXPORT const char *getRepr() const;
- INTERPKERNEL_EXPORT bool isExtruded() const { return _is_extruded; }
- INTERPKERNEL_EXPORT bool isDynamic() const { return _dyn; }
- INTERPKERNEL_EXPORT bool isQuadratic() const { return _quadratic; }
- INTERPKERNEL_EXPORT unsigned getDimension() const { return _dim; }
- INTERPKERNEL_EXPORT bool isCompatibleWith(NormalizedCellType type) const;
- INTERPKERNEL_EXPORT bool isSimplex() const { return _is_simplex; }
+ static const CellModel& GetCellModel(NormalizedCellType type);
+ NormalizedCellType getEnum() const { return _type; }
+ const char *getRepr() const;
+ bool isExtruded() const { return _is_extruded; }
+ bool isDynamic() const { return _dyn; }
+ bool isQuadratic() const { return _quadratic; }
+ unsigned getDimension() const { return _dim; }
+ bool isCompatibleWith(NormalizedCellType type) const;
+ isSimplex() const { return _is_simplex; }
//! sonId is in C format.
- INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; }
- INTERPKERNEL_EXPORT const unsigned *getNodesConstituentTheLittleSon(unsigned littleSonId) const { return _little_sons_con[littleSonId]; }
- INTERPKERNEL_EXPORT bool getOrientationStatus(mcIdType lgth, const mcIdType *conn1, const mcIdType *conn2) const;
- INTERPKERNEL_EXPORT unsigned getNumberOfNodes() const { return _nb_of_pts; }
- INTERPKERNEL_EXPORT unsigned getNumberOfSons() const { return _nb_of_sons; }
- INTERPKERNEL_EXPORT unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const;
- INTERPKERNEL_EXPORT unsigned getNumberOfEdgesIn3D(const mcIdType *conn, mcIdType lgth) const;
- INTERPKERNEL_EXPORT unsigned getNumberOfMicroEdges() const;
- INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
- INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, mcIdType lgth) const;
- INTERPKERNEL_EXPORT NormalizedCellType getExtrudedType() const { return _extruded_type; }
- INTERPKERNEL_EXPORT NormalizedCellType getCorrespondingPolyType() const;
- INTERPKERNEL_EXPORT NormalizedCellType getReverseExtrudedType() const { return _reverse_extruded_type; }
- INTERPKERNEL_EXPORT NormalizedCellType getLinearType() const { return _linear_type; }
- INTERPKERNEL_EXPORT NormalizedCellType getQuadraticType() const { return _quadratic_type; }
- INTERPKERNEL_EXPORT NormalizedCellType getQuadraticType2() const { return _quadratic_type2; }
- INTERPKERNEL_EXPORT NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
- INTERPKERNEL_EXPORT NormalizedCellType getSonType2(unsigned sonId) const;
- INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const;
- INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
- INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
- INTERPKERNEL_EXPORT unsigned fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
- INTERPKERNEL_EXPORT unsigned fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
- INTERPKERNEL_EXPORT void changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const;
- INTERPKERNEL_EXPORT void changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const;
- INTERPKERNEL_EXPORT DiameterCalculator *buildInstanceOfDiameterCalulator(int spaceDim) const;
- INTERPKERNEL_EXPORT OrientationInverter *buildOrientationInverter() const;
+ const unsigned *getNodesConstituentTheSon(unsigned sonId) const { return _sons_con[sonId]; }
+ const unsigned *getNodesConstituentTheLittleSon(unsigned littleSonId) const { return _little_sons_con[littleSonId]; }
+ bool getOrientationStatus(mcIdType lgth, const mcIdType *conn1, const mcIdType *conn2) const;
+ unsigned getNumberOfNodes() const { return _nb_of_pts; }
+ unsigned getNumberOfSons() const { return _nb_of_sons; }
+ unsigned getNumberOfSons2(const mcIdType *conn, mcIdType lgth) const;
+ unsigned getNumberOfEdgesIn3D(const mcIdType *conn, mcIdType lgth) const;
+ unsigned getNumberOfMicroEdges() const;
+ unsigned getNumberOfNodesConstituentTheSon(unsigned sonId) const { return _nb_of_sons_con[sonId]; }
+ unsigned getNumberOfNodesConstituentTheSon2(unsigned sonId, const mcIdType *nodalConn, mcIdType lgth) const;
+ NormalizedCellType getExtrudedType() const { return _extruded_type; }
+ NormalizedCellType getCorrespondingPolyType() const;
+ NormalizedCellType getReverseExtrudedType() const { return _reverse_extruded_type; }
+ NormalizedCellType getLinearType() const { return _linear_type; }
+ NormalizedCellType getQuadraticType() const { return _quadratic_type; }
+ NormalizedCellType getQuadraticType2() const { return _quadratic_type2; }
+ NormalizedCellType getSonType(unsigned sonId) const { return _sons_type[sonId]; }
+ NormalizedCellType getSonType2(unsigned sonId) const;
+ unsigned fillSonCellNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn) const;
+ unsigned fillSonCellNodalConnectivity2(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+ unsigned fillSonCellNodalConnectivity4(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+ unsigned fillSonEdgesNodalConnectivity3D(int sonId, const mcIdType *nodalConn, mcIdType lgth, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+ unsigned fillMicroEdgeNodalConnectivity(int sonId, const mcIdType *nodalConn, mcIdType *sonNodalConn, NormalizedCellType& typeOfSon) const;
+ void changeOrientationOf2D(mcIdType *nodalConn, unsigned int sz) const;
+ void changeOrientationOf1D(mcIdType *nodalConn, unsigned int sz) const;
+ DiameterCalculator *buildInstanceOfDiameterCalulator(int spaceDim) const;
+ OrientationInverter *buildOrientationInverter() const;
private:
bool _dyn;
bool _quadratic;
class DiameterCalculator
{
public:
- INTERPKERNEL_EXPORT virtual ~DiameterCalculator() { }
+ virtual ~DiameterCalculator() { }
INTERPKERNEL_EXPORT virtual NormalizedCellType getType() const = 0;
INTERPKERNEL_EXPORT virtual double computeForOneCell(const mcIdType *bg, const mcIdType *endd, const double *coordsPtr) const = 0;
INTERPKERNEL_EXPORT virtual void computeForListOfCellIdsUMeshFrmt(const mcIdType *bgIds, const mcIdType *endIds, const mcIdType *indPtr, const mcIdType *connPtr, const double *coordsPtr, double *resPtr) const = 0;
{
class ValueDouble;
- class LeafExpr
+ class INTERPKERNEL_EXPORT LeafExpr
{
public:
- INTERPKERNEL_EXPORT virtual ~LeafExpr();
- INTERPKERNEL_EXPORT virtual double getDoubleValue() const = 0;
- INTERPKERNEL_EXPORT virtual void fillValue(Value *val) const = 0;
- INTERPKERNEL_EXPORT virtual void compileX86(std::vector<std::string>& ass) const = 0;
- INTERPKERNEL_EXPORT virtual void compileX86_64(std::vector<std::string>& ass) const = 0;
- INTERPKERNEL_EXPORT virtual void replaceValues(const std::vector<double>& valuesInExpr) = 0;
- INTERPKERNEL_EXPORT virtual LeafExpr *deepCopy() const = 0;
- INTERPKERNEL_EXPORT static LeafExpr *buildInstanceFrom(const std::string& expr);
+ virtual ~LeafExpr();
+ virtual double getDoubleValue() const = 0;
+ virtual void fillValue(Value *val) const = 0;
+ virtual void compileX86(std::vector<std::string>& ass) const = 0;
+ virtual void compileX86_64(std::vector<std::string>& ass) const = 0;
+ virtual void replaceValues(const std::vector<double>& valuesInExpr) = 0;
+ virtual LeafExpr *deepCopy() const = 0;
+ static LeafExpr *buildInstanceFrom(const std::string& expr);
};
- class LeafExprVal : public LeafExpr
+ class INTERPKERNEL_EXPORT LeafExprVal : public LeafExpr
{
public:
- INTERPKERNEL_EXPORT LeafExprVal(double value);
- INTERPKERNEL_EXPORT ~LeafExprVal();
- INTERPKERNEL_EXPORT double getDoubleValue() const;
- INTERPKERNEL_EXPORT void compileX86(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT void compileX86_64(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT void fillValue(Value *val) const;
- INTERPKERNEL_EXPORT void replaceValues(const std::vector<double>& valuesInExpr);
- INTERPKERNEL_EXPORT LeafExprVal *deepCopy() const;
+ LeafExprVal(double value);
+ ~LeafExprVal();
+ double getDoubleValue() const;
+ void compileX86(std::vector<std::string>& ass) const;
+ void compileX86_64(std::vector<std::string>& ass) const;
+ void fillValue(Value *val) const;
+ void replaceValues(const std::vector<double>& valuesInExpr);
+ LeafExprVal *deepCopy() const;
private:
double _value;
};
- class LeafExprVar : public LeafExpr
+ class INTERPKERNEL_EXPORT LeafExprVar : public LeafExpr
{
public:
- INTERPKERNEL_EXPORT LeafExprVar(const LeafExprVar& other):_fast_pos(other._fast_pos),_ref_pos(other._ref_pos),_var_name(other._var_name),_val(other._val) { }
- INTERPKERNEL_EXPORT LeafExprVar(const std::string& var);
- INTERPKERNEL_EXPORT ~LeafExprVar();
- INTERPKERNEL_EXPORT double getDoubleValue() const;
- INTERPKERNEL_EXPORT void compileX86(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT void compileX86_64(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT void fillValue(Value *val) const;
- INTERPKERNEL_EXPORT std::string getVar() const { return _var_name; }
- INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo) const;
- INTERPKERNEL_EXPORT void prepareExprEvaluationDouble(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo, int refPos, const double *ptOfInputStart, const double *ptOfInputEnd) const;
- INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const;
- INTERPKERNEL_EXPORT void replaceValues(const std::vector<double>& valuesInExpr);
- INTERPKERNEL_EXPORT static bool isRecognizedKeyVar(const std::string& var, int& pos);
- INTERPKERNEL_EXPORT LeafExprVar *deepCopy() const;
+ LeafExprVar(const LeafExprVar& other):_fast_pos(other._fast_pos),_ref_pos(other._ref_pos),_var_name(other._var_name),_val(other._val) { }
+ LeafExprVar(const std::string& var);
+ ~LeafExprVar();
+ double getDoubleValue() const;
+ void compileX86(std::vector<std::string>& ass) const;
+ void compileX86_64(std::vector<std::string>& ass) const;
+ void fillValue(Value *val) const;
+ std::string getVar() const { return _var_name; }
+ void prepareExprEvaluation(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo) const;
+ void prepareExprEvaluationDouble(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo, int refPos, const double *ptOfInputStart, const double *ptOfInputEnd) const;
+ void prepareExprEvaluationVec() const;
+ void replaceValues(const std::vector<double>& valuesInExpr);
+ static bool isRecognizedKeyVar(const std::string& var, int& pos);
+ LeafExprVar *deepCopy() const;
public:
static const char END_OF_RECOGNIZED_VAR[];
private:
mutable const double *_val;
};
- class ExprParserOfEval
+ class INTERPKERNEL_EXPORT ExprParserOfEval
{
public:
ExprParserOfEval():_leaf(0) { }
std::vector<Function *> _funcs;
};
- class ExprParser
+ class INTERPKERNEL_EXPORT ExprParser
{
public:
- INTERPKERNEL_EXPORT ExprParser(ExprParser&& other);
- INTERPKERNEL_EXPORT ExprParser& operator=(ExprParser&& other);
- INTERPKERNEL_EXPORT ExprParser(const std::string& expr, ExprParser *father=0);
- INTERPKERNEL_EXPORT ExprParser(const char *expr, int lgth, ExprParser *father=0);
- INTERPKERNEL_EXPORT ~ExprParser();
- INTERPKERNEL_EXPORT void parse();
- INTERPKERNEL_EXPORT bool isParsingSuccessfull() const { return _is_parsing_ok; }
- INTERPKERNEL_EXPORT double evaluate() const;
- INTERPKERNEL_EXPORT DecompositionInUnitBase evaluateUnit() const;
- INTERPKERNEL_EXPORT void prepareExprEvaluation(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo) const;
- INTERPKERNEL_EXPORT void prepareExprEvaluationDouble(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo, int refPos, const double *ptOfInputStart, const double *ptOfInputEnd) const;
- INTERPKERNEL_EXPORT void prepareFastEvaluator() const;
- INTERPKERNEL_EXPORT void prepareExprEvaluationVec() const;
- INTERPKERNEL_EXPORT double evaluateDouble() const;
- INTERPKERNEL_EXPORT void evaluateDoubleInternal(std::vector<double>& stck) const { _for_eval.evaluateDoubleInternal(stck); }
- INTERPKERNEL_EXPORT void evaluateDoubleInternalSafe(std::vector<double>& stck) const { _for_eval.evaluateDoubleInternalSafe(stck); }
- INTERPKERNEL_EXPORT void checkForEvaluation() const;
- INTERPKERNEL_EXPORT void evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const;
- INTERPKERNEL_EXPORT void getSetOfVars(std::set<std::string>& vars) const;
- INTERPKERNEL_EXPORT void getTrueSetOfVars(std::set<std::string>& vars) const;
+ ExprParser(ExprParser&& other);
+ ExprParser& operator=(ExprParser&& other);
+ ExprParser(const std::string& expr, ExprParser *father=0);
+ ExprParser(const char *expr, int lgth, ExprParser *father=0);
+ ~ExprParser();
+ void parse();
+ bool isParsingSuccessfull() const { return _is_parsing_ok; }
+ double evaluate() const;
+ DecompositionInUnitBase evaluateUnit() const;
+ void prepareExprEvaluation(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo) const;
+ void prepareExprEvaluationDouble(const std::vector<std::string>& vars, int nbOfCompo, int targetNbOfCompo, int refPos, const double *ptOfInputStart, const double *ptOfInputEnd) const;
+ void prepareFastEvaluator() const;
+ void prepareExprEvaluationVec() const;
+ double evaluateDouble() const;
+ void evaluateDoubleInternal(std::vector<double>& stck) const { _for_eval.evaluateDoubleInternal(stck); }
+ void evaluateDoubleInternalSafe(std::vector<double>& stck) const { _for_eval.evaluateDoubleInternalSafe(stck); }
+ void checkForEvaluation() const;
+ void evaluateExpr(int szOfOutParam, const double *inParam, double *outParam) const;
+ void getSetOfVars(std::set<std::string>& vars) const;
+ void getTrueSetOfVars(std::set<std::string>& vars) const;
//
- INTERPKERNEL_EXPORT char *compileX86() const;
- INTERPKERNEL_EXPORT char *compileX86_64() const;
- INTERPKERNEL_EXPORT void compileX86LowLev(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT void compileX86_64LowLev(std::vector<std::string>& ass) const;
- INTERPKERNEL_EXPORT int getStackSizeToPlayX86(const ExprParser *asker) const;
+ char *compileX86() const;
+ char *compileX86_64() const;
+ void compileX86LowLev(std::vector<std::string>& ass) const;
+ void compileX86_64LowLev(std::vector<std::string>& ass) const;
+ int getStackSizeToPlayX86(const ExprParser *asker) const;
//
- INTERPKERNEL_EXPORT static std::string buildStringFromFortran(const char *expr, int lgth);
- INTERPKERNEL_EXPORT static std::string deleteWhiteSpaces(const std::string& expr);
+ static std::string buildStringFromFortran(const char *expr, int lgth);
+ static std::string deleteWhiteSpaces(const std::string& expr);
private:
Value *evaluateLowLev(Value *valGen) const;
void reverseThis();
namespace INTERP_KERNEL
{
- class UnitDataBase
+ class INTERPKERNEL_EXPORT UnitDataBase
{
public:
- INTERPKERNEL_EXPORT UnitDataBase();
- INTERPKERNEL_EXPORT const short *getInfoForUnit(const std::string& unit, double& addFact, double& mFact) const;
- INTERPKERNEL_EXPORT static UnitDataBase _uniqueMapForExpr;
- INTERPKERNEL_EXPORT static const int SIZE_OF_UNIT_BASE=5;
+ UnitDataBase();
+ const short *getInfoForUnit(const std::string& unit, double& addFact, double& mFact) const;
+ static UnitDataBase _uniqueMapForExpr;
+ static const int SIZE_OF_UNIT_BASE=5;
private:
std::map<std::string,double> _prefix_pow_10;
std::map<std::string,const short *> _units_semantic;
static const double ADD_COEFF[NB_OF_UNITS_RECOGN];
};
- class DecompositionInUnitBase
+ class INTERPKERNEL_EXPORT DecompositionInUnitBase
{
public:
- INTERPKERNEL_EXPORT DecompositionInUnitBase();
- INTERPKERNEL_EXPORT void setInfo(const short *vals, double addFact, double mFact);
- INTERPKERNEL_EXPORT short operator[](int i) const { return _value[i]; }
- INTERPKERNEL_EXPORT bool operator==(const DecompositionInUnitBase& other) const;
- INTERPKERNEL_EXPORT void getTranslationParams(const DecompositionInUnitBase& other, double& mul, double& add) const;
- INTERPKERNEL_EXPORT bool isEqual(short mass, short lgth, short time, short intensity, short temp,
+ DecompositionInUnitBase();
+ void setInfo(const short *vals, double addFact, double mFact);
+ short operator[](int i) const { return _value[i]; }
+ bool operator==(const DecompositionInUnitBase& other) const;
+ void getTranslationParams(const DecompositionInUnitBase& other, double& mul, double& add) const;
+ bool isEqual(short mass, short lgth, short time, short intensity, short temp,
double add, double mult);
- INTERPKERNEL_EXPORT bool isUnitary() const;
+ bool isUnitary() const;
//! \b WARNING no test is done on the fact that unit is adimensionnal.
- INTERPKERNEL_EXPORT void negate();
- INTERPKERNEL_EXPORT bool isAdimensional() const;
- INTERPKERNEL_EXPORT void tryToConvertInUnit(double val);
- INTERPKERNEL_EXPORT DecompositionInUnitBase &operator*(const DecompositionInUnitBase& other);
- INTERPKERNEL_EXPORT DecompositionInUnitBase &operator/(const DecompositionInUnitBase& other);
- INTERPKERNEL_EXPORT DecompositionInUnitBase &operator^(const DecompositionInUnitBase& other);
+ void negate();
+ bool isAdimensional() const;
+ void tryToConvertInUnit(double val);
+ DecompositionInUnitBase &operator*(const DecompositionInUnitBase& other);
+ DecompositionInUnitBase &operator/(const DecompositionInUnitBase& other);
+ DecompositionInUnitBase &operator^(const DecompositionInUnitBase& other);
private:
void dealWithAddFactor(const DecompositionInUnitBase& other);
static int couldItBeConsideredAsInt(double val);
* dimension 3 stands for elec intensity A.
* dimension 4 stands for temperature in K.
*/
- class Unit
+ class INTERPKERNEL_EXPORT Unit
{
public:
- INTERPKERNEL_EXPORT Unit(const char *reprC, bool tryToInterp=true);
- INTERPKERNEL_EXPORT Unit(const char *reprFortran, int sizeOfRepr, bool tryToInterp=true);
- INTERPKERNEL_EXPORT void tryToInterprate() const;
- INTERPKERNEL_EXPORT bool isInterpretationOK() const;
- INTERPKERNEL_EXPORT bool isCompatibleWith(const Unit& other) const;
- INTERPKERNEL_EXPORT double convert(const Unit& target, double sourceVal) const;
- INTERPKERNEL_EXPORT std::string getCoarseRepr() const;
+ Unit(const char *reprC, bool tryToInterp=true);
+ Unit(const char *reprFortran, int sizeOfRepr, bool tryToInterp=true);
+ void tryToInterprate() const;
+ bool isInterpretationOK() const;
+ bool isCompatibleWith(const Unit& other) const;
+ double convert(const Unit& target, double sourceVal) const;
+ std::string getCoarseRepr() const;
private:
std::string _coarse_repr;
mutable bool _is_interpreted;
double _data;
};
- class ValueUnit : public Value
+ class INTERPKERNEL_EXPORT ValueUnit : public Value
{
public:
- INTERPKERNEL_EXPORT ValueUnit();
- INTERPKERNEL_EXPORT Value *newInstance() const;
- INTERPKERNEL_EXPORT void setDouble(double val);
- INTERPKERNEL_EXPORT void setVarname(int fastPos, const std::string& var);
+ ValueUnit();
+ Value *newInstance() const;
+ void setDouble(double val);
+ void setVarname(int fastPos, const std::string& var);
//
- INTERPKERNEL_EXPORT DecompositionInUnitBase getData() const { return _data; }
- INTERPKERNEL_EXPORT void positive();
- INTERPKERNEL_EXPORT void negate();
- INTERPKERNEL_EXPORT void sqrt();
- INTERPKERNEL_EXPORT void cos();
- INTERPKERNEL_EXPORT void sin();
- INTERPKERNEL_EXPORT void tan();
- INTERPKERNEL_EXPORT void acos();
- INTERPKERNEL_EXPORT void asin();
- INTERPKERNEL_EXPORT void atan();
- INTERPKERNEL_EXPORT void cosh();
- INTERPKERNEL_EXPORT void sinh();
- INTERPKERNEL_EXPORT void tanh();
- INTERPKERNEL_EXPORT void abs();
- INTERPKERNEL_EXPORT void exp();
- INTERPKERNEL_EXPORT void ln();
- INTERPKERNEL_EXPORT void log10();
+ DecompositionInUnitBase getData() const { return _data; }
+ void positive();
+ void negate();
+ void sqrt();
+ void cos();
+ void sin();
+ void tan();
+ void acos();
+ void asin();
+ void atan();
+ void cosh();
+ void sinh();
+ void tanh();
+ void abs();
+ void exp();
+ void ln();
+ void log10();
//
- INTERPKERNEL_EXPORT Value *plus(const Value *other) const;
- INTERPKERNEL_EXPORT Value *minus(const Value *other) const;
- INTERPKERNEL_EXPORT Value *mult(const Value *other) const;
- INTERPKERNEL_EXPORT Value *div(const Value *other) const;
- INTERPKERNEL_EXPORT Value *pow(const Value *other) const;
- INTERPKERNEL_EXPORT Value *max(const Value *other) const;
- INTERPKERNEL_EXPORT Value *min(const Value *other) const;
- INTERPKERNEL_EXPORT Value *greaterThan(const Value *other) const;
- INTERPKERNEL_EXPORT Value *lowerThan(const Value *other) const;
+ Value *plus(const Value *other) const;
+ Value *minus(const Value *other) const;
+ Value *mult(const Value *other) const;
+ Value *div(const Value *other) const;
+ Value *pow(const Value *other) const;
+ Value *max(const Value *other) const;
+ Value *min(const Value *other) const;
+ Value *greaterThan(const Value *other) const;
+ Value *lowerThan(const Value *other) const;
//
- INTERPKERNEL_EXPORT Value *ifFunc(const Value *the, const Value *els) const;
+ Value *ifFunc(const Value *the, const Value *els) const;
private:
ValueUnit(const DecompositionInUnitBase& unit);
static void unsupportedOp(const char *type);
INTERPKERNEL_EXPORT int getGaussCoordDim() const;
INTERPKERNEL_EXPORT int getReferenceCoordDim() const;
- INTERPKERNEL_EXPORT DataVector getGaussCoords() const { return _my_gauss_coord; }
- INTERPKERNEL_EXPORT DataVector getRefCoords() const { return _my_reference_coord; }
- INTERPKERNEL_EXPORT NormalizedCellType getGeoType() const { return _my_geometry; }
+ DataVector getGaussCoords() const { return _my_gauss_coord; }
+ DataVector getRefCoords() const { return _my_reference_coord; }
+ NormalizedCellType getGeoType() const { return _my_geometry; }
INTERPKERNEL_EXPORT int getNbGauss() const;
INTERPKERNEL_EXPORT int getNbRef() const;
/*!
* Asumption is done with this iterator that we iterate on a container containing more than one edge.
*/
- class IteratorOnComposedEdge
+ class INTERPKERNEL_EXPORT IteratorOnComposedEdge
{
friend class ComposedEdge;
friend class ElementaryEdge;
friend class QuadraticPolygon;
public:
- INTERPKERNEL_EXPORT IteratorOnComposedEdge();
- INTERPKERNEL_EXPORT IteratorOnComposedEdge(ComposedEdge *compEdges);
- INTERPKERNEL_EXPORT bool isValid() const { return _list_handle!=0; }
- INTERPKERNEL_EXPORT void operator=(const IteratorOnComposedEdge& other);
- INTERPKERNEL_EXPORT void first() { _deep_it=_list_handle->begin(); }
- INTERPKERNEL_EXPORT void next() { _deep_it++; }
- INTERPKERNEL_EXPORT void last();
- INTERPKERNEL_EXPORT void nextLoop();
- INTERPKERNEL_EXPORT void previousLoop();
- INTERPKERNEL_EXPORT bool finished() const { return _deep_it==_list_handle->end(); }
- INTERPKERNEL_EXPORT bool goToNextInOn(bool direction, int& i, int nbMax);
- INTERPKERNEL_EXPORT ElementaryEdge *current() { return *_deep_it; }
- INTERPKERNEL_EXPORT void assignMySelfToAllElems(ComposedEdge *elems);
- INTERPKERNEL_EXPORT void insertElemEdges(ComposedEdge *elems, bool changeMySelf);
- INTERPKERNEL_EXPORT void eraseCurrent();
+ IteratorOnComposedEdge();
+ IteratorOnComposedEdge(ComposedEdge *compEdges);
+ bool isValid() const { return _list_handle!=0; }
+ void operator=(const IteratorOnComposedEdge& other);
+ void first() { _deep_it=_list_handle->begin(); }
+ void next() { _deep_it++; }
+ void last();
+ void nextLoop();
+ void previousLoop();
+ bool finished() const { return _deep_it==_list_handle->end(); }
+ bool goToNextInOn(bool direction, int& i, int nbMax);
+ ElementaryEdge *current() { return *_deep_it; }
+ void assignMySelfToAllElems(ComposedEdge *elems);
+ void insertElemEdges(ComposedEdge *elems, bool changeMySelf);
+ void eraseCurrent();
private:
std::list<ElementaryEdge *>::iterator _deep_it;
std::list<ElementaryEdge *>* _list_handle;
* The set is assumed to be connected, but not necessarily closed (i.e. not necessarily forming a closed polygon).
* Some methods however requires a closed form.
*/
- class ComposedEdge
+ class INTERPKERNEL_EXPORT ComposedEdge
{
friend class IteratorOnComposedEdge;
public:
- INTERPKERNEL_EXPORT ComposedEdge() { }
- INTERPKERNEL_EXPORT ComposedEdge(const ComposedEdge& other);
- INTERPKERNEL_EXPORT ComposedEdge(int sz):_sub_edges(sz) { }
- INTERPKERNEL_EXPORT static void Delete(ComposedEdge *pt) { delete pt; }
- INTERPKERNEL_EXPORT static void SoftDelete(ComposedEdge *pt) { pt->_sub_edges.clear(); delete pt; }
- INTERPKERNEL_EXPORT void reverse();
- INTERPKERNEL_EXPORT int recursiveSize() const { return (int)_sub_edges.size(); }
- INTERPKERNEL_EXPORT bool presenceOfOn() const;
- INTERPKERNEL_EXPORT bool presenceOfQuadraticEdge() const;
- INTERPKERNEL_EXPORT void initLocations() const;
- INTERPKERNEL_EXPORT static void InitLocationsWithOther(const ComposedEdge& first, const ComposedEdge& other);
- INTERPKERNEL_EXPORT ComposedEdge *clone() const;
- INTERPKERNEL_EXPORT bool isNodeIn(Node *n) const;
- INTERPKERNEL_EXPORT double getArea() const;
- INTERPKERNEL_EXPORT double getPerimeter() const;
- INTERPKERNEL_EXPORT double getHydraulicDiameter() const;
- INTERPKERNEL_EXPORT void getBarycenter(double *bary) const;
- INTERPKERNEL_EXPORT void getBarycenterGeneral(double *bary) const;
- INTERPKERNEL_EXPORT double normalizeMe(double& xBary, double& yBary);
- INTERPKERNEL_EXPORT double normalize(ComposedEdge *other, double& xBary, double& yBary);
- INTERPKERNEL_EXPORT double normalizeExt(ComposedEdge *other, double& xBary, double& yBary);
- INTERPKERNEL_EXPORT void unApplyGlobalSimilarityExt(ComposedEdge& other, double xBary, double yBary, double fact);
- INTERPKERNEL_EXPORT void fillBounds(Bounds& output) const;
- INTERPKERNEL_EXPORT void applySimilarity(double xBary, double yBary, double dimChar);
- INTERPKERNEL_EXPORT void applyGlobalSimilarity(double xBary, double yBary, double dimChar);
- INTERPKERNEL_EXPORT void applyGlobalSimilarity2(ComposedEdge *other, double xBary, double yBary, double dimChar);
- INTERPKERNEL_EXPORT void dispatchPerimeter(double& partConsidered) const;
- INTERPKERNEL_EXPORT void dispatchPerimeterExcl(double& partConsidered, double& commonPart) const;
- INTERPKERNEL_EXPORT double dispatchPerimeterAdv(const ComposedEdge& father, std::vector<double>& result) const;
- INTERPKERNEL_EXPORT void getAllNodes(std::set<Node *>& output) const;
- INTERPKERNEL_EXPORT void initNodeHitStatus() const;
- INTERPKERNEL_EXPORT void applySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void applySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void initEdgeHitStatus() const;
- INTERPKERNEL_EXPORT void applySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void applySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
- INTERPKERNEL_EXPORT void getBarycenter(double *bary, double& weigh) const;
- INTERPKERNEL_EXPORT bool completed() const { return getEndNode()==getStartNode(); }
- INTERPKERNEL_EXPORT void setValueAt(int i, Edge *e, bool direction=true);
- INTERPKERNEL_EXPORT double getCommonLengthWith(const ComposedEdge& other) const;
- INTERPKERNEL_EXPORT void clear();
- INTERPKERNEL_EXPORT bool empty() const { return _sub_edges.empty(); }
- INTERPKERNEL_EXPORT ElementaryEdge *front() const { return _sub_edges.front(); }
- INTERPKERNEL_EXPORT ElementaryEdge *back() const { return _sub_edges.back(); }
- INTERPKERNEL_EXPORT void resize(int i) { _sub_edges.resize(i); }
- INTERPKERNEL_EXPORT void pushBack(Edge *edge, bool direction=true);
- INTERPKERNEL_EXPORT void pushBack(ElementaryEdge *elem);
- INTERPKERNEL_EXPORT void pushBack(ComposedEdge *elem);
- INTERPKERNEL_EXPORT int size() const { return (int)_sub_edges.size(); }
- INTERPKERNEL_EXPORT ElementaryEdge *operator[](int i) const;
- INTERPKERNEL_EXPORT Node *getEndNode() const;
- INTERPKERNEL_EXPORT Node *getStartNode() const;
- INTERPKERNEL_EXPORT bool changeEndNodeWith(Node *node) const;
- INTERPKERNEL_EXPORT bool changeStartNodeWith(Node *node) const;
- INTERPKERNEL_EXPORT void dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const;
- INTERPKERNEL_EXPORT void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp) const;
- INTERPKERNEL_EXPORT bool isInOrOut(Node *nodeToTest) const;
- INTERPKERNEL_EXPORT bool isInOrOut2(Node *nodeToTest) const;
- INTERPKERNEL_EXPORT bool getDirection() const;
- INTERPKERNEL_EXPORT bool intresincEqCoarse(const Edge *other) const;
+ ComposedEdge() { }
+ ComposedEdge(const ComposedEdge& other);
+ ComposedEdge(int sz):_sub_edges(sz) { }
+ static void Delete(ComposedEdge *pt) { delete pt; }
+ static void SoftDelete(ComposedEdge *pt) { pt->_sub_edges.clear(); delete pt; }
+ void reverse();
+ int recursiveSize() const { return (int)_sub_edges.size(); }
+ bool presenceOfOn() const;
+ bool presenceOfQuadraticEdge() const;
+ void initLocations() const;
+ static void InitLocationsWithOther(const ComposedEdge& first, const ComposedEdge& other);
+ ComposedEdge *clone() const;
+ bool isNodeIn(Node *n) const;
+ double getArea() const;
+ double getPerimeter() const;
+ double getHydraulicDiameter() const;
+ void getBarycenter(double *bary) const;
+ void getBarycenterGeneral(double *bary) const;
+ double normalizeMe(double& xBary, double& yBary);
+ double normalize(ComposedEdge *other, double& xBary, double& yBary);
+ double normalizeExt(ComposedEdge *other, double& xBary, double& yBary);
+ void unApplyGlobalSimilarityExt(ComposedEdge& other, double xBary, double yBary, double fact);
+ void fillBounds(Bounds& output) const;
+ void applySimilarity(double xBary, double yBary, double dimChar);
+ void applyGlobalSimilarity(double xBary, double yBary, double dimChar);
+ void applyGlobalSimilarity2(ComposedEdge *other, double xBary, double yBary, double dimChar);
+ void dispatchPerimeter(double& partConsidered) const;
+ void dispatchPerimeterExcl(double& partConsidered, double& commonPart) const;
+ double dispatchPerimeterAdv(const ComposedEdge& father, std::vector<double>& result) const;
+ void getAllNodes(std::set<Node *>& output) const;
+ void initNodeHitStatus() const;
+ void applySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
+ void unApplySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
+ void applySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ void unApplySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ void initEdgeHitStatus() const;
+ void applySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
+ void unApplySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
+ void applySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ void unApplySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ void getBarycenter(double *bary, double& weigh) const;
+ bool completed() const { return getEndNode()==getStartNode(); }
+ void setValueAt(int i, Edge *e, bool direction=true);
+ double getCommonLengthWith(const ComposedEdge& other) const;
+ void clear();
+ bool empty() const { return _sub_edges.empty(); }
+ ElementaryEdge *front() const { return _sub_edges.front(); }
+ ElementaryEdge *back() const { return _sub_edges.back(); }
+ void resize(int i) { _sub_edges.resize(i); }
+ void pushBack(Edge *edge, bool direction=true);
+ void pushBack(ElementaryEdge *elem);
+ void pushBack(ComposedEdge *elem);
+ int size() const { return (int)_sub_edges.size(); }
+ ElementaryEdge *operator[](int i) const;
+ Node *getEndNode() const;
+ Node *getStartNode() const;
+ bool changeEndNodeWith(Node *node) const;
+ bool changeStartNodeWith(Node *node) const;
+ void dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const;
+ void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp) const;
+ bool isInOrOut(Node *nodeToTest) const;
+ bool isInOrOut2(Node *nodeToTest) const;
+ bool getDirection() const;
+ bool intresincEqCoarse(const Edge *other) const;
private:
std::list<ElementaryEdge *>* getListBehind() { return &_sub_edges; }
double isInOrOutAlg(Node *nodeToTest, const std::set<Node*>& nodes, std::set< IntersectElement >& inOutSwitch) const;
namespace INTERP_KERNEL
{
- class ElementaryEdge
+ class INTERPKERNEL_EXPORT ElementaryEdge
{
public:
- INTERPKERNEL_EXPORT ElementaryEdge(Edge *ptr, bool direction):_direction(direction),_ptr(ptr) { }
- INTERPKERNEL_EXPORT ElementaryEdge(const ElementaryEdge& other);
- INTERPKERNEL_EXPORT ~ElementaryEdge();
- INTERPKERNEL_EXPORT bool isThereStartPoint() const { return _iterator.isValid(); }
- INTERPKERNEL_EXPORT IteratorOnComposedEdge& getIterator() { return _iterator; }
- INTERPKERNEL_EXPORT bool completed() const { return false; }
- INTERPKERNEL_EXPORT void declareOn() const { _ptr->declareOn(); }
- INTERPKERNEL_EXPORT void declareIn() const { _ptr->declareIn(); }
- INTERPKERNEL_EXPORT void declareOut() const { _ptr->declareOut(); }
- INTERPKERNEL_EXPORT TypeOfEdgeLocInPolygon getLoc() const { return _ptr->getLoc(); }
- INTERPKERNEL_EXPORT Edge *getPtr() const { return _ptr; }
- INTERPKERNEL_EXPORT void reverse() { _direction=(!_direction); }
- INTERPKERNEL_EXPORT bool isNodeIn(Node *n) const;
- INTERPKERNEL_EXPORT double getAreaOfZone() const { double ret=_ptr->getAreaOfZone(); return _direction?ret:-ret; }
- INTERPKERNEL_EXPORT void getBarycenterOfZone(double *bary) const;
- INTERPKERNEL_EXPORT void fillBounds(Bounds& output) const;
- INTERPKERNEL_EXPORT void applySimilarity(double xBary, double yBary, double dimChar) { _ptr->applySimilarity(xBary,yBary,dimChar); }
- INTERPKERNEL_EXPORT void unApplySimilarity(double xBary, double yBary, double dimChar) { _ptr->unApplySimilarity(xBary,yBary,dimChar); }
- INTERPKERNEL_EXPORT void getAllNodes(std::set<Node *>& output) const;
- INTERPKERNEL_EXPORT bool hasSameExtremities(const ElementaryEdge& other) const;
- INTERPKERNEL_EXPORT void getBarycenter(double *bary, double& weigh) const;
- INTERPKERNEL_EXPORT ElementaryEdge *clone() const;
- INTERPKERNEL_EXPORT void initLocations() const;
- INTERPKERNEL_EXPORT int size() const;
- INTERPKERNEL_EXPORT TypeOfEdgeLocInPolygon locateFullyMySelfAbsolute(const ComposedEdge& pol) const;
- INTERPKERNEL_EXPORT TypeOfEdgeLocInPolygon locateFullyMySelf(const ComposedEdge& pol, TypeOfEdgeLocInPolygon precEdgeLoc) const;
- INTERPKERNEL_EXPORT Node *getEndNode() const;
- INTERPKERNEL_EXPORT Node *getStartNode() const;
- INTERPKERNEL_EXPORT double getCurveLength() const { return _ptr->getCurveLength(); }
- INTERPKERNEL_EXPORT bool changeEndNodeWith(Node *node) const;
- INTERPKERNEL_EXPORT bool changeStartNodeWith(Node *node) const;
- INTERPKERNEL_EXPORT bool intresicEqual(const ElementaryEdge *other) const;
- INTERPKERNEL_EXPORT bool intresicEqualDirSensitive(const ElementaryEdge *other) const;
- INTERPKERNEL_EXPORT void dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const;
- INTERPKERNEL_EXPORT void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp, int index) const;
- INTERPKERNEL_EXPORT bool getDirection() const { return _direction; }
- INTERPKERNEL_EXPORT bool intresincEqCoarse(const Edge *other) const;
- INTERPKERNEL_EXPORT bool isEqual(const ElementaryEdge& other) const;
+ ElementaryEdge(Edge *ptr, bool direction):_direction(direction),_ptr(ptr) { }
+ ElementaryEdge(const ElementaryEdge& other);
+ ~ElementaryEdge();
+ bool isThereStartPoint() const { return _iterator.isValid(); }
+ IteratorOnComposedEdge& getIterator() { return _iterator; }
+ bool completed() const { return false; }
+ void declareOn() const { _ptr->declareOn(); }
+ void declareIn() const { _ptr->declareIn(); }
+ void declareOut() const { _ptr->declareOut(); }
+ TypeOfEdgeLocInPolygon getLoc() const { return _ptr->getLoc(); }
+ Edge *getPtr() const { return _ptr; }
+ void reverse() { _direction=(!_direction); }
+ bool isNodeIn(Node *n) const;
+ double getAreaOfZone() const { double ret=_ptr->getAreaOfZone(); return _direction?ret:-ret; }
+ void getBarycenterOfZone(double *bary) const;
+ void fillBounds(Bounds& output) const;
+ void applySimilarity(double xBary, double yBary, double dimChar) { _ptr->applySimilarity(xBary,yBary,dimChar); }
+ void unApplySimilarity(double xBary, double yBary, double dimChar) { _ptr->unApplySimilarity(xBary,yBary,dimChar); }
+ void getAllNodes(std::set<Node *>& output) const;
+ bool hasSameExtremities(const ElementaryEdge& other) const;
+ void getBarycenter(double *bary, double& weigh) const;
+ ElementaryEdge *clone() const;
+ void initLocations() const;
+ int size() const;
+ TypeOfEdgeLocInPolygon locateFullyMySelfAbsolute(const ComposedEdge& pol) const;
+ TypeOfEdgeLocInPolygon locateFullyMySelf(const ComposedEdge& pol, TypeOfEdgeLocInPolygon precEdgeLoc) const;
+ Node *getEndNode() const;
+ Node *getStartNode() const;
+ double getCurveLength() const { return _ptr->getCurveLength(); }
+ bool changeEndNodeWith(Node *node) const;
+ bool changeStartNodeWith(Node *node) const;
+ bool intresicEqual(const ElementaryEdge *other) const;
+ bool intresicEqualDirSensitive(const ElementaryEdge *other) const;
+ void dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const;
+ void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp, int index) const;
+ bool getDirection() const { return _direction; }
+ bool intresincEqCoarse(const Edge *other) const;
+ bool isEqual(const ElementaryEdge& other) const;
public:
- INTERPKERNEL_EXPORT void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+ void fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
std::vector<mcIdType>& edgesThis, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType> mapAddCoo) const;
- INTERPKERNEL_EXPORT void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
+ void fillGlobalInfoAbs2(const std::map<INTERP_KERNEL::Node *,mcIdType>& mapThis, const std::map<INTERP_KERNEL::Node *,mcIdType>& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY,
short skipStartOrEnd,
std::vector<mcIdType>& edgesOther, std::vector<double>& addCoo, std::map<INTERP_KERNEL::Node *,mcIdType>& mapAddCoo) const;
- INTERPKERNEL_EXPORT static ElementaryEdge *BuildEdgeFromStartEndDir(bool direction, INTERP_KERNEL::Node *start, INTERP_KERNEL::Node *end);
+ static ElementaryEdge *BuildEdgeFromStartEndDir(bool direction, INTERP_KERNEL::Node *start, INTERP_KERNEL::Node *end);
private:
bool _direction;
Edge *_ptr;
class QuadraticPolygon : public ComposedEdge
{
public:
- INTERPKERNEL_EXPORT QuadraticPolygon() { }
- INTERPKERNEL_EXPORT QuadraticPolygon(const QuadraticPolygon& other):ComposedEdge(other) { }
+ QuadraticPolygon() { }
+ QuadraticPolygon(const QuadraticPolygon& other):ComposedEdge(other) { }
INTERPKERNEL_EXPORT QuadraticPolygon(const char *fileName);
INTERPKERNEL_EXPORT static QuadraticPolygon *BuildLinearPolygon(std::vector<Node *>& nodes);
INTERPKERNEL_EXPORT static QuadraticPolygon *BuildArcCirclePolygon(std::vector<Node *>& nodes);
* more than one 3D target cell, and the value of '_duplicate_faces'
* the 3D target cells. The size of the value of '_duplicate_faces' is more than or equal to 2.
*/
- class Interpolation2D3D : public Interpolation<Interpolation2D3D>
+ class INTERPKERNEL_EXPORT Interpolation2D3D : public Interpolation<Interpolation2D3D>
{
public:
typedef std::map<mcIdType,std::set<mcIdType> > DuplicateFacesType;
- INTERPKERNEL_EXPORT Interpolation2D3D();
- INTERPKERNEL_EXPORT Interpolation2D3D(const InterpolationOptions& io);
+ Interpolation2D3D();
+ Interpolation2D3D(const InterpolationOptions& io);
template<class MyMeshType, class MyMatrixType>
typename MyMeshType::MyConnType interpolateMeshes(const MyMeshType& srcMesh,
const MyMeshType& targetMesh,
MyMatrixType& matrix,
const std::string& method);
- INTERPKERNEL_EXPORT DuplicateFacesType retrieveDuplicateFaces() const { return _duplicate_faces; }
+ DuplicateFacesType retrieveDuplicateFaces() const { return _duplicate_faces; }
private:
SplittingPolicy _splitting_policy;
DuplicateFacesType _duplicate_faces;
namespace INTERP_KERNEL
{
- class OrientationInverter
+ class INTERPKERNEL_EXPORT OrientationInverter
{
public:
- INTERPKERNEL_EXPORT static OrientationInverter *BuildInstanceFrom(NormalizedCellType gt);
- INTERPKERNEL_EXPORT virtual ~OrientationInverter() { }
- INTERPKERNEL_EXPORT virtual void operate(mcIdType *beginPt, mcIdType *endPt) const = 0;
+ static OrientationInverter *BuildInstanceFrom(NormalizedCellType gt);
+ virtual ~OrientationInverter() { }
+ virtual void operate(mcIdType *beginPt, mcIdType *endPt) const = 0;
};
- class OrientationInverterChecker : public OrientationInverter
+ class INTERPKERNEL_EXPORT OrientationInverterChecker : public OrientationInverter
{
public:
OrientationInverterChecker(unsigned nbNodes):_nb_nodes(nbNodes) { }
{
class MEDCoupling1GTUUMeshCellIterator;
- class MEDCoupling1GTUMesh : public MEDCouplingPointSet
+ class MEDCOUPLING_EXPORT MEDCoupling1GTUMesh : public MEDCouplingPointSet
{
public:
- MEDCOUPLING_EXPORT static MEDCoupling1GTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static MEDCoupling1GTUMesh *New(const MEDCouplingUMesh *m);
- MEDCOUPLING_EXPORT const INTERP_KERNEL::CellModel& getCellModel() const;
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getCellModelEnum() const;
- MEDCOUPLING_EXPORT int getMeshDimension() const;
- MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
- MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
- MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
- MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
+ static MEDCoupling1GTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
+ static MEDCoupling1GTUMesh *New(const MEDCouplingUMesh *m);
+ const INTERP_KERNEL::CellModel& getCellModel() const;
+ INTERP_KERNEL::NormalizedCellType getCellModelEnum() const;
+ int getMeshDimension() const;
+ DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
+ std::vector<mcIdType> getDistributionOfTypes() const;
+ void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+ DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
+ std::string getVTKDataSetType() const;
+ std::string getVTKFileExtension() const;
//
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT mcIdType getNodalConnectivityLength() const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
- MEDCOUPLING_EXPORT DataArrayIdType *findBoundaryNodes() const;
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const;
- MEDCOUPLING_EXPORT void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *AggregateOnSameCoordsToUMesh(const std::vector< const MEDCoupling1GTUMesh *>& parts);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ mcIdType getNodalConnectivityLength() const;
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkConsistencyLight() const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ MEDCouplingFieldDouble *buildOrthogonalField() const;
+ DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
+ DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
+ MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
+ DataArrayIdType *findBoundaryNodes() const;
+ MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const;
+ void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
+ static MEDCouplingUMesh *AggregateOnSameCoordsToUMesh(const std::vector< const MEDCoupling1GTUMesh *>& parts);
public:
- MEDCOUPLING_EXPORT virtual void allocateCells(mcIdType nbOfCells=0) = 0;
- MEDCOUPLING_EXPORT virtual void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd) = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getNodalConnectivity() const = 0;
- MEDCOUPLING_EXPORT virtual void checkConsistencyOfConnectivity() const = 0;
+ virtual void allocateCells(mcIdType nbOfCells=0) = 0;
+ virtual void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd) = 0;
+ virtual DataArrayIdType *getNodalConnectivity() const = 0;
+ virtual void checkConsistencyOfConnectivity() const = 0;
protected:
MEDCoupling1GTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
MEDCoupling1GTUMesh(const MEDCoupling1GTUMesh& other, bool recDeepCpy);
class MEDCoupling1DGTUMesh;
class MEDCouplingCMesh;
- class MEDCoupling1SGTUMesh : public MEDCoupling1GTUMesh
+ class MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh : public MEDCoupling1GTUMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m);
+ static MEDCoupling1SGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
+ static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m);
//! useless constructor only for CORBA -> not swigged
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCoupling1SGTUMesh"); }
+ static MEDCoupling1SGTUMesh *New();
+ std::string getClassName() const override { return std::string("MEDCoupling1SGTUMesh"); }
// Copy methods
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *deepCopyConnectivityOnly() const;
+ MEDCoupling1SGTUMesh *clone(bool recDeepCpy) const;
+ MEDCoupling1SGTUMesh *deepCopy() const;
+ MEDCoupling1SGTUMesh *deepCopyConnectivityOnly() const;
// overload of TimeLabel and RefCountObject
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
// overload of MEDCouplingMesh
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED; }
+ MEDCouplingMeshType getType() const { return SINGLE_STATIC_GEO_TYPE_UNSTRUCTURED; }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ mcIdType getNumberOfCells() const;
+ DataArrayIdType *computeNbOfNodesPerCell() const;
+ DataArrayIdType *computeNbOfFacesPerCell() const;
+ DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+ void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ DataArrayIdType *simplexize(int policy);
+ void reprQuickOverview(std::ostream& stream) const;
// overload of MEDCouplingPointSet
- MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
- MEDCOUPLING_EXPORT MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
- MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
- MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
- MEDCOUPLING_EXPORT void checkFullyDefined() const;
- MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
- MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
- MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
- MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
+ void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
+ MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
+ MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
+ MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
+ void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
+ void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+ void checkFullyDefined() const;
+ bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+ DataArrayIdType *computeFetchedNodeIds() const;
+ DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
+ void renumberNodesWithOffsetInConn(mcIdType offset);
+ void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+ void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+ void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+ void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
+ mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
+ DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
+ MEDCouplingFieldDouble *computeDiameterField() const;
+ void invertOrientationOfAllCells();
// overload of MEDCoupling1GTUMesh
- MEDCOUPLING_EXPORT void checkConsistencyOfConnectivity() const;
- MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
- MEDCOUPLING_EXPORT void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
+ void checkConsistencyOfConnectivity() const;
+ void allocateCells(mcIdType nbOfCells=0);
+ void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
public://specific
- MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayIdType *nodalConn);
- MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodesPerCell() const;
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2);
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(std::vector<const MEDCoupling1SGTUMesh *>& a);
- MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *Merge1SGTUMeshesOnSameCoords(std::vector<const MEDCoupling1SGTUMesh *>& a);
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
- MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *computeDualMesh() const;
- MEDCOUPLING_EXPORT DataArrayIdType *sortHexa8EachOther();
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *explodeEachHexa8To6Quad4() const;
- MEDCOUPLING_EXPORT MEDCouplingCMesh *structurizeMe(DataArrayIdType *& cellPerm, DataArrayIdType *& nodePerm, double eps=1e-12) const;
+ void setNodalConnectivity(DataArrayIdType *nodalConn);
+ DataArrayIdType *getNodalConnectivity() const;
+ mcIdType getNumberOfNodesPerCell() const;
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2);
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(std::vector<const MEDCoupling1SGTUMesh *>& a);
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshesOnSameCoords(std::vector<const MEDCoupling1SGTUMesh *>& a);
+ MEDCoupling1SGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
+ MEDCoupling1GTUMesh *computeDualMesh() const;
+ DataArrayIdType *sortHexa8EachOther();
+ MEDCoupling1SGTUMesh *explodeEachHexa8To6Quad4() const;
+ MEDCouplingCMesh *structurizeMe(DataArrayIdType *& cellPerm, DataArrayIdType *& nodePerm, double eps=1e-12) const;
public://serialization
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
private:
MEDCoupling1SGTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
static const int HEXA8_FACE_PAIRS[6];
};
- class MEDCoupling1DGTUMesh : public MEDCoupling1GTUMesh
+ class MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh : public MEDCoupling1GTUMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m);
+ static MEDCoupling1DGTUMesh *New(const std::string& name, INTERP_KERNEL::NormalizedCellType type);
+ static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m);
//! useless constructor only for CORBA -> not swigged
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCoupling1DGTUMesh"); }
+ static MEDCoupling1DGTUMesh *New();
+ std::string getClassName() const override { return std::string("MEDCoupling1DGTUMesh"); }
// Copy methods
- MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *deepCopyConnectivityOnly() const;
+ MEDCoupling1DGTUMesh *clone(bool recDeepCpy) const;
+ MEDCoupling1DGTUMesh *deepCopy() const;
+ MEDCoupling1DGTUMesh *deepCopyConnectivityOnly() const;
// overload of TimeLabel and RefCountObject
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
// overload of MEDCouplingMesh
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED; }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ MEDCouplingMeshType getType() const { return SINGLE_DYNAMIC_GEO_TYPE_UNSTRUCTURED; }
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ mcIdType getNumberOfCells() const;
+ DataArrayIdType *computeNbOfNodesPerCell() const;
+ DataArrayIdType *computeNbOfFacesPerCell() const;
+ DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+ void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ DataArrayIdType *simplexize(int policy);
+ void reprQuickOverview(std::ostream& stream) const;
// overload of MEDCouplingPointSet
- MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
- MEDCOUPLING_EXPORT MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
- MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
- MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
- MEDCOUPLING_EXPORT void checkFullyDefined() const;
- MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
- MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
- MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
- MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
+ void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
+ MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
+ MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const;
+ MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const;
+ void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
+ void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+ void checkFullyDefined() const;
+ bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+ DataArrayIdType *computeFetchedNodeIds() const;
+ DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
+ void renumberNodesWithOffsetInConn(mcIdType offset);
+ void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+ void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+ void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+ void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const;
+ mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
+ DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
+ MEDCouplingFieldDouble *computeDiameterField() const;
+ void invertOrientationOfAllCells();
// overload of MEDCoupling1GTUMesh
- MEDCOUPLING_EXPORT void checkConsistencyOfConnectivity() const;
- MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
- MEDCOUPLING_EXPORT void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
+ void checkConsistencyOfConnectivity() const;
+ void allocateCells(mcIdType nbOfCells=0);
+ void insertNextCell(const mcIdType *nodalConnOfCellBg, const mcIdType *nodalConnOfCellEnd);
public://specific
- MEDCOUPLING_EXPORT void setNodalConnectivity(DataArrayIdType *nodalConn, DataArrayIdType *nodalConnIndex);
- MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivityIndex() const;
- MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const;
- MEDCOUPLING_EXPORT bool retrievePackedNodalConnectivity(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndx) const;
- MEDCOUPLING_EXPORT bool isPacked() const;
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2);
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a);
- MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a);
- MEDCOUPLING_EXPORT static DataArrayIdType *AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayIdType *>& nodalConns, const std::vector<mcIdType>& offsetInNodeIdsPerElt);
- MEDCOUPLING_EXPORT static std::vector<mcIdType> BuildAPolygonFromParts(const std::vector< std::vector<mcIdType> >& parts);
- MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
+ void setNodalConnectivity(DataArrayIdType *nodalConn, DataArrayIdType *nodalConnIndex);
+ DataArrayIdType *getNodalConnectivity() const;
+ DataArrayIdType *getNodalConnectivityIndex() const;
+ MEDCoupling1DGTUMesh *copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const;
+ bool retrievePackedNodalConnectivity(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndx) const;
+ bool isPacked() const;
+ static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(const MEDCoupling1DGTUMesh *mesh1, const MEDCoupling1DGTUMesh *mesh2);
+ static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(std::vector<const MEDCoupling1DGTUMesh *>& a);
+ static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(std::vector<const MEDCoupling1DGTUMesh *>& a);
+ static DataArrayIdType *AggregateNodalConnAndShiftNodeIds(const std::vector<const DataArrayIdType *>& nodalConns, const std::vector<mcIdType>& offsetInNodeIdsPerElt);
+ static std::vector<mcIdType> BuildAPolygonFromParts(const std::vector< std::vector<mcIdType> >& parts);
+ MEDCoupling1DGTUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
public://serialization
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
private:
MEDCoupling1DGTUMesh(const std::string& name, const INTERP_KERNEL::CellModel& cm);
namespace MEDCoupling
{
/// @cond INTERNAL
- class DataArrayDoubleCollection : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT DataArrayDoubleCollection : public RefCountObject, public TimeLabel
{
public:
static DataArrayDoubleCollection *New(const std::vector< std::pair<std::string,int> >& fieldNames);
std::vector< std::pair< MCAuto<DataArrayDouble>, NatureOfField > > _arrs;
};
- class MEDCouplingGridCollection : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingGridCollection : public RefCountObject, public TimeLabel
{
public:
static MEDCouplingGridCollection *New(const std::vector<const MEDCouplingCartesianAMRMeshGen *>& ms, const std::vector< std::pair<std::string,int> >& fieldNames);
/// @endcond
- class MEDCouplingDataForGodFather : public RefCountObject
+ class MEDCOUPLING_EXPORT MEDCouplingDataForGodFather : public RefCountObject
{
friend class MEDCouplingCartesianAMRMesh;
public:
- MEDCOUPLING_EXPORT MEDCouplingCartesianAMRMesh *getMyGodFather();
+ MEDCouplingCartesianAMRMesh *getMyGodFather();
std::string getClassName() const override { return std::string("MEDCouplingDataForGodFather"); }
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMesh *getMyGodFather() const;
- MEDCOUPLING_EXPORT virtual void synchronizeFineToCoarse() = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev) = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeCoarseToFine() = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev) = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZones() = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh) = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level) = 0;
- MEDCOUPLING_EXPORT virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level) = 0;
- MEDCOUPLING_EXPORT virtual void alloc() = 0;
- MEDCOUPLING_EXPORT virtual void dealloc() = 0;
+ const MEDCouplingCartesianAMRMesh *getMyGodFather() const;
+ virtual void synchronizeFineToCoarse() = 0;
+ virtual void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev) = 0;
+ virtual void synchronizeCoarseToFine() = 0;
+ virtual void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev) = 0;
+ virtual void synchronizeAllGhostZones() = 0;
+ virtual void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh) = 0;
+ virtual void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level) = 0;
+ virtual void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level) = 0;
+ virtual void alloc() = 0;
+ virtual void dealloc() = 0;
protected:
MEDCouplingDataForGodFather(MEDCouplingCartesianAMRMesh *gf);
void checkGodFatherFrozen() const;
TimeLabelConstOverseer _tlc;
};
- class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev);
- MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, mcIdType ghostLev);
+ static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev);
+ static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames, mcIdType ghostLev);
std::string getClassName() const override { return std::string("MEDCouplingAMRAttribute"); }
- MEDCOUPLING_EXPORT void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
- MEDCOUPLING_EXPORT void spillNatures(const std::vector<NatureOfField>& nfs);
- MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfLevels() const;
- MEDCOUPLING_EXPORT std::vector<DataArrayDouble *> retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnWithGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
- MEDCOUPLING_EXPORT std::string writeVTHB(const std::string& fileName) const;
+ void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
+ void spillNatures(const std::vector<NatureOfField>& nfs);
+ MEDCouplingAMRAttribute *deepCopy() const;
+ MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const;
+ mcIdType getNumberOfLevels() const;
+ std::vector<DataArrayDouble *> retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const;
+ const DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName);
+ MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ MEDCouplingFieldDouble *buildCellFieldOnWithGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ MEDCouplingFieldDouble *buildCellFieldOnWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ std::string writeVTHB(const std::string& fileName) const;
//
- MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *projectTo(MEDCouplingCartesianAMRMesh *targetGF) const;
+ MEDCouplingAMRAttribute *projectTo(MEDCouplingCartesianAMRMesh *targetGF) const;
//
- MEDCOUPLING_EXPORT void synchronizeFineToCoarse();
- MEDCOUPLING_EXPORT void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev);
- MEDCOUPLING_EXPORT void synchronizeCoarseToFine();
- MEDCOUPLING_EXPORT void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev);
- MEDCOUPLING_EXPORT void synchronizeAllGhostZones();
- MEDCOUPLING_EXPORT void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh);
- MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level);
- MEDCOUPLING_EXPORT void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level);
+ void synchronizeFineToCoarse();
+ void synchronizeFineToCoarseBetween(mcIdType fromLev, mcIdType toLev);
+ void synchronizeCoarseToFine();
+ void synchronizeCoarseToFineBetween(mcIdType fromLev, mcIdType toLev);
+ void synchronizeAllGhostZones();
+ void synchronizeAllGhostZonesOfDirectChidrenOf(const MEDCouplingCartesianAMRMeshGen *mesh);
+ void synchronizeAllGhostZonesAtASpecifiedLevel(mcIdType level);
+ void synchronizeAllGhostZonesAtASpecifiedLevelUsingOnlyFather(mcIdType level);
//
- MEDCOUPLING_EXPORT void alloc();
- MEDCOUPLING_EXPORT void dealloc();
- MEDCOUPLING_EXPORT bool changeGodFather(MEDCouplingCartesianAMRMesh *gf);
+ void alloc();
+ void dealloc();
+ bool changeGodFather(MEDCouplingCartesianAMRMesh *gf);
//
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
private:
MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames, mcIdType ghostLev);
MEDCouplingAMRAttribute(const MEDCouplingAMRAttribute& other, bool deepCpyGF);
{
class MEDCouplingCurveLinearMesh;
- class MEDCouplingCMesh : public MEDCouplingStructuredMesh
+ class MEDCOUPLING_EXPORT MEDCouplingCMesh : public MEDCouplingStructuredMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingCMesh *New();
- MEDCOUPLING_EXPORT static MEDCouplingCMesh *New(const std::string& meshName);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingCMesh"); }
- MEDCOUPLING_EXPORT MEDCouplingCMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingCMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
- MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *buildCurveLinear() const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return CARTESIAN; }
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ static MEDCouplingCMesh *New();
+ static MEDCouplingCMesh *New(const std::string& meshName);
+ std::string getClassName() const override { return std::string("MEDCouplingCMesh"); }
+ MEDCouplingCMesh *deepCopy() const;
+ MEDCouplingCMesh *clone(bool recDeepCpy) const;
+ const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
+ MEDCouplingCurveLinearMesh *buildCurveLinear() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDCouplingMeshType getType() const { return CARTESIAN; }
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getCoordsAt(int i) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getCoordsAt(int i);
- MEDCOUPLING_EXPORT void setCoordsAt(int i, const DataArrayDouble *arr);
- MEDCOUPLING_EXPORT void setCoords(const DataArrayDouble *coordsX,
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ int getSpaceDimension() const;
+ void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ const DataArrayDouble *getCoordsAt(int i) const;
+ DataArrayDouble *getCoordsAt(int i);
+ void setCoordsAt(int i, const DataArrayDouble *arr);
+ void setCoords(const DataArrayDouble *coordsX,
const DataArrayDouble *coordsY=0,
const DataArrayDouble *coordsZ=0);
// tools
- MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
- MEDCOUPLING_EXPORT void translate(const double *vector);
- 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 *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ void getBoundingBox(double *bbox) const;
+ MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ void rotate(const double *center, const double *vector, double angle);
+ void translate(const double *vector);
+ void scale(const double *point, double factor);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ DataArrayDouble *getCoordinatesAndOwner() const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
//some useful methods
- MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
+ void getNodeGridStructure(mcIdType *res) const;
+ std::vector<mcIdType> getNodeGridStructure() const;
MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
//serialisation-unserialization
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
+ void reprQuickOverview(std::ostream& stream) const;
+ std::string getVTKFileExtension() const;
private:
MEDCouplingCMesh();
MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy);
/*!
* This class does not inherit from TimeLabel so only const method should exist.
*/
- class MEDCouplingCartesianAMRPatchGen : public RefCountObject
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRPatchGen : public RefCountObject
{
public:
- MEDCOUPLING_EXPORT virtual MEDCouplingCartesianAMRPatchGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithOverlap() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
- MEDCOUPLING_EXPORT mcIdType getMaxNumberOfLevelsRelativeToThis() const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getMesh() const { return _mesh; }
+ virtual MEDCouplingCartesianAMRPatchGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
+ mcIdType getNumberOfCellsRecursiveWithOverlap() const;
+ mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
+ mcIdType getMaxNumberOfLevelsRelativeToThis() const;
+ const MEDCouplingCartesianAMRMeshGen *getMesh() const { return _mesh; }
protected:
MEDCouplingCartesianAMRPatchGen(const MEDCouplingCartesianAMRPatchGen& other, MEDCouplingCartesianAMRMeshGen *father);
MEDCouplingCartesianAMRPatchGen(MEDCouplingCartesianAMRMeshGen *mesh);
/*!
* This class does not inherit from TimeLabel so only const method should exist.
*/
- class MEDCouplingCartesianAMRPatch : public MEDCouplingCartesianAMRPatchGen
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRPatch : public MEDCouplingCartesianAMRPatchGen
{
public:
MEDCouplingCartesianAMRPatch(MEDCouplingCartesianAMRMeshGen *mesh, const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight);
std::string getClassName() const override { return std::string("MEDCouplingCartesianAMRPatch"); }
MEDCouplingCartesianAMRPatch *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
// direct forward to _mesh
- MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
+ void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
// end of direct forward to _mesh
- MEDCOUPLING_EXPORT mcIdType getNumberOfOverlapedCellsForFather() const;
- MEDCOUPLING_EXPORT bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT bool isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT bool isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
+ mcIdType getNumberOfOverlapedCellsForFather() const;
+ bool isInMyNeighborhood(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
+ bool isInMyNeighborhoodExt(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
+ bool isInMyNeighborhoodDiffLev(const MEDCouplingCartesianAMRPatch *other, mcIdType ghostLev) const;
// basic set/get
- MEDCOUPLING_EXPORT const std::vector< std::pair<mcIdType,mcIdType> >& getBLTRRange() const { return _bl_tr; }
- MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > getBLTRRangeRelativeToGF() const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> computeCellGridSt() const;
- MEDCOUPLING_EXPORT static bool IsInMyNeighborhood(mcIdType ghostLev, const std::vector< std::pair<mcIdType,mcIdType> >& p1, const std::vector< std::pair<mcIdType,mcIdType> >& p2);
+ const std::vector< std::pair<mcIdType,mcIdType> >& getBLTRRange() const { return _bl_tr; }
+ std::vector< std::pair<mcIdType,mcIdType> > getBLTRRangeRelativeToGF() const;
+ std::vector<mcIdType> computeCellGridSt() const;
+ static bool IsInMyNeighborhood(mcIdType ghostLev, const std::vector< std::pair<mcIdType,mcIdType> >& p1, const std::vector< std::pair<mcIdType,mcIdType> >& p2);
//
static std::vector< std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> > > FindNeighborsOfSubPatchesOfSameLev(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2);
static void FindNeighborsOfSubPatchesOf(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<const MEDCouplingCartesianAMRPatch *,const MEDCouplingCartesianAMRPatch *> >& ret);
/*!
* This class does not inherit from TimeLabel so only const method should exist.
*/
- class MEDCouplingCartesianAMRPatchGF : public MEDCouplingCartesianAMRPatchGen
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRPatchGF : public MEDCouplingCartesianAMRPatchGen
{
public:
MEDCouplingCartesianAMRPatchGF(MEDCouplingCartesianAMRMesh *mesh);
* This class does \b NOT inherit from MEDCouplingMesh because this class overlaps image grid structured meshes to perform adaptative mesh refinement.
* But this class aggregates MEDCouplingMesh instances !
*/
- class MEDCouplingCartesianAMRMeshGen : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRMeshGen : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT virtual MEDCouplingCartesianAMRMeshGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT const std::vector<mcIdType>& getFactors() const { return _factors; }
- MEDCOUPLING_EXPORT void setFactors(const std::vector<mcIdType>& newFactors);
- MEDCOUPLING_EXPORT mcIdType getMaxNumberOfLevelsRelativeToThis() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsAtCurrentLevel() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsAtCurrentLevelGhost(mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithOverlap() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
- MEDCOUPLING_EXPORT const MEDCouplingIMesh *getImageMesh() const { return _mesh; }
+ virtual MEDCouplingCartesianAMRMeshGen *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const = 0;
+ int getSpaceDimension() const;
+ const std::vector<mcIdType>& getFactors() const { return _factors; }
+ void setFactors(const std::vector<mcIdType>& newFactors);
+ mcIdType getMaxNumberOfLevelsRelativeToThis() const;
+ mcIdType getNumberOfCellsAtCurrentLevel() const;
+ mcIdType getNumberOfCellsAtCurrentLevelGhost(mcIdType ghostLev) const;
+ mcIdType getNumberOfCellsRecursiveWithOverlap() const;
+ mcIdType getNumberOfCellsRecursiveWithoutOverlap() const;
+ const MEDCouplingIMesh *getImageMesh() const { return _mesh; }
//
- MEDCOUPLING_EXPORT virtual const MEDCouplingCartesianAMRMeshGen *getFather() const = 0;
- MEDCOUPLING_EXPORT virtual const MEDCouplingCartesianAMRMeshGen *getGodFather() const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getAbsoluteLevel() const = 0;
- MEDCOUPLING_EXPORT virtual void detachFromFather() = 0;
- MEDCOUPLING_EXPORT virtual std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const = 0;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<mcIdType>& pos) const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<mcIdType>& pos) const;
- MEDCOUPLING_EXPORT virtual std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
- MEDCOUPLING_EXPORT void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
- MEDCOUPLING_EXPORT void removeAllPatches();
- MEDCOUPLING_EXPORT void removePatch(mcIdType patchId);
- MEDCOUPLING_EXPORT mcIdType getNumberOfPatches() const;
- MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<mcIdType>& factors);
- MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<mcIdType>& factors);
- MEDCOUPLING_EXPORT void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<mcIdType>& factors, double eps);
- MEDCOUPLING_EXPORT mcIdType getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
- MEDCOUPLING_EXPORT std::vector< const MEDCouplingCartesianAMRPatch *> getPatches() const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatch(mcIdType patchId) const;
- MEDCOUPLING_EXPORT bool isPatchInNeighborhoodOf(mcIdType patchId1, mcIdType patchId2, mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT DataArrayDouble *createCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis) const;
+ virtual const MEDCouplingCartesianAMRMeshGen *getFather() const = 0;
+ virtual const MEDCouplingCartesianAMRMeshGen *getGodFather() const = 0;
+ virtual mcIdType getAbsoluteLevel() const = 0;
+ virtual void detachFromFather() = 0;
+ virtual std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const = 0;
+ virtual mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const = 0;
+ std::vector<mcIdType> getPositionRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+ const MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<mcIdType>& pos) const;
+ const MEDCouplingCartesianAMRMeshGen *getMeshAtPosition(const std::vector<mcIdType>& pos) const;
+ virtual std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
+ void addPatch(const std::vector< std::pair<mcIdType,mcIdType> >& bottomLeftTopRight, const std::vector<mcIdType>& factors);
+ void removeAllPatches();
+ void removePatch(mcIdType patchId);
+ mcIdType getNumberOfPatches() const;
+ void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const std::vector<bool>& criterion, const std::vector<mcIdType>& factors);
+ void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayByte *criterion, const std::vector<mcIdType>& factors);
+ void createPatchesFromCriterion(const INTERP_KERNEL::BoxSplittingOptions& bso, const DataArrayDouble *criterion, const std::vector<mcIdType>& factors, double eps);
+ mcIdType getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
+ std::vector< const MEDCouplingCartesianAMRPatch *> getPatches() const;
+ const MEDCouplingCartesianAMRPatch *getPatch(mcIdType patchId) const;
+ bool isPatchInNeighborhoodOf(mcIdType patchId1, mcIdType patchId2, mcIdType ghostLev) const;
+ DataArrayDouble *createCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis) const;
// coarse to fine
- MEDCOUPLING_EXPORT void fillCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
- MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev, bool isConservative=true) const;
- MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZone(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev) const;
+ void fillCellFieldOnPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, bool isConservative=true) const;
+ void fillCellFieldOnPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev, bool isConservative=true) const;
+ void fillCellFieldOnPatchOnlyOnGhostZone(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, DataArrayDouble *cellFieldOnPatch, mcIdType ghostLev) const;
// coarse to fine + fine to fine
- MEDCOUPLING_EXPORT void fillCellFieldOnPatchGhostAdv(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative=true) const;
+ void fillCellFieldOnPatchGhostAdv(mcIdType patchId, const DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches, bool isConservative=true) const;
// fine to fine
- MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyGhostAdv(mcIdType patchId, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const;
- MEDCOUPLING_EXPORT void fillCellFieldOnPatchOnlyOnGhostZoneWith(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
+ void fillCellFieldOnPatchOnlyGhostAdv(mcIdType patchId, mcIdType ghostLev, const std::vector<const DataArrayDouble *>& arrsOnPatches) const;
+ void fillCellFieldOnPatchOnlyOnGhostZoneWith(mcIdType ghostLev, const MEDCouplingCartesianAMRPatch *patchToBeModified, const MEDCouplingCartesianAMRPatch *neighborPatch, DataArrayDouble *cellFieldOnPatch, const DataArrayDouble *cellFieldNeighbor) const;
// fine to coarse
- MEDCOUPLING_EXPORT void fillCellFieldComingFromPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
- MEDCOUPLING_EXPORT void fillCellFieldComingFromPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, bool isConservative=true) const;
+ void fillCellFieldComingFromPatch(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, bool isConservative=true) const;
+ void fillCellFieldComingFromPatchGhost(mcIdType patchId, const DataArrayDouble *cellFieldOnPatch, DataArrayDouble *cellFieldOnThis, mcIdType ghostLev, bool isConservative=true) const;
//
- MEDCOUPLING_EXPORT DataArrayIdType *findPatchesInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
+ DataArrayIdType *findPatchesInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
//
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const;
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(mcIdType ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const;
- MEDCOUPLING_EXPORT DataArrayDouble *extractGhostFrom(mcIdType ghostSz, const DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getPatchIdsInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT std::string buildPythonDumpOfThis() const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const;
+ MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const;
+ MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(mcIdType ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const;
+ DataArrayDouble *extractGhostFrom(mcIdType ghostSz, const DataArrayDouble *arr) const;
+ std::vector<mcIdType> getPatchIdsInTheNeighborhoodOf(mcIdType patchId, mcIdType ghostLev) const;
+ std::string buildPythonDumpOfThis() const;
protected:
MEDCouplingCartesianAMRMeshGen(const MEDCouplingCartesianAMRMeshGen& other);
MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
public:
virtual void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const = 0;
protected:
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
protected:
MCAuto<MEDCouplingIMesh> _mesh;
std::vector< MCAuto<MEDCouplingCartesianAMRPatch> > _patches;
std::vector<mcIdType> _factors;
};
- class MEDCouplingCartesianAMRMeshSub : public MEDCouplingCartesianAMRMeshGen
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRMeshSub : public MEDCouplingCartesianAMRMeshGen
{
public:
MEDCouplingCartesianAMRMeshSub(MEDCouplingCartesianAMRMeshGen *father, MEDCouplingIMesh *mesh);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingCartesianAMRMeshSub"); }
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getFather() const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
- MEDCOUPLING_EXPORT mcIdType getAbsoluteLevel() const;
- MEDCOUPLING_EXPORT void detachFromFather();
- MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
- MEDCOUPLING_EXPORT mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+ std::string getClassName() const override { return std::string("MEDCouplingCartesianAMRMeshSub"); }
+ const MEDCouplingCartesianAMRMeshGen *getFather() const;
+ const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
+ mcIdType getAbsoluteLevel() const;
+ void detachFromFather();
+ std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
+ mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
private:
MEDCouplingCartesianAMRMeshSub(const MEDCouplingCartesianAMRMeshSub& other, MEDCouplingCartesianAMRMeshGen *father);
MEDCouplingCartesianAMRMeshSub *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
MEDCouplingCartesianAMRMeshGen *_father;
};
- class MEDCouplingCartesianAMRMesh : public MEDCouplingCartesianAMRMeshGen
+ class MEDCOUPLING_EXPORT MEDCouplingCartesianAMRMesh : public MEDCouplingCartesianAMRMeshGen
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingCartesianAMRMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
+ static MEDCouplingCartesianAMRMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
- MEDCOUPLING_EXPORT static MEDCouplingCartesianAMRMesh *New(MEDCouplingIMesh *mesh);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingCartesianAMRMesh"); }
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getFather() const;
- MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
- MEDCOUPLING_EXPORT mcIdType getAbsoluteLevel() const;
- MEDCOUPLING_EXPORT void detachFromFather();
- MEDCOUPLING_EXPORT std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
- MEDCOUPLING_EXPORT mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
- MEDCOUPLING_EXPORT std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
+ static MEDCouplingCartesianAMRMesh *New(MEDCouplingIMesh *mesh);
+ std::string getClassName() const override { return std::string("MEDCouplingCartesianAMRMesh"); }
+ const MEDCouplingCartesianAMRMeshGen *getFather() const;
+ const MEDCouplingCartesianAMRMeshGen *getGodFather() const;
+ mcIdType getAbsoluteLevel() const;
+ void detachFromFather();
+ std::vector< std::pair<mcIdType,mcIdType> > positionRelativeToGodFather(std::vector<mcIdType>& st) const;
+ mcIdType getAbsoluteLevelRelativeTo(const MEDCouplingCartesianAMRMeshGen *ref) const;
+ std::vector<MEDCouplingCartesianAMRPatchGen *> retrieveGridsAt(mcIdType absoluteLev) const;
MEDCouplingCartesianAMRMesh *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const;
- MEDCOUPLING_EXPORT void createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<mcIdType> >& factors, double eps);
+ void createPatchesFromCriterionML(const std::vector<const INTERP_KERNEL::BoxSplittingOptions *>& bso, const DataArrayDouble *criterion, const std::vector< std::vector<mcIdType> >& factors, double eps);
private:
void getPositionRelativeToInternal(const MEDCouplingCartesianAMRMeshGen *ref, std::vector<mcIdType>& ret) const;
MEDCouplingCartesianAMRMesh(const MEDCouplingCartesianAMRMesh& other);
MEDCouplingCartesianAMRMesh(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
MEDCouplingCartesianAMRMesh(MEDCouplingIMesh *mesh);
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
~MEDCouplingCartesianAMRMesh();
};
}
namespace MEDCoupling
{
- class MEDCouplingCurveLinearMesh : public MEDCouplingStructuredMesh
+ class MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh : public MEDCouplingStructuredMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingCurveLinearMesh *New();
- MEDCOUPLING_EXPORT static MEDCouplingCurveLinearMesh *New(const std::string& meshName);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingCurveLinearMesh"); }
- MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return CURVE_LINEAR; }
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ static MEDCouplingCurveLinearMesh *New();
+ static MEDCouplingCurveLinearMesh *New(const std::string& meshName);
+ std::string getClassName() const override { return std::string("MEDCouplingCurveLinearMesh"); }
+ MEDCouplingCurveLinearMesh *deepCopy() const;
+ MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDCouplingMeshType getType() const { return CURVE_LINEAR; }
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
- MEDCOUPLING_EXPORT DataArrayDouble *getCoords();
- MEDCOUPLING_EXPORT const DataArrayDouble *getCoords() const;
- MEDCOUPLING_EXPORT void setCoords(const DataArrayDouble *coords);
- MEDCOUPLING_EXPORT void setNodeGridStructure(const mcIdType *gridStructBg, const mcIdType *gridStructEnd);
- MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
- MEDCOUPLING_EXPORT MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ mcIdType getNumberOfCells() const;
+ mcIdType getNumberOfNodes() const;
+ int getSpaceDimension() const;
+ void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
+ DataArrayDouble *getCoords();
+ const DataArrayDouble *getCoords() const;
+ void setCoords(const DataArrayDouble *coords);
+ void setNodeGridStructure(const mcIdType *gridStructBg, const mcIdType *gridStructEnd);
+ std::vector<mcIdType> getNodeGridStructure() const;
+ MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
// tools
- MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
- MEDCOUPLING_EXPORT void translate(const double *vector);
- 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 *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ void getBoundingBox(double *bbox) const;
+ MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
+ MEDCouplingFieldDouble *buildOrthogonalField() const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ void rotate(const double *center, const double *vector, double angle);
+ void translate(const double *vector);
+ void scale(const double *point, double factor);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ DataArrayDouble *getCoordinatesAndOwner() const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
//some useful methods
- MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
+ void getNodeGridStructure(mcIdType *res) const;
//serialisation-unserialization
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
+ void reprQuickOverview(std::ostream& stream) const;
+ std::string getVTKFileExtension() const;
private:
void getMeasureFieldMeshDim1(bool isAbs, MEDCouplingFieldDouble *field) const;
void getMeasureFieldMeshDim2(bool isAbs, MEDCouplingFieldDouble *field) const;
{
class MEDCouplingFieldDouble;
- class MEDCouplingDefinitionTimeSlice : public RefCountObject
+ class MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice : public RefCountObject
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(const MEDCouplingFieldDouble *f, int meshId, const std::vector<int>& arrId, int fieldId);
- MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(TypeOfTimeDiscretization type, const std::vector<int>& tiI, const std::vector<double>& tiD);
- MEDCOUPLING_EXPORT int getArrayId() const { return _array_id; }
- MEDCOUPLING_EXPORT virtual MEDCouplingDefinitionTimeSlice *copy() const = 0;
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
- MEDCOUPLING_EXPORT virtual void getHotSpotsTime(std::vector<double>& ret) const = 0;
- MEDCOUPLING_EXPORT virtual void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const = 0;
- MEDCOUPLING_EXPORT virtual bool isContaining(double tmp, double eps) const = 0;
- MEDCOUPLING_EXPORT virtual int getStartId() const;
- MEDCOUPLING_EXPORT virtual int getEndId() const;
- MEDCOUPLING_EXPORT virtual void appendRepr(std::ostream& stream) const;
- MEDCOUPLING_EXPORT virtual double getStartTime() const = 0;
- MEDCOUPLING_EXPORT virtual double getEndTime() const = 0;
- MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector<int>& tiI, std::vector<double>& tiD) const = 0;
- MEDCOUPLING_EXPORT virtual TypeOfTimeDiscretization getTimeType() const = 0;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT bool isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
- MEDCOUPLING_EXPORT bool isOverllapingWithMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
- MEDCOUPLING_EXPORT bool isAfterMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
- MEDCOUPLING_EXPORT bool isBeforeMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
+ static MEDCouplingDefinitionTimeSlice *New(const MEDCouplingFieldDouble *f, int meshId, const std::vector<int>& arrId, int fieldId);
+ static MEDCouplingDefinitionTimeSlice *New(TypeOfTimeDiscretization type, const std::vector<int>& tiI, const std::vector<double>& tiD);
+ int getArrayId() const { return _array_id; }
+ virtual MEDCouplingDefinitionTimeSlice *copy() const = 0;
+ virtual bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
+ virtual void getHotSpotsTime(std::vector<double>& ret) const = 0;
+ virtual void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const = 0;
+ virtual bool isContaining(double tmp, double eps) const = 0;
+ virtual int getStartId() const;
+ virtual int getEndId() const;
+ virtual void appendRepr(std::ostream& stream) const;
+ virtual double getStartTime() const = 0;
+ virtual double getEndTime() const = 0;
+ virtual void getTinySerializationInformation(std::vector<int>& tiI, std::vector<double>& tiD) const = 0;
+ virtual TypeOfTimeDiscretization getTimeType() const = 0;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ bool isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
+ bool isOverllapingWithMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
+ bool isAfterMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
+ bool isBeforeMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const;
protected:
- MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice() { }
- MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId);
+ MEDCouplingDefinitionTimeSlice() { }
+ MEDCouplingDefinitionTimeSlice(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId);
protected:
int _mesh_id;
int _array_id;
int _field_id;
};
- class MEDCouplingDefinitionTimeSliceInst : public MEDCouplingDefinitionTimeSlice
+ class MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSliceInst : public MEDCouplingDefinitionTimeSlice
{
public:
static MEDCouplingDefinitionTimeSliceInst *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceInst"); }
+ std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceInst"); }
MEDCouplingDefinitionTimeSlice *copy() const;
bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
void getHotSpotsTime(std::vector<double>& ret) const;
double _instant;
};
- class MEDCouplingDefinitionTimeSliceCstOnTI : public MEDCouplingDefinitionTimeSlice
+ class MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSliceCstOnTI : public MEDCouplingDefinitionTimeSlice
{
public:
static MEDCouplingDefinitionTimeSliceCstOnTI *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceCstOnTI"); }
+ std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceCstOnTI"); }
MEDCouplingDefinitionTimeSlice *copy() const;
bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const;
void getHotSpotsTime(std::vector<double>& ret) const;
double _end;
};
- class MEDCouplingDefinitionTimeSliceLT : public MEDCouplingDefinitionTimeSlice
+ class MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSliceLT : public MEDCouplingDefinitionTimeSlice
{
public:
static MEDCouplingDefinitionTimeSliceLT *New(const std::vector<int>& tiI, const std::vector<double>& tiD);
double _end;
};
- class MEDCouplingDefinitionTime
+ class MEDCOUPLING_EXPORT MEDCouplingDefinitionTime
{
public:
- MEDCOUPLING_EXPORT MEDCouplingDefinitionTime();
- MEDCOUPLING_EXPORT MEDCouplingDefinitionTime(const std::vector<const MEDCouplingFieldDouble *>& fs, const std::vector<int>& meshRefs, const std::vector<std::vector<int> >& arrRefs);
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void assign(const MEDCouplingDefinitionTime& other);
- MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingDefinitionTime& other) const;
- MEDCOUPLING_EXPORT double getTimeResolution() const { return _eps; }
- MEDCOUPLING_EXPORT void getIdsOnTimeRight(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const;
- MEDCOUPLING_EXPORT void getIdsOnTimeLeft(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const;
- MEDCOUPLING_EXPORT void getIdsOnTime(double tm, std::vector<int>& meshIds, std::vector<int>& arrIds, std::vector<int>& arrIdsInField, std::vector<int>& fieldIds) const;
- MEDCOUPLING_EXPORT std::vector<double> getHotSpotsTime() const;
- MEDCOUPLING_EXPORT void appendRepr(std::ostream& stream) const;
+ MEDCouplingDefinitionTime();
+ MEDCouplingDefinitionTime(const std::vector<const MEDCouplingFieldDouble *>& fs, const std::vector<int>& meshRefs, const std::vector<std::vector<int> >& arrRefs);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void assign(const MEDCouplingDefinitionTime& other);
+ bool isEqual(const MEDCouplingDefinitionTime& other) const;
+ double getTimeResolution() const { return _eps; }
+ void getIdsOnTimeRight(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const;
+ void getIdsOnTimeLeft(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const;
+ void getIdsOnTime(double tm, std::vector<int>& meshIds, std::vector<int>& arrIds, std::vector<int>& arrIdsInField, std::vector<int>& fieldIds) const;
+ std::vector<double> getHotSpotsTime() const;
+ void appendRepr(std::ostream& stream) const;
public:
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<int>& tinyInfoI, std::vector<double>& tinyInfoD) const;
- MEDCOUPLING_EXPORT void unserialize(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
+ void getTinySerializationInformation(std::vector<int>& tinyInfoI, std::vector<double>& tinyInfoD) const;
+ void unserialize(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD);
private:
double _eps;
std::vector< MCAuto<MEDCouplingDefinitionTimeSlice> > _slices;
class MEDCouplingFieldDouble;
class MEDCouplingGaussLocalization;
- class MEDCouplingField : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingField : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT virtual bool areCompatibleForMerge(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT virtual bool areStrictlyCompatible(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForMulDiv(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingField *other);
- MEDCOUPLING_EXPORT void setMesh(const MEDCoupling::MEDCouplingMesh *mesh);
- MEDCOUPLING_EXPORT const MEDCoupling::MEDCouplingMesh *getMesh() const { return _mesh; }
- MEDCOUPLING_EXPORT MEDCoupling::MEDCouplingMesh *getMesh() { return const_cast<MEDCoupling::MEDCouplingMesh *>(_mesh); }
- MEDCOUPLING_EXPORT void setName(const std::string& name) { _name=name; }
- MEDCOUPLING_EXPORT std::string getDescription() const { return _desc; }
- MEDCOUPLING_EXPORT void setDescription(const std::string& desc) { _desc=desc; }
- MEDCOUPLING_EXPORT std::string getName() const { return _name; }
- MEDCOUPLING_EXPORT TypeOfField getTypeOfField() const;
- MEDCOUPLING_EXPORT NatureOfField getNature() const;
- MEDCOUPLING_EXPORT virtual void setNature(NatureOfField nat);
- MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscr() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT const MEDCouplingFieldDiscretization *getDiscretization() const { return _type; }
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *getDiscretization() { return _type; }
- MEDCOUPLING_EXPORT void setDiscretization(MEDCouplingFieldDiscretization *newDisc);
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpected() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlacesExpected() const;
+ virtual void checkConsistencyLight() const;
+ virtual bool areCompatibleForMerge(const MEDCouplingField *other) const;
+ virtual bool areStrictlyCompatible(const MEDCouplingField *other) const;
+ virtual bool areStrictlyCompatibleForMulDiv(const MEDCouplingField *other) const;
+ virtual void copyTinyStringsFrom(const MEDCouplingField *other);
+ void setMesh(const MEDCoupling::MEDCouplingMesh *mesh);
+ const MEDCoupling::MEDCouplingMesh *getMesh() const { return _mesh; }
+ MEDCoupling::MEDCouplingMesh *getMesh() { return const_cast<MEDCoupling::MEDCouplingMesh *>(_mesh); }
+ void setName(const std::string& name) { _name=name; }
+ std::string getDescription() const { return _desc; }
+ void setDescription(const std::string& desc) { _desc=desc; }
+ std::string getName() const { return _name; }
+ TypeOfField getTypeOfField() const;
+ NatureOfField getNature() const;
+ virtual void setNature(NatureOfField nat);
+ DataArrayDouble *getLocalizationOfDiscr() const;
+ MEDCouplingFieldDouble *buildMeasureField(bool isAbs) const;
+ MEDCouplingMesh *buildSubMeshData(const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+ MEDCouplingMesh *buildSubMeshDataRange(mcIdType begin, mcIdType end, mcIdType step, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ DataArrayIdType *computeTupleIdsToSelectFromCellIds(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ const MEDCouplingFieldDiscretization *getDiscretization() const { return _type; }
+ MEDCouplingFieldDiscretization *getDiscretization() { return _type; }
+ void setDiscretization(MEDCouplingFieldDiscretization *newDisc);
+ mcIdType getNumberOfTuplesExpected() const;
+ mcIdType getNumberOfMeshPlacesExpected() const;
// Gauss point specific methods
- MEDCOUPLING_EXPORT void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
+ void setGaussLocalizationOnType(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
+ void setGaussLocalizationOnCells(const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT void clearGaussLocalizations();
- MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(int locId);
- MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT mcIdType getNbOfGaussLocalization() const;
- MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(int locId, std::vector<mcIdType>& cellIds) const;
- MEDCOUPLING_EXPORT const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void clearGaussLocalizations();
+ MEDCouplingGaussLocalization& getGaussLocalization(int locId);
+ mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ mcIdType getNbOfGaussLocalization() const;
+ mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+ void getCellIdsHavingGaussLocalization(int locId, std::vector<mcIdType>& cellIds) const;
+ const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
// for MED file RW
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
+ mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ virtual void reprQuickOverview(std::ostream& stream) const = 0;
protected:
- MEDCOUPLING_EXPORT MEDCouplingField(TypeOfField type);
- MEDCOUPLING_EXPORT MEDCouplingField(const MEDCouplingField& other, bool deepCopy=true);
- MEDCOUPLING_EXPORT MEDCouplingField(MEDCouplingFieldDiscretization *type, NatureOfField nature=NoNature);
- MEDCOUPLING_EXPORT virtual ~MEDCouplingField();
- MEDCOUPLING_EXPORT bool isEqualIfNotWhyProtected(const MEDCouplingField *other, double meshPrec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStrProtected(const MEDCouplingField *other, double meshPrec) const;
+ MEDCouplingField(TypeOfField type);
+ MEDCouplingField(const MEDCouplingField& other, bool deepCopy=true);
+ MEDCouplingField(MEDCouplingFieldDiscretization *type, NatureOfField nature=NoNature);
+ virtual ~MEDCouplingField();
+ bool isEqualIfNotWhyProtected(const MEDCouplingField *other, double meshPrec, std::string& reason) const;
+ bool isEqualWithoutConsideringStrProtected(const MEDCouplingField *other, double meshPrec) const;
protected:
std::string _name;
std::string _desc;
class DataArrayDouble;
class MEDCouplingFieldDouble;
- class MEDCouplingFieldDiscretization : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldDiscretization *New(TypeOfField type);
- MEDCOUPLING_EXPORT double getPrecision() const { return _precision; }
- MEDCOUPLING_EXPORT void setPrecision(double val) { _precision=val; }
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT static TypeOfField GetTypeOfFieldFromStringRepr(const std::string& repr);
- MEDCOUPLING_EXPORT static std::string GetTypeOfFieldRepr(TypeOfField type);
- MEDCOUPLING_EXPORT virtual TypeOfField getEnum() const = 0;
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const;
- MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const = 0;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *deepCopy() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clone() const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
- MEDCOUPLING_EXPORT virtual std::string getStringRepr() const = 0;
- MEDCOUPLING_EXPORT virtual const char *getRepr() const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const = 0;
- MEDCOUPLING_EXPORT virtual void normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
- MEDCOUPLING_EXPORT virtual void normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
- MEDCOUPLING_EXPORT virtual void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
- MEDCOUPLING_EXPORT virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const = 0;
- MEDCOUPLING_EXPORT virtual void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+ static MEDCouplingFieldDiscretization *New(TypeOfField type);
+ double getPrecision() const { return _precision; }
+ void setPrecision(double val) { _precision=val; }
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ static TypeOfField GetTypeOfFieldFromStringRepr(const std::string& repr);
+ static std::string GetTypeOfFieldRepr(TypeOfField type);
+ virtual TypeOfField getEnum() const = 0;
+ virtual bool isEqual(const MEDCouplingFieldDiscretization *other, double eps) const;
+ virtual bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const = 0;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
+ virtual MEDCouplingFieldDiscretization *deepCopy() const;
+ virtual MEDCouplingFieldDiscretization *clone() const = 0;
+ virtual MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ virtual MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+ virtual std::string getStringRepr() const = 0;
+ virtual const char *getRepr() const = 0;
+ virtual mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
+ virtual mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const = 0;
+ virtual mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const = 0;
+ virtual DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const = 0;
+ virtual void normL1(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
+ virtual void normL2(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, double *res) const;
+ virtual void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
+ virtual DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const = 0;
+ virtual void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const = 0;
- MEDCOUPLING_EXPORT virtual void checkCompatibilityWithNature(NatureOfField nat) const = 0;
- MEDCOUPLING_EXPORT virtual void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
+ virtual void checkCompatibilityWithNature(NatureOfField nat) const = 0;
+ virtual void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ virtual void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
const mcIdType *old2NewBg, bool check) = 0;
- MEDCOUPLING_EXPORT virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
- MEDCOUPLING_EXPORT virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const = 0;
- MEDCOUPLING_EXPORT virtual void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const = 0;
- MEDCOUPLING_EXPORT virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT virtual void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const = 0;
- MEDCOUPLING_EXPORT virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const = 0;
- MEDCOUPLING_EXPORT virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const = 0;
- MEDCOUPLING_EXPORT virtual MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const = 0;
- MEDCOUPLING_EXPORT virtual void getSerializationIntArray(DataArrayIdType *& arr) const;
- MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<double>& tinyInfo);
- MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
- MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
- MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
+ virtual double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
+ virtual void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const = 0;
+ virtual MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const = 0;
+ virtual void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const = 0;
+ virtual void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const = 0;
+ virtual DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const = 0;
+ virtual DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const = 0;
+ virtual MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const = 0;
+ virtual MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ virtual void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const = 0;
+ virtual void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const = 0;
+ virtual void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const = 0;
+ virtual MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const = 0;
+ virtual void getSerializationIntArray(DataArrayIdType *& arr) const;
+ virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ virtual void finishUnserialization(const std::vector<double>& tinyInfo);
+ virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
+ virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
+ virtual void setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
+ virtual void setGaussLocalizationOnCells(const MEDCouplingMesh *m, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT virtual void clearGaussLocalizations();
- MEDCOUPLING_EXPORT virtual MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
- MEDCOUPLING_EXPORT virtual mcIdType getNbOfGaussLocalization() const;
- MEDCOUPLING_EXPORT virtual mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT virtual mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT virtual std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT virtual void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
- MEDCOUPLING_EXPORT virtual const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
- MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
- MEDCOUPLING_EXPORT virtual ~MEDCouplingFieldDiscretization();
+ virtual void clearGaussLocalizations();
+ virtual MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
+ virtual mcIdType getNbOfGaussLocalization() const;
+ virtual mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+ virtual mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ virtual std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ virtual void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
+ virtual const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
+ virtual void reprQuickOverview(std::ostream& stream) const = 0;
+ virtual ~MEDCouplingFieldDiscretization();
protected:
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization();
- MEDCOUPLING_EXPORT static void RenumberEntitiesFromO2NArr(double epsOnVals, const mcIdType *old2NewPtr, mcIdType newNbOfEntity, DataArrayDouble *arr, const std::string& msg);
- MEDCOUPLING_EXPORT static void RenumberEntitiesFromN2OArr(const mcIdType *new2OldPtr, mcIdType new2OldSz, DataArrayDouble *arr, const std::string& msg);
+ MEDCouplingFieldDiscretization();
+ static void RenumberEntitiesFromO2NArr(double epsOnVals, const mcIdType *old2NewPtr, mcIdType newNbOfEntity, DataArrayDouble *arr, const std::string& msg);
+ static void RenumberEntitiesFromN2OArr(const mcIdType *new2OldPtr, mcIdType new2OldSz, DataArrayDouble *arr, const std::string& msg);
template<class FIELD_DISC>
static MCAuto<MEDCouplingFieldDiscretization> EasyAggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds);
protected:
static const double DFLT_PRECISION;
};
- class MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP0 : public MEDCouplingFieldDiscretization
{
public:
- MEDCOUPLING_EXPORT TypeOfField getEnum() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationP0"); }
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT const char *getRepr() const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
+ TypeOfField getEnum() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationP0"); }
+ MEDCouplingFieldDiscretization *clone() const;
+ std::string getStringRepr() const;
+ const char *getRepr() const;
+ bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
+ mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+ mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+ DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
+ void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
const mcIdType *old2NewBg, bool check);
- MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
- MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+ DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
+ void checkCompatibilityWithNature(NatureOfField nat) const;
+ void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
- MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
- MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
+ MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
+ void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
+ void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+ DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+ void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+ void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+ void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
+ MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
+ MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+ MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ void reprQuickOverview(std::ostream& stream) const;
public:
static const char REPR[];
static const TypeOfField TYPE;
};
- class MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationOnNodes : public MEDCouplingFieldDiscretization
{
public:
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
+ mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+ mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+ DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
+ void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
const mcIdType *old2NewBg, bool check);
- MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+ DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
+ void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
- MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
+ void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
+ MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+ MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+ void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+ void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
public:
- MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+ void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
};
- class MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationP1 : public MEDCouplingFieldDiscretizationOnNodes
{
public:
- MEDCOUPLING_EXPORT TypeOfField getEnum() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationP1"); }
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT const char *getRepr() const;
- MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
- MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
+ TypeOfField getEnum() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationP1"); }
+ MEDCouplingFieldDiscretization *clone() const;
+ std::string getStringRepr() const;
+ const char *getRepr() const;
+ void checkCompatibilityWithNature(NatureOfField nat) const;
+ bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
+ MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
+ void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
+ DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+ void reprQuickOverview(std::ostream& stream) const;
+ MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
public:
static const char REPR[];
static const TypeOfField TYPE;
protected:
- MEDCOUPLING_EXPORT void getValueInCell(const MEDCouplingMesh *mesh, mcIdType cellId, const DataArrayDouble *arr, const double *loc, double *res) const;
+ void getValueInCell(const MEDCouplingMesh *mesh, mcIdType cellId, const DataArrayDouble *arr, const double *loc, double *res) const;
};
/*!
* This class abstracts MEDCouplingFieldDiscretization that needs an information on each cell to perform their job.
* All classes that inherits from this are more linked to mesh.
*/
- class MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationPerCell : public MEDCouplingFieldDiscretization
{
public:
- MEDCOUPLING_EXPORT const DataArrayIdType *getArrayOfDiscIds() const;
- MEDCOUPLING_EXPORT void setArrayOfDiscIds(const DataArrayIdType *adids);
- MEDCOUPLING_EXPORT void checkNoOrphanCells() const;
- MEDCOUPLING_EXPORT std::vector<DataArrayIdType *> splitIntoSingleGaussDicrPerCellType(std::vector< mcIdType >& locIds) const;
+ const DataArrayIdType *getArrayOfDiscIds() const;
+ void setArrayOfDiscIds(const DataArrayIdType *adids);
+ void checkNoOrphanCells() const;
+ std::vector<DataArrayIdType *> splitIntoSingleGaussDicrPerCellType(std::vector< mcIdType >& locIds) const;
protected:
MEDCouplingFieldDiscretizationPerCell();
MEDCouplingFieldDiscretizationPerCell(const MEDCouplingFieldDiscretizationPerCell& other, const mcIdType *startCellIds, const mcIdType *endCellIds);
static const mcIdType DFT_INVALID_LOCID_VALUE;
};
- class MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGauss : public MEDCouplingFieldDiscretizationPerCell
{
public:
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGauss();
- MEDCOUPLING_EXPORT TypeOfField getEnum() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationGauss"); }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT const char *getRepr() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
+ MEDCouplingFieldDiscretizationGauss();
+ TypeOfField getEnum() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationGauss"); }
+ bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingFieldDiscretization *other, double eps) const;
+ MEDCouplingFieldDiscretization *clone() const;
+ MEDCouplingFieldDiscretization *clonePart(const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ MEDCouplingFieldDiscretization *clonePartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+ std::string getStringRepr() const;
+ const char *getRepr() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+ mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+ DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
+ void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
const mcIdType *old2NewBg, bool check);
- MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+ DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
+ void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
- MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<double>& tinyInfo);
- MEDCOUPLING_EXPORT void getSerializationIntArray(DataArrayIdType *& arr) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
- MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
- MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
- MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
- MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
- MEDCOUPLING_EXPORT void setGaussLocalizationOnType(const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
+ void checkCompatibilityWithNature(NatureOfField nat) const;
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void finishUnserialization(const std::vector<double>& tinyInfo);
+ void getSerializationIntArray(DataArrayIdType *& arr) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *& arr);
+ void checkForUnserialization(const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *arr);
+ double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
+ void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
+ MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
+ void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
+ void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+ DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+ MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+ MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+ void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+ void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
+ MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
+ void setGaussLocalizationOnType(const MEDCouplingMesh *mesh, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT void setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
+ void setGaussLocalizationOnCells(const MEDCouplingMesh *mesh, const mcIdType *begin, const mcIdType *end, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg);
- MEDCOUPLING_EXPORT void clearGaussLocalizations();
- MEDCOUPLING_EXPORT void setGaussLocalization(mcIdType locId, const MEDCouplingGaussLocalization& loc);
- MEDCOUPLING_EXPORT void resizeLocalizationVector(mcIdType newSz);
- MEDCOUPLING_EXPORT MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
- MEDCOUPLING_EXPORT mcIdType getNbOfGaussLocalization() const;
- MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
- MEDCOUPLING_EXPORT const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
- MEDCOUPLING_EXPORT DataArrayIdType *buildNbOfGaussPointPerCellField() const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ void clearGaussLocalizations();
+ void setGaussLocalization(mcIdType locId, const MEDCouplingGaussLocalization& loc);
+ void resizeLocalizationVector(mcIdType newSz);
+ MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId);
+ mcIdType getNbOfGaussLocalization() const;
+ mcIdType getGaussLocalizationIdOfOneCell(mcIdType cellId) const;
+ mcIdType getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ std::set<mcIdType> getGaussLocalizationIdsOfOneType(INTERP_KERNEL::NormalizedCellType type) const;
+ void getCellIdsHavingGaussLocalization(mcIdType locId, std::vector<mcIdType>& cellIds) const;
+ const MEDCouplingGaussLocalization& getGaussLocalization(mcIdType locId) const;
+ DataArrayIdType *buildNbOfGaussPointPerCellField() const;
+ void reprQuickOverview(std::ostream& stream) const;
protected:
MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, const mcIdType *startCellIds=0, const mcIdType *endCellIds=0);
MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds);
/*!
* Gauss with points of values located on nodes of element. This is a specialization of MEDCouplingFieldDiscretizationGauss.
*/
- class MEDCouplingFieldDiscretizationGaussNE : public MEDCouplingFieldDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGaussNE : public MEDCouplingFieldDiscretization
{
public:
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGaussNE();
- MEDCOUPLING_EXPORT TypeOfField getEnum() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationGaussNE"); }
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT const char *getRepr() const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
+ MEDCouplingFieldDiscretizationGaussNE();
+ TypeOfField getEnum() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationGaussNE"); }
+ MEDCouplingFieldDiscretization *clone() const;
+ std::string getStringRepr() const;
+ const char *getRepr() const;
+ bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
+ mcIdType getNumberOfTuplesExpectedRegardingCode(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ mcIdType getNumberOfTuples(const MEDCouplingMesh *mesh) const;
+ mcIdType getNumberOfMeshPlaces(const MEDCouplingMesh *mesh) const;
+ DataArrayIdType *getOffsetArr(const MEDCouplingMesh *mesh) const;
+ void renumberArraysForCell(const MEDCouplingMesh *mesh, const std::vector<DataArray *>& arrays,
const mcIdType *old2NewBg, bool check);
- MEDCOUPLING_EXPORT DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
- MEDCOUPLING_EXPORT void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
- MEDCOUPLING_EXPORT void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
+ DataArrayDouble *getLocalizationOfDiscValues(const MEDCouplingMesh *mesh) const;
+ void integral(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, bool isWAbs, double *res) const;
+ void computeMeshRestrictionFromTupleIds(const MEDCouplingMesh *mesh, const mcIdType *tupleIdsBg, const mcIdType *tupleIdsEnd,
DataArrayIdType *&cellRestriction, DataArrayIdType *&trueTupleRestriction) const;
- MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
- MEDCOUPLING_EXPORT double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
- MEDCOUPLING_EXPORT void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
- MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
- MEDCOUPLING_EXPORT void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT static const double *GetWeightArrayFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
- MEDCOUPLING_EXPORT static const double *GetRefCoordsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
- MEDCOUPLING_EXPORT static const double *GetLocsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
+ void checkCompatibilityWithNature(NatureOfField nat) const;
+ double getIJK(const MEDCouplingMesh *mesh, const DataArrayDouble *da, mcIdType cellId, mcIdType nodeIdInCell, int compoId) const;
+ void checkCoherencyBetween(const MEDCouplingMesh *mesh, const DataArray *da) const;
+ MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
+ void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
+ void getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, mcIdType i, mcIdType j, mcIdType k, double *res) const;
+ DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+ MEDCouplingMesh *buildSubMeshData(const MEDCouplingMesh *mesh, const mcIdType *start, const mcIdType *end, DataArrayIdType *&di) const;
+ MEDCouplingMesh *buildSubMeshDataRange(const MEDCouplingMesh *mesh, mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType *&di) const;
+ DataArrayIdType *computeTupleIdsToSelectFromCellIds(const MEDCouplingMesh *mesh, const mcIdType *startCellIds, const mcIdType *endCellIds) const;
+ void renumberValuesOnNodes(double epsOnVals, const mcIdType *old2New, mcIdType newNbOfNodes, DataArrayDouble *arr) const;
+ void renumberValuesOnCells(double epsOnVals, const MEDCouplingMesh *mesh, const mcIdType *old2New, mcIdType newSz, DataArrayDouble *arr) const;
+ void renumberValuesOnCellsR(const MEDCouplingMesh *mesh, const mcIdType *new2old, mcIdType newSz, DataArrayDouble *arr) const;
+ MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
+ void reprQuickOverview(std::ostream& stream) const;
+ static const double *GetWeightArrayFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
+ static const double *GetRefCoordsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
+ static const double *GetLocsFromGeometricType(INTERP_KERNEL::NormalizedCellType geoType, std::size_t& lgth);
protected:
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationGaussNE(const MEDCouplingFieldDiscretizationGaussNE& other);
+ MEDCouplingFieldDiscretizationGaussNE(const MEDCouplingFieldDiscretizationGaussNE& other);
public:
static const char REPR[];
static const TypeOfField TYPE;
static const double LOC_PYRA13[39];//to check
};
- class MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDiscretizationKriging : public MEDCouplingFieldDiscretizationOnNodes
{
public:
- MEDCOUPLING_EXPORT TypeOfField getEnum() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationKriging"); }
- MEDCOUPLING_EXPORT const char *getRepr() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDiscretization *clone() const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT void checkCompatibilityWithNature(NatureOfField nat) const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
- MEDCOUPLING_EXPORT void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
+ TypeOfField getEnum() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDiscretizationKriging"); }
+ const char *getRepr() const;
+ MEDCouplingFieldDiscretization *clone() const;
+ std::string getStringRepr() const;
+ void checkCompatibilityWithNature(NatureOfField nat) const;
+ bool isEqualIfNotWhy(const MEDCouplingFieldDiscretization *other, double eps, std::string& reason) const;
+ MEDCouplingFieldDouble *getMeasureField(const MEDCouplingMesh *mesh, bool isAbs) const;
+ void getValueOn(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, double *res) const;
+ DataArrayDouble *getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfPoints) const;
+ void reprQuickOverview(std::ostream& stream) const;
+ MCAuto<MEDCouplingFieldDiscretization> aggregate(std::vector<const MEDCouplingFieldDiscretization *>& fds) const override;
public://specific part
- MEDCOUPLING_EXPORT DataArrayDouble *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfTargetPoints, mcIdType& nbCols) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeInverseMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, mcIdType& isDrift) const;
- MEDCOUPLING_EXPORT void operateOnDenseMatrix(int spaceDimension, mcIdType nbOfElems, double *matrixPtr) const;
- MEDCOUPLING_EXPORT DataArrayDouble *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta) const;
- MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH3(mcIdType nbOfElems, double *matrixPtr);
- MEDCOUPLING_EXPORT static void OperateOnDenseMatrixH2Ln(mcIdType nbOfElems, double *matrixPtr);
- MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta);
- MEDCOUPLING_EXPORT static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift);
+ DataArrayDouble *computeEvaluationMatrixOnGivenPts(const MEDCouplingMesh *mesh, const double *loc, mcIdType nbOfTargetPoints, mcIdType& nbCols) const;
+ DataArrayDouble *computeInverseMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
+ DataArrayDouble *computeMatrix(const MEDCouplingMesh *mesh, mcIdType& isDrift, mcIdType& matSz) const;
+ DataArrayDouble *computeVectorOfCoefficients(const MEDCouplingMesh *mesh, const DataArrayDouble *arr, mcIdType& isDrift) const;
+ void operateOnDenseMatrix(int spaceDimension, mcIdType nbOfElems, double *matrixPtr) const;
+ DataArrayDouble *performDrift(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta) const;
+ static void OperateOnDenseMatrixH3(mcIdType nbOfElems, double *matrixPtr);
+ static void OperateOnDenseMatrixH2Ln(mcIdType nbOfElems, double *matrixPtr);
+ static DataArrayDouble *PerformDriftRect(const DataArrayDouble *matr, const DataArrayDouble *arr, mcIdType& delta);
+ static DataArrayDouble *PerformDriftOfVec(const DataArrayDouble *arr, mcIdType isDrift);
public:
static const char REPR[];
static const TypeOfField TYPE;
class MEDCouplingFieldInt32;
class MEDCouplingFieldTemplate;
- class MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
+ class MEDCOUPLING_EXPORT MEDCouplingFieldDouble : public MEDCouplingFieldT<double>
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT void synchronizeTimeWithSupport();
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMerge(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const;
- MEDCOUPLING_EXPORT void renumberNodes(const mcIdType *old2NewBg, double eps=1e-15);
- MEDCOUPLING_EXPORT void renumberNodesWithoutMesh(const mcIdType *old2NewBg, mcIdType newNbOfNodes, double eps=1e-15);
- MEDCOUPLING_EXPORT DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *nodeToCellDiscretization() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *cellToNodeDiscretization() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldInt32 *convertToIntField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldFloat *convertToFloatField() const;
- MEDCOUPLING_EXPORT double getIJK(mcIdType cellId, int nodeIdInCell, int compoId) const;
- MEDCOUPLING_EXPORT double accumulate(int compId) const;
- MEDCOUPLING_EXPORT void accumulate(double *res) const;
- MEDCOUPLING_EXPORT double getMaxValue() const;
- MEDCOUPLING_EXPORT double getMaxValue2(DataArrayIdType*& tupleIds) const;
- MEDCOUPLING_EXPORT double getMinValue() const;
- MEDCOUPLING_EXPORT double getMinValue2(DataArrayIdType*& tupleIds) const;
- MEDCOUPLING_EXPORT double getAverageValue() const;
- MEDCOUPLING_EXPORT double norm2() const;
- MEDCOUPLING_EXPORT void getWeightedAverageValue(double *res, bool isWAbs=true) const;
- MEDCOUPLING_EXPORT double getWeightedAverageValue(int compId, bool isWAbs=true) const;
- MEDCOUPLING_EXPORT double normL1(int compId) const;
- MEDCOUPLING_EXPORT void normL1(double *res) const;
- MEDCOUPLING_EXPORT double normL2(int compId) const;
- MEDCOUPLING_EXPORT void normL2(double *res) const;
- MEDCOUPLING_EXPORT double normMax(int compId) const;
- MEDCOUPLING_EXPORT void normMax(double *res) const;
- MEDCOUPLING_EXPORT double integral(int compId, bool isWAbs) const;
- MEDCOUPLING_EXPORT void integral(bool isWAbs, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnPos(mcIdType i, mcIdType j, mcIdType k, double *res) const;
- MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double *res) const;
- MEDCOUPLING_EXPORT void getValueOn(const double *spaceLoc, double time, double *res) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getValueOnMulti(const double *spaceLoc, mcIdType nbOfPoints) const;
- MEDCOUPLING_EXPORT void applyLin(double a, double b, int compoId);
- MEDCOUPLING_EXPORT void applyLin(double a, double b);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble &operator=(double value);
- MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func);
- MEDCOUPLING_EXPORT void fillFromAnalytic(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT void fillFromAnalyticCompo(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT void fillFromAnalyticNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
- MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, FunctionToEvaluate func);
- MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, double val);
- MEDCOUPLING_EXPORT void applyFunc(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT void applyFuncCompo(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
- MEDCOUPLING_EXPORT void applyFunc(const std::string& func);
- MEDCOUPLING_EXPORT void applyFuncFast32(const std::string& func);
- MEDCOUPLING_EXPORT void applyFuncFast64(const std::string& func);
- MEDCOUPLING_EXPORT std::size_t getNumberOfComponents() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfTuples() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfValues() const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ static MEDCouplingFieldDouble *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ static MEDCouplingFieldDouble *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ void synchronizeTimeWithSupport();
+ std::string advancedRepr() const;
+ std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
+ bool areCompatibleForMerge(const MEDCouplingField *other) const;
+ bool areCompatibleForMeld(const MEDCouplingFieldDouble *other) const;
+ void renumberNodes(const mcIdType *old2NewBg, double eps=1e-15);
+ void renumberNodesWithoutMesh(const mcIdType *old2NewBg, mcIdType newNbOfNodes, double eps=1e-15);
+ DataArrayIdType *findIdsInRange(double vmin, double vmax) const;
+ MEDCouplingFieldDouble *deepCopy() const;
+ MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
+ MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCpy) const;
+ MEDCouplingFieldDouble *nodeToCellDiscretization() const;
+ MEDCouplingFieldDouble *cellToNodeDiscretization() const;
+ MEDCouplingFieldInt32 *convertToIntField() const;
+ MEDCouplingFieldFloat *convertToFloatField() const;
+ double getIJK(mcIdType cellId, int nodeIdInCell, int compoId) const;
+ double accumulate(int compId) const;
+ void accumulate(double *res) const;
+ double getMaxValue() const;
+ double getMaxValue2(DataArrayIdType*& tupleIds) const;
+ double getMinValue() const;
+ double getMinValue2(DataArrayIdType*& tupleIds) const;
+ double getAverageValue() const;
+ double norm2() const;
+ void getWeightedAverageValue(double *res, bool isWAbs=true) const;
+ double getWeightedAverageValue(int compId, bool isWAbs=true) const;
+ double normL1(int compId) const;
+ void normL1(double *res) const;
+ double normL2(int compId) const;
+ void normL2(double *res) const;
+ double normMax(int compId) const;
+ void normMax(double *res) const;
+ double integral(int compId, bool isWAbs) const;
+ void integral(bool isWAbs, double *res) const;
+ void getValueOnPos(mcIdType i, mcIdType j, mcIdType k, double *res) const;
+ void getValueOn(const double *spaceLoc, double *res) const;
+ void getValueOn(const double *spaceLoc, double time, double *res) const;
+ DataArrayDouble *getValueOnMulti(const double *spaceLoc, mcIdType nbOfPoints) const;
+ void applyLin(double a, double b, int compoId);
+ void applyLin(double a, double b);
+ MEDCouplingFieldDouble &operator=(double value);
+ void fillFromAnalytic(int nbOfComp, FunctionToEvaluate func);
+ void fillFromAnalytic(int nbOfComp, const std::string& func);
+ void fillFromAnalyticCompo(int nbOfComp, const std::string& func);
+ void fillFromAnalyticNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
+ void applyFunc(int nbOfComp, FunctionToEvaluate func);
+ void applyFunc(int nbOfComp, double val);
+ void applyFunc(int nbOfComp, const std::string& func);
+ void applyFuncCompo(int nbOfComp, const std::string& func);
+ void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
+ void applyFunc(const std::string& func);
+ void applyFuncFast32(const std::string& func);
+ void applyFuncFast64(const std::string& func);
+ std::size_t getNumberOfComponents() const;
+ mcIdType getNumberOfTuples() const;
+ mcIdType getNumberOfValues() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
//
- MEDCOUPLING_EXPORT void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps=1e-15);
- MEDCOUPLING_EXPORT void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps=1e-15);
- MEDCOUPLING_EXPORT bool mergeNodes(double eps, double epsOnVals=1e-15);
- MEDCOUPLING_EXPORT bool mergeNodesCenter(double eps, double epsOnVals=1e-15);
- MEDCOUPLING_EXPORT bool zipCoords(double epsOnVals=1e-15);
- MEDCOUPLING_EXPORT bool zipConnectivity(int compType, double epsOnVals=1e-15);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *extractSlice3D(const double *origin, const double *vec, double eps) const;
- MEDCOUPLING_EXPORT bool simplexize(int policy);
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDouble> voronoize(double eps) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDouble> convertQuadraticCellsToLinear() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeVectorFieldCyl(const double center[3], const double vect[3]) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *doublyContractedProduct() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *determinant() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *eigenValues() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *eigenVectors() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *inverse() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *trace() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *deviator() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *magnitude() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *maxPerTuple() const;
- MEDCOUPLING_EXPORT void changeNbOfComponents(std::size_t newNbOfComp, double dftValue=0.);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
- MEDCOUPLING_EXPORT void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<std::size_t>& compoIds);
- MEDCOUPLING_EXPORT void sortPerTuple(bool asc);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MergeFields(const std::vector<const MEDCouplingFieldDouble *>& a);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const { return DotFields(this,&other); }
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const { return CrossProductFields(this,&other); }
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const { return MaxFields(this,&other); }
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const { return MinFields(this,&other); }
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *negate() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const { return AddFields(this,&other); }
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const { return SubstractFields(this,&other); }
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps=1e-15);
+ void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps=1e-15);
+ bool mergeNodes(double eps, double epsOnVals=1e-15);
+ bool mergeNodesCenter(double eps, double epsOnVals=1e-15);
+ bool zipCoords(double epsOnVals=1e-15);
+ bool zipConnectivity(int compType, double epsOnVals=1e-15);
+ MEDCouplingFieldDouble *extractSlice3D(const double *origin, const double *vec, double eps) const;
+ bool simplexize(int policy);
+ MCAuto<MEDCouplingFieldDouble> voronoize(double eps) const;
+ MCAuto<MEDCouplingFieldDouble> convertQuadraticCellsToLinear() const;
+ MEDCouplingFieldDouble *computeVectorFieldCyl(const double center[3], const double vect[3]) const;
+ MEDCouplingFieldDouble *doublyContractedProduct() const;
+ MEDCouplingFieldDouble *determinant() const;
+ MEDCouplingFieldDouble *eigenValues() const;
+ MEDCouplingFieldDouble *eigenVectors() const;
+ MEDCouplingFieldDouble *inverse() const;
+ MEDCouplingFieldDouble *trace() const;
+ MEDCouplingFieldDouble *deviator() const;
+ MEDCouplingFieldDouble *magnitude() const;
+ MEDCouplingFieldDouble *maxPerTuple() const;
+ void changeNbOfComponents(std::size_t newNbOfComp, double dftValue=0.);
+ MEDCouplingFieldDouble *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
+ void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<std::size_t>& compoIds);
+ void sortPerTuple(bool asc);
+ static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ static MEDCouplingFieldDouble *MergeFields(const std::vector<const MEDCouplingFieldDouble *>& a);
+ static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const { return DotFields(this,&other); }
+ static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const { return CrossProductFields(this,&other); }
+ static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const { return MaxFields(this,&other); }
+ static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const { return MinFields(this,&other); }
+ MEDCouplingFieldDouble *negate() const;
+ MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const { return AddFields(this,&other); }
+ const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other);
+ static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const { return SubstractFields(this,&other); }
+ const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other);
+ static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
MEDCouplingFieldDouble *operator*(const MEDCouplingFieldDouble& other) const { return MultiplyFields(this,&other); }
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const { return DivideFields(this,&other); }
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const;
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other);
- MEDCOUPLING_EXPORT static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
- MEDCOUPLING_EXPORT static std::string WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary=true);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldDouble"); }
+ const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other);
+ static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const { return DivideFields(this,&other); }
+ const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other);
+ static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ MEDCouplingFieldDouble *operator^(const MEDCouplingFieldDouble& other) const;
+ const MEDCouplingFieldDouble &operator^=(const MEDCouplingFieldDouble& other);
+ static MEDCouplingFieldDouble *PowFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2);
+ static std::string WriteVTK(const std::string& fileName, const std::vector<const MEDCouplingFieldDouble *>& fs, bool isBinary=true);
+ std::string getClassName() const override { return std::string("MEDCouplingFieldDouble"); }
public:
- MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return timeDiscr(); }
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return timeDiscr(); }
+ const MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() const { return timeDiscr(); }
+ MEDCouplingTimeDiscretization *getTimeDiscretizationUnderGround() { return timeDiscr(); }
protected:
~MEDCouplingFieldDouble() { }
private:
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCpy);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type);
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldDouble> voronoizeGen(const Voronizer *vor, double eps) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *timeDiscr();
- MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretization *timeDiscr() const;
+ MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td);
+ MEDCouplingFieldDouble(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td);
+ MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCpy);
+ MEDCouplingFieldDouble(NatureOfField n, MEDCouplingTimeDiscretization *td, MEDCouplingFieldDiscretization *type);
+ MCAuto<MEDCouplingFieldDouble> voronoizeGen(const Voronizer *vor, double eps) const;
+ MEDCouplingTimeDiscretization *timeDiscr();
+ const MEDCouplingTimeDiscretization *timeDiscr() const;
};
}
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingFieldFloat : public MEDCouplingFieldT<float>
+ class MEDCOUPLING_EXPORT MEDCouplingFieldFloat : public MEDCouplingFieldT<float>
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldFloat *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT static MEDCouplingFieldFloat *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT MEDCouplingFieldFloat *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldFloat *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldFloat"); }
+ static MEDCouplingFieldFloat *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ static MEDCouplingFieldFloat *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ MEDCouplingFieldFloat *deepCopy() const;
+ MEDCouplingFieldFloat *clone(bool recDeepCpy) const;
+ MEDCouplingFieldDouble *convertToDblField() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldFloat"); }
protected:
MEDCouplingFieldFloat(TypeOfField type, TypeOfTimeDiscretization td);
MEDCouplingFieldFloat(const MEDCouplingFieldFloat& other, bool deepCpy);
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingFieldInt32 : public MEDCouplingFieldT<Int32>
+ class MEDCOUPLING_EXPORT MEDCouplingFieldInt32 : public MEDCouplingFieldT<Int32>
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt32 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt32 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT MEDCouplingFieldInt32 *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldInt32 *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldInt32"); }
+ static MEDCouplingFieldInt32 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ static MEDCouplingFieldInt32 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ MEDCouplingFieldInt32 *deepCopy() const;
+ MEDCouplingFieldInt32 *clone(bool recDeepCpy) const;
+ MEDCouplingFieldDouble *convertToDblField() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldInt32"); }
protected:
MEDCouplingFieldInt32(TypeOfField type, TypeOfTimeDiscretization td);
MEDCouplingFieldInt32(const MEDCouplingFieldInt32& other, bool deepCopy);
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingFieldInt64 : public MEDCouplingFieldT<Int64>
+ class MEDCOUPLING_EXPORT MEDCouplingFieldInt64 : public MEDCouplingFieldT<Int64>
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt64 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT static MEDCouplingFieldInt64 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
- MEDCOUPLING_EXPORT MEDCouplingFieldInt64 *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldInt64 *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *convertToDblField() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldInt64"); }
+ static MEDCouplingFieldInt64 *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ static MEDCouplingFieldInt64 *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ MEDCouplingFieldInt64 *deepCopy() const;
+ MEDCouplingFieldInt64 *clone(bool recDeepCpy) const;
+ MEDCouplingFieldDouble *convertToDblField() const;
+ std::string getClassName() const override { return std::string("MEDCouplingFieldInt64"); }
protected:
MEDCouplingFieldInt64(TypeOfField type, TypeOfTimeDiscretization td);
MEDCouplingFieldInt64(const MEDCouplingFieldInt64& other, bool deepCopy);
namespace MEDCoupling
{
- class MEDCouplingFieldOverTime : public MEDCouplingMultiFields
+ class MEDCOUPLING_EXPORT MEDCouplingFieldOverTime : public MEDCouplingMultiFields
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldOverTime *New(const std::vector<MEDCouplingFieldDouble *>& fs);
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT double getTimeTolerance() const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
+ static MEDCouplingFieldOverTime *New(const std::vector<MEDCouplingFieldDouble *>& fs);
+ void checkConsistencyLight() const;
+ double getTimeTolerance() const;
+ std::string simpleRepr() const;
+ bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
//void getIdsToFetch(double time, int& fieldId, int& arrId, int& meshId) const;
//void setFieldOnId(int fieldId, MEDCouplingFieldDouble *f);
//void dispatchPointers();
- MEDCOUPLING_EXPORT std::vector<MEDCouplingMesh *> getMeshes() const;
- MEDCOUPLING_EXPORT std::vector<MEDCouplingMesh *> getDifferentMeshes(std::vector<int>& refs) const;
- MEDCOUPLING_EXPORT std::vector<DataArrayDouble *> getArrays() const;
- MEDCOUPLING_EXPORT std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const;
- MEDCOUPLING_EXPORT MEDCouplingDefinitionTime getDefinitionTimeZone() const;
+ std::vector<MEDCouplingMesh *> getMeshes() const;
+ std::vector<MEDCouplingMesh *> getDifferentMeshes(std::vector<int>& refs) const;
+ std::vector<DataArrayDouble *> getArrays() const;
+ std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const;
+ MEDCouplingDefinitionTime getDefinitionTimeZone() const;
protected:
- MEDCOUPLING_EXPORT MEDCouplingFieldOverTime();
+ MEDCouplingFieldOverTime();
private:
MEDCouplingFieldOverTime(const std::vector<MEDCouplingFieldDouble *>& fs);
};
class MEDCouplingTimeDiscretizationTemplate;
template<class T>
- class MEDCouplingFieldT : public MEDCouplingField
+ class MEDCOUPLING_EXPORT MEDCouplingFieldT : public MEDCouplingField
{
protected:
MEDCouplingFieldT(const MEDCouplingFieldT<T>& other, bool deepCopy);
MEDCouplingFieldT(MEDCouplingFieldDiscretization *type, NatureOfField n, MEDCouplingTimeDiscretizationTemplate<T> *timeDiscr);
~MEDCouplingFieldT();
public:
- MEDCOUPLING_EXPORT TypeOfTimeDiscretization getTimeDiscretization() const;
- MEDCOUPLING_EXPORT virtual typename Traits<T>::FieldType *clone(bool recDeepCpy) const = 0;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT typename Traits<T>::FieldType *cloneWithMesh(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const DataArrayIdType *part) const;
- MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPart(const mcIdType *partBg, const mcIdType *partEnd) const;
- MEDCOUPLING_EXPORT typename Traits<T>::FieldType *buildSubPartRange(mcIdType begin, mcIdType end, mcIdType step) const;
- MEDCOUPLING_EXPORT void setArray(typename Traits<T>::ArrayType *array) { _time_discr->setArray(array,this); }
- MEDCOUPLING_EXPORT void setEndArray(typename Traits<T>::ArrayType *array) { _time_discr->setEndArray(array,this); }
- MEDCOUPLING_EXPORT const typename Traits<T>::ArrayType *getArray() const { return _time_discr->getArray(); }
- MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *getArray() { return _time_discr->getArray(); }
- MEDCOUPLING_EXPORT const typename Traits<T>::ArrayType *getEndArray() const { return _time_discr->getEndArray(); }
- MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *getEndArray() { return _time_discr->getEndArray(); }
- MEDCOUPLING_EXPORT void setArrays(const std::vector<typename Traits<T>::ArrayType *>& arrs) { _time_discr->setArrays(arrs,this); }
- MEDCOUPLING_EXPORT std::vector<typename Traits<T>::ArrayType *> getArrays() const { std::vector<typename Traits<T>::ArrayType *> ret; _time_discr->getArrays(ret); return ret; }
- MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit) { _time_discr->setTimeUnit(unit); }
- MEDCOUPLING_EXPORT std::string getTimeUnit() const { return _time_discr->getTimeUnit(); }
- MEDCOUPLING_EXPORT void setTimeTolerance(double val) { _time_discr->setTimeTolerance(val); }
- MEDCOUPLING_EXPORT double getTimeTolerance() const { return _time_discr->getTimeTolerance(); }
- MEDCOUPLING_EXPORT void setIteration(int it) { _time_discr->setIteration(it); }
- MEDCOUPLING_EXPORT void setEndIteration(int it) { _time_discr->setEndIteration(it); }
- MEDCOUPLING_EXPORT void setOrder(int order) { _time_discr->setOrder(order); }
- MEDCOUPLING_EXPORT void setEndOrder(int order) { _time_discr->setEndOrder(order); }
- MEDCOUPLING_EXPORT void setTimeValue(double val) { _time_discr->setTimeValue(val); }
- MEDCOUPLING_EXPORT void setEndTimeValue(double val) { _time_discr->setEndTimeValue(val); }
- MEDCOUPLING_EXPORT void setTime(double val, int iteration, int order) { _time_discr->setTime(val,iteration,order); }
- MEDCOUPLING_EXPORT void synchronizeTimeWithMesh();
- MEDCOUPLING_EXPORT void setStartTime(double val, int iteration, int order) { _time_discr->setStartTime(val,iteration,order); }
- MEDCOUPLING_EXPORT void setEndTime(double val, int iteration, int order) { _time_discr->setEndTime(val,iteration,order); }
- MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const { return _time_discr->getTime(iteration,order); }
- MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _time_discr->getStartTime(iteration,order); }
- MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _time_discr->getEndTime(iteration,order); }
- MEDCOUPLING_EXPORT T getIJ(mcIdType tupleId, std::size_t compoId) const { return getArray()->getIJ(tupleId,compoId); }
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
- MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec, std::string& reason) const;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingField *other);
- MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMulDiv(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ TypeOfTimeDiscretization getTimeDiscretization() const;
+ virtual typename Traits<T>::FieldType *clone(bool recDeepCpy) const = 0;
+ void checkConsistencyLight() const;
+ typename Traits<T>::FieldType *cloneWithMesh(bool recDeepCpy) const;
+ typename Traits<T>::FieldType *buildSubPart(const DataArrayIdType *part) const;
+ typename Traits<T>::FieldType *buildSubPart(const mcIdType *partBg, const mcIdType *partEnd) const;
+ typename Traits<T>::FieldType *buildSubPartRange(mcIdType begin, mcIdType end, mcIdType step) const;
+ void setArray(typename Traits<T>::ArrayType *array) { _time_discr->setArray(array,this); }
+ void setEndArray(typename Traits<T>::ArrayType *array) { _time_discr->setEndArray(array,this); }
+ const typename Traits<T>::ArrayType *getArray() const { return _time_discr->getArray(); }
+ typename Traits<T>::ArrayType *getArray() { return _time_discr->getArray(); }
+ const typename Traits<T>::ArrayType *getEndArray() const { return _time_discr->getEndArray(); }
+ typename Traits<T>::ArrayType *getEndArray() { return _time_discr->getEndArray(); }
+ void setArrays(const std::vector<typename Traits<T>::ArrayType *>& arrs) { _time_discr->setArrays(arrs,this); }
+ std::vector<typename Traits<T>::ArrayType *> getArrays() const { std::vector<typename Traits<T>::ArrayType *> ret; _time_discr->getArrays(ret); return ret; }
+ void setTimeUnit(const std::string& unit) { _time_discr->setTimeUnit(unit); }
+ std::string getTimeUnit() const { return _time_discr->getTimeUnit(); }
+ void setTimeTolerance(double val) { _time_discr->setTimeTolerance(val); }
+ double getTimeTolerance() const { return _time_discr->getTimeTolerance(); }
+ void setIteration(int it) { _time_discr->setIteration(it); }
+ void setEndIteration(int it) { _time_discr->setEndIteration(it); }
+ void setOrder(int order) { _time_discr->setOrder(order); }
+ void setEndOrder(int order) { _time_discr->setEndOrder(order); }
+ void setTimeValue(double val) { _time_discr->setTimeValue(val); }
+ void setEndTimeValue(double val) { _time_discr->setEndTimeValue(val); }
+ void setTime(double val, int iteration, int order) { _time_discr->setTime(val,iteration,order); }
+ void synchronizeTimeWithMesh();
+ void setStartTime(double val, int iteration, int order) { _time_discr->setStartTime(val,iteration,order); }
+ void setEndTime(double val, int iteration, int order) { _time_discr->setEndTime(val,iteration,order); }
+ double getTime(int& iteration, int& order) const { return _time_discr->getTime(iteration,order); }
+ double getStartTime(int& iteration, int& order) const { return _time_discr->getStartTime(iteration,order); }
+ double getEndTime(int& iteration, int& order) const { return _time_discr->getEndTime(iteration,order); }
+ T getIJ(mcIdType tupleId, std::size_t compoId) const { return getArray()->getIJ(tupleId,compoId); }
+ virtual bool isEqual(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
+ virtual bool isEqualIfNotWhy(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec, std::string& reason) const;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingFieldT<T> *other, double meshPrec, T valsPrec) const;
+ void copyTinyStringsFrom(const MEDCouplingField *other);
+ bool areStrictlyCompatible(const MEDCouplingField *other) const;
+ bool areStrictlyCompatibleForMulDiv(const MEDCouplingField *other) const;
+ std::string simpleRepr() const;
+ void reprQuickOverview(std::ostream& stream) const;
// specific
- MEDCOUPLING_EXPORT bool areCompatibleForMul(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForDiv(const MEDCouplingField *other) const;
- MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingFieldT<T> *other);
- MEDCOUPLING_EXPORT void copyAllTinyAttrFrom(const MEDCouplingFieldT<T> *other);
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT void renumberCellsWithoutMesh(const mcIdType *old2NewBg, bool check=true);
+ bool areCompatibleForMul(const MEDCouplingField *other) const;
+ bool areCompatibleForDiv(const MEDCouplingField *other) const;
+ void copyTinyAttrFrom(const MEDCouplingFieldT<T> *other);
+ void copyAllTinyAttrFrom(const MEDCouplingFieldT<T> *other);
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ void renumberCellsWithoutMesh(const mcIdType *old2NewBg, bool check=true);
//
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays);
- MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const DataArrayIdType *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays);
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const;
- MEDCOUPLING_EXPORT const MEDCouplingTimeDiscretizationTemplate<T> *timeDiscrSafe() const;
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays);
+ void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const DataArrayIdType *dataInt, const std::vector<typename Traits<T>::ArrayType *>& arrays);
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ void serialize(DataArrayIdType *&dataInt, std::vector<typename Traits<T>::ArrayType *>& arrays) const;
+ const MEDCouplingTimeDiscretizationTemplate<T> *timeDiscrSafe() const;
protected:
MEDCouplingTimeDiscretizationTemplate<T> *timeDiscrSafe();
protected:
* MEDCouplingRemapper::prepareEx, since it contains the minimal information requireds to prepare
* the interpolation matrix.
*/
- class MEDCouplingFieldTemplate : public MEDCouplingField
+ class MEDCOUPLING_EXPORT MEDCouplingFieldTemplate : public MEDCouplingField
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt32& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt64& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *New(TypeOfField type);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldDouble& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldFloat& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt32& f);
- MEDCOUPLING_EXPORT static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt64& f);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingFieldTemplate"); }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingFieldTemplate *other, double meshPrec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingFieldTemplate *other, double meshPrec) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingFieldTemplate *other, double meshPrec) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingFieldTemplate> clone(bool recDeepCpy) const;
+ static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f);
+ static MEDCouplingFieldTemplate *New(const MEDCouplingFieldFloat& f);
+ static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt32& f);
+ static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt64& f);
+ static MEDCouplingFieldTemplate *New(TypeOfField type);
+ static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldDouble& f);
+ static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldFloat& f);
+ static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt32& f);
+ static MEDCouplingFieldTemplate *NewWithoutCheck(const MEDCouplingFieldInt64& f);
+ std::string getClassName() const override { return std::string("MEDCouplingFieldTemplate"); }
+ bool isEqualIfNotWhy(const MEDCouplingFieldTemplate *other, double meshPrec, std::string& reason) const;
+ bool isEqual(const MEDCouplingFieldTemplate *other, double meshPrec) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingFieldTemplate *other, double meshPrec) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ void checkConsistencyLight() const;
+ MCAuto<MEDCouplingFieldTemplate> clone(bool recDeepCpy) const;
//
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt);
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&dataInt) const;
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, DataArrayIdType *&dataInt);
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ void serialize(DataArrayIdType *&dataInt) const;
//
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ void reprQuickOverview(std::ostream& stream) const;
private:
MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f, bool isChecked=true);
MEDCouplingFieldTemplate(const MEDCouplingFieldFloat& f, bool isChecked=true);
class MEDCouplingMesh;
class MEDCouplingUMesh;
- class MEDCouplingGaussLocalization
+ class MEDCOUPLING_EXPORT MEDCouplingGaussLocalization
{
public:
- MEDCOUPLING_EXPORT MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
+ MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& w);
- MEDCOUPLING_EXPORT MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ);
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const { return _type; }
- MEDCOUPLING_EXPORT void setType(INTERP_KERNEL::NormalizedCellType typ);
- MEDCOUPLING_EXPORT int getNumberOfGaussPt() const { return (int)_weight.size(); }
- MEDCOUPLING_EXPORT int getDimension() const;
- MEDCOUPLING_EXPORT int getNumberOfPtsInRefCell() const;
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT std::size_t getMemorySize() const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingGaussLocalization& other, double eps) const;
- MEDCOUPLING_EXPORT void pushTinySerializationIntInfo(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void pushTinySerializationDblInfo(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT const double *fillWithValues(const double *vals);
+ MEDCouplingGaussLocalization(INTERP_KERNEL::NormalizedCellType typ);
+ INTERP_KERNEL::NormalizedCellType getType() const { return _type; }
+ void setType(INTERP_KERNEL::NormalizedCellType typ);
+ int getNumberOfGaussPt() const { return (int)_weight.size(); }
+ int getDimension() const;
+ int getNumberOfPtsInRefCell() const;
+ std::string getStringRepr() const;
+ std::size_t getMemorySize() const;
+ void checkConsistencyLight() const;
+ bool isEqual(const MEDCouplingGaussLocalization& other, double eps) const;
+ void pushTinySerializationIntInfo(std::vector<mcIdType>& tinyInfo) const;
+ void pushTinySerializationDblInfo(std::vector<double>& tinyInfo) const;
+ const double *fillWithValues(const double *vals);
//
- MEDCOUPLING_EXPORT MCAuto<DataArrayDouble> localizePtsInRefCooForEachCell(const DataArrayDouble *ptsInRefCoo, const MEDCouplingUMesh *mesh) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> buildRefCell() const;
+ MCAuto<DataArrayDouble> localizePtsInRefCooForEachCell(const DataArrayDouble *ptsInRefCoo, const MEDCouplingUMesh *mesh) const;
+ MCAuto<MEDCouplingUMesh> buildRefCell() const;
//
- MEDCOUPLING_EXPORT const std::vector<double>& getRefCoords() const { return _ref_coord; }
- MEDCOUPLING_EXPORT double getRefCoord(int ptIdInCell, int comp) const;
- MEDCOUPLING_EXPORT const std::vector<double>& getGaussCoords() const { return _gauss_coord; }
- MEDCOUPLING_EXPORT double getGaussCoord(int gaussPtIdInCell, int comp) const;
- MEDCOUPLING_EXPORT const std::vector<double>& getWeights() const { return _weight; }
- MEDCOUPLING_EXPORT double getWeight(int gaussPtIdInCell, double newVal) const;
- MEDCOUPLING_EXPORT void setRefCoord(int ptIdInCell, int comp, double newVal);
- MEDCOUPLING_EXPORT void setGaussCoord(int gaussPtIdInCell, int comp, double newVal);
- MEDCOUPLING_EXPORT void setWeight(int gaussPtIdInCell, double newVal);
- MEDCOUPLING_EXPORT void setRefCoords(const std::vector<double>& refCoo);
- MEDCOUPLING_EXPORT void setGaussCoords(const std::vector<double>& gsCoo);
- MEDCOUPLING_EXPORT void setWeights(const std::vector<double>& w);
+ const std::vector<double>& getRefCoords() const { return _ref_coord; }
+ double getRefCoord(int ptIdInCell, int comp) const;
+ const std::vector<double>& getGaussCoords() const { return _gauss_coord; }
+ double getGaussCoord(int gaussPtIdInCell, int comp) const;
+ const std::vector<double>& getWeights() const { return _weight; }
+ double getWeight(int gaussPtIdInCell, double newVal) const;
+ void setRefCoord(int ptIdInCell, int comp, double newVal);
+ void setGaussCoord(int gaussPtIdInCell, int comp, double newVal);
+ void setWeight(int gaussPtIdInCell, double newVal);
+ void setRefCoords(const std::vector<double>& refCoo);
+ void setGaussCoords(const std::vector<double>& gsCoo);
+ void setWeights(const std::vector<double>& w);
//
- MEDCOUPLING_EXPORT static MEDCouplingGaussLocalization BuildNewInstanceFromTinyInfo(mcIdType dim, const std::vector<mcIdType>& tinyData);
- MEDCOUPLING_EXPORT static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
+ static MEDCouplingGaussLocalization BuildNewInstanceFromTinyInfo(mcIdType dim, const std::vector<mcIdType>& tinyData);
+ static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
private:
int checkCoherencyOfRequest(mcIdType gaussPtIdInCell, int comp) const;
private:
{
class MEDCouplingCMesh;
- class MEDCouplingIMesh : public MEDCouplingStructuredMesh
+ class MEDCOUPLING_EXPORT MEDCouplingIMesh : public MEDCouplingStructuredMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingIMesh *New();
- MEDCOUPLING_EXPORT static MEDCouplingIMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
+ static MEDCouplingIMesh *New();
+ static MEDCouplingIMesh *New(const std::string& meshName, int spaceDim, const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop,
const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingIMesh"); }
+ std::string getClassName() const override { return std::string("MEDCouplingIMesh"); }
//
- MEDCOUPLING_EXPORT void setSpaceDimension(int spaceDim);
- MEDCOUPLING_EXPORT void setNodeStruct(const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop);
- MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeStruct() const;
- MEDCOUPLING_EXPORT void setOrigin(const double *originStart, const double *originStop);
- MEDCOUPLING_EXPORT std::vector<double> getOrigin() const;
- MEDCOUPLING_EXPORT void setDXYZ(const double *dxyzStart, const double *dxyzStop);
- MEDCOUPLING_EXPORT std::vector<double> getDXYZ() const;
- MEDCOUPLING_EXPORT void setAxisUnit(const std::string& unitName);
- MEDCOUPLING_EXPORT std::string getAxisUnit() const;
- MEDCOUPLING_EXPORT double getMeasureOfAnyCell() const;
- MEDCOUPLING_EXPORT MEDCouplingCMesh *convertToCartesian() const;
- MEDCOUPLING_EXPORT void refineWithFactor(const std::vector<mcIdType>& factors);
- MEDCOUPLING_EXPORT MEDCouplingIMesh *asSingleCell() const;
- MEDCOUPLING_EXPORT static void CondenseFineToCoarse(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA);
- MEDCOUPLING_EXPORT static void CondenseFineToCoarseGhost(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA, mcIdType ghostSize);
- MEDCOUPLING_EXPORT static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts);
- MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
- MEDCOUPLING_EXPORT static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
+ void setSpaceDimension(int spaceDim);
+ void setNodeStruct(const mcIdType *nodeStrctStart, const mcIdType *nodeStrctStop);
+ std::vector<mcIdType> getNodeStruct() const;
+ void setOrigin(const double *originStart, const double *originStop);
+ std::vector<double> getOrigin() const;
+ void setDXYZ(const double *dxyzStart, const double *dxyzStop);
+ std::vector<double> getDXYZ() const;
+ void setAxisUnit(const std::string& unitName);
+ std::string getAxisUnit() const;
+ double getMeasureOfAnyCell() const;
+ MEDCouplingCMesh *convertToCartesian() const;
+ void refineWithFactor(const std::vector<mcIdType>& factors);
+ MEDCouplingIMesh *asSingleCell() const;
+ static void CondenseFineToCoarse(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA);
+ static void CondenseFineToCoarseGhost(const std::vector<mcIdType>& coarseSt, const DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, DataArrayDouble *coarseDA, mcIdType ghostSize);
+ static void SpreadCoarseToFine(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts);
+ static void SpreadCoarseToFineGhost(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
+ static void SpreadCoarseToFineGhostZone(const DataArrayDouble *coarseDA, const std::vector<mcIdType>& coarseSt, DataArrayDouble *fineDA, const std::vector< std::pair<mcIdType,mcIdType> >& fineLocInCoarse, const std::vector<mcIdType>& facts, mcIdType ghostSize);
//
- MEDCOUPLING_EXPORT MEDCouplingIMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingIMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
- MEDCOUPLING_EXPORT MEDCouplingIMesh *buildWithGhost(mcIdType ghostLev) const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() 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;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ MEDCouplingIMesh *deepCopy() const;
+ MEDCouplingIMesh *clone(bool recDeepCpy) const;
+ const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
+ MEDCouplingIMesh *buildWithGhost(mcIdType ghostLev) const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDCouplingMeshType getType() const { return IMAGE_GRID; }
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ int getSpaceDimension() const;
+ void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
// tools
- MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
- MEDCOUPLING_EXPORT void translate(const double *vector);
- 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 *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ void getBoundingBox(double *bbox) const;
+ MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ void rotate(const double *center, const double *vector, double angle);
+ void translate(const double *vector);
+ void scale(const double *point, double factor);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ DataArrayDouble *getCoordinatesAndOwner() const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
//some useful methods
- MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getNodeGridStructure() const;
+ void getNodeGridStructure(mcIdType *res) const;
+ std::vector<mcIdType> getNodeGridStructure() const;
MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const;
//serialisation-unserialization
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
+ void reprQuickOverview(std::ostream& stream) const;
+ std::string getVTKFileExtension() const;
private:
MEDCouplingIMesh();
MEDCouplingIMesh(const MEDCouplingIMesh& other, bool deepCopy);
class MEDCouplingCMesh;
class MEDCouplingFieldDouble;
- class MEDCouplingMappedExtrudedMesh : public MEDCouplingMesh
+ class MEDCOUPLING_EXPORT MEDCouplingMappedExtrudedMesh : public MEDCouplingMesh
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId);
- MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D);
- MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingMappedExtrudedMesh"); }
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT int getMeshDimension() const;
- MEDCOUPLING_EXPORT MEDCouplingMappedExtrudedMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingMappedExtrudedMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId);
+ static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D);
+ static MEDCouplingMappedExtrudedMesh *New();
+ std::string getClassName() const override { return std::string("MEDCouplingMappedExtrudedMesh"); }
+ MEDCouplingMeshType getType() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ mcIdType getNumberOfCells() const;
+ mcIdType getNumberOfNodes() const;
+ int getSpaceDimension() const;
+ int getMeshDimension() const;
+ MEDCouplingMappedExtrudedMesh *deepCopy() const;
+ MEDCouplingMappedExtrudedMesh *clone(bool recDeepCpy) const;
+ const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const;
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const;
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
- MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
- MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh2D() const { return _mesh2D.iAmATrollConstCast(); }
- MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh1D() const { return _mesh1D.iAmATrollConstCast(); }
- MEDCOUPLING_EXPORT DataArrayIdType *getMesh3DIds() const { return _mesh3D_ids.iAmATrollConstCast(); }
- MEDCOUPLING_EXPORT MEDCouplingUMesh *build3DUnstructuredMesh() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT static mcIdType FindCorrespCellByNodalConn(const std::vector<mcIdType>& nodalConnec,
+ INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
+ DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ DataArrayIdType *computeNbOfNodesPerCell() const;
+ DataArrayIdType *computeNbOfFacesPerCell() const;
+ DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+ void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ void getBoundingBox(double *bbox) const;
+ void updateTime() const;
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ MEDCouplingUMesh *getMesh2D() const { return _mesh2D.iAmATrollConstCast(); }
+ MEDCouplingUMesh *getMesh1D() const { return _mesh1D.iAmATrollConstCast(); }
+ DataArrayIdType *getMesh3DIds() const { return _mesh3D_ids.iAmATrollConstCast(); }
+ MEDCouplingUMesh *build3DUnstructuredMesh() const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ MEDCouplingFieldDouble *getMeasureField(bool) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const;
+ MEDCouplingFieldDouble *buildOrthogonalField() const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ static mcIdType FindCorrespCellByNodalConn(const std::vector<mcIdType>& nodalConnec,
const mcIdType *revNodalPtr, const mcIdType *revNodalIndxPtr);
- MEDCOUPLING_EXPORT static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
+ static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v);
- MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
- MEDCOUPLING_EXPORT void translate(const double *vector);
- MEDCOUPLING_EXPORT void scale(const double *point, double factor);
- MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
- MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
- MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
- MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+ void rotate(const double *center, const double *vector, double angle);
+ void translate(const double *vector);
+ void scale(const double *point, double factor);
+ std::vector<mcIdType> getDistributionOfTypes() const;
+ DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+ MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+ MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+ DataArrayIdType *simplexize(int policy);
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ DataArrayDouble *getCoordinatesAndOwner() const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
//Serialization unserialisation
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
- MEDCOUPLING_EXPORT mcIdType get2DCellIdForExtrusion() const { return _cell_2D_id; }
+ void reprQuickOverview(std::ostream& stream) const;
+ std::string getVTKFileExtension() const;
+ mcIdType get2DCellIdForExtrusion() const { return _cell_2D_id; }
private:
MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, mcIdType cell2DId);
MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D);
* The aim of this class is \b NOT to reimplement all linear algebra but only to store a dense matrix.
* It only provides basic set/get and basic operations and bindings to linear algebra libraries (numpy/scipy) and a compatible format to Petsc.
*/
- class DenseMatrix : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT DenseMatrix : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT static DenseMatrix *New(mcIdType nbRows, mcIdType nbCols);
- MEDCOUPLING_EXPORT static DenseMatrix *New(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("DenseMatrix"); }
- MEDCOUPLING_EXPORT DenseMatrix *deepCopy() const;
- MEDCOUPLING_EXPORT DenseMatrix *shallowCpy() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void updateTime() const;
+ static DenseMatrix *New(mcIdType nbRows, mcIdType nbCols);
+ static DenseMatrix *New(DataArrayDouble *array, mcIdType nbRows, mcIdType nbCols);
+ std::string getClassName() const override { return std::string("DenseMatrix"); }
+ DenseMatrix *deepCopy() const;
+ DenseMatrix *shallowCpy() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
//
- MEDCOUPLING_EXPORT mcIdType getNumberOfRows() const { return _nb_rows; }
- MEDCOUPLING_EXPORT mcIdType getNumberOfCols() const { return _nb_cols; }
- MEDCOUPLING_EXPORT mcIdType getNbOfElems() const { return _nb_rows*_nb_cols; }
- MEDCOUPLING_EXPORT void reBuild(DataArrayDouble *array, mcIdType nbRows=-1, mcIdType nbCols=-1);
- MEDCOUPLING_EXPORT void reShape(mcIdType nbRows, mcIdType nbCols);
- MEDCOUPLING_EXPORT void transpose();
+ mcIdType getNumberOfRows() const { return _nb_rows; }
+ mcIdType getNumberOfCols() const { return _nb_cols; }
+ mcIdType getNbOfElems() const { return _nb_rows*_nb_cols; }
+ void reBuild(DataArrayDouble *array, mcIdType nbRows=-1, mcIdType nbCols=-1);
+ void reShape(mcIdType nbRows, mcIdType nbCols);
+ void transpose();
//
- MEDCOUPLING_EXPORT bool isEqual(const DenseMatrix& other, double eps) const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const DenseMatrix& other, double eps, std::string& reason) const;
- MEDCOUPLING_EXPORT DataArrayDouble *matVecMult(const DataArrayDouble *vec) const;
- MEDCOUPLING_EXPORT static DataArrayDouble *MatVecMult(const DenseMatrix *mat, const DataArrayDouble *vec);
- MEDCOUPLING_EXPORT static DenseMatrix *Add(const DenseMatrix *a1, const DenseMatrix *a2);
- MEDCOUPLING_EXPORT void addEqual(const DenseMatrix *other);
- MEDCOUPLING_EXPORT static DenseMatrix *Substract(const DenseMatrix *a1, const DenseMatrix *a2);
- MEDCOUPLING_EXPORT void substractEqual(const DenseMatrix *other);
- MEDCOUPLING_EXPORT static DenseMatrix *Multiply(const DenseMatrix *a1, const DenseMatrix *a2);
- MEDCOUPLING_EXPORT static DenseMatrix *Multiply(const DenseMatrix *a1, const DataArrayDouble *a2);
+ bool isEqual(const DenseMatrix& other, double eps) const;
+ bool isEqualIfNotWhy(const DenseMatrix& other, double eps, std::string& reason) const;
+ DataArrayDouble *matVecMult(const DataArrayDouble *vec) const;
+ static DataArrayDouble *MatVecMult(const DenseMatrix *mat, const DataArrayDouble *vec);
+ static DenseMatrix *Add(const DenseMatrix *a1, const DenseMatrix *a2);
+ void addEqual(const DenseMatrix *other);
+ static DenseMatrix *Substract(const DenseMatrix *a1, const DenseMatrix *a2);
+ void substractEqual(const DenseMatrix *other);
+ static DenseMatrix *Multiply(const DenseMatrix *a1, const DenseMatrix *a2);
+ static DenseMatrix *Multiply(const DenseMatrix *a1, const DataArrayDouble *a2);
//
- MEDCOUPLING_EXPORT const DataArrayDouble *getData() const { return _data; }
- MEDCOUPLING_EXPORT DataArrayDouble *getData() { return _data; }
+ const DataArrayDouble *getData() const { return _data; }
+ DataArrayDouble *getData() { return _data; }
private:
~DenseMatrix();
DenseMatrix(mcIdType nbRows, mcIdType nbCols);
namespace MEDCoupling
{
template<class T>
- class DataArrayTemplate : public DataArray
+ class MEDCOUPLING_EXPORT DataArrayTemplate : public DataArray
{
public:
typedef T Type;
};
template<class T>
- class DataArrayTemplateClassic : public DataArrayTemplate<T>
+ class MEDCOUPLING_EXPORT DataArrayTemplateClassic : public DataArrayTemplate<T>
{
public:
MCAuto<DataArrayDouble> convertToDblArr() const;
namespace MEDCoupling
{
template<class T>
- class DataArrayDiscrete : public DataArrayTemplateClassic<T>
+ class MEDCOUPLING_EXPORT DataArrayDiscrete : public DataArrayTemplateClassic<T>
{
public:
using DataArrayType = typename Traits<T>::ArrayType;
class MEDCouplingUMesh;
class MEDCouplingFieldDouble;
- class MEDCouplingMesh : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingMesh : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT void setName(const std::string& name) { _name=name; }
- MEDCOUPLING_EXPORT std::string getName() const { return _name; }
- MEDCOUPLING_EXPORT void setDescription(const std::string& descr) { _description=descr; }
- MEDCOUPLING_EXPORT std::string getDescription() const { return _description; }
- MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
- MEDCOUPLING_EXPORT void setTime(double val, int iteration, int order) { _time=val; _iteration=iteration; _order=order; }
- MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit) { _time_unit=unit; }
- MEDCOUPLING_EXPORT std::string getTimeUnit() const { return _time_unit; }
- MEDCOUPLING_EXPORT virtual MEDCouplingMeshType getType() const = 0;
- MEDCOUPLING_EXPORT bool isStructured() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ void setName(const std::string& name) { _name=name; }
+ std::string getName() const { return _name; }
+ void setDescription(const std::string& descr) { _description=descr; }
+ std::string getDescription() const { return _description; }
+ double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
+ void setTime(double val, int iteration, int order) { _time=val; _iteration=iteration; _order=order; }
+ void setTimeUnit(const std::string& unit) { _time_unit=unit; }
+ std::string getTimeUnit() const { return _time_unit; }
+ virtual MEDCouplingMeshType getType() const = 0;
+ bool isStructured() const;
// Copy methods
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *deepCopy() const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *clone(bool recDeepCpy) const = 0;
- MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT virtual void copyTinyInfoFrom(const MEDCouplingMesh *other);
+ virtual MEDCouplingMesh *deepCopy() const = 0;
+ virtual MEDCouplingMesh *clone(bool recDeepCpy) const = 0;
+ virtual void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ virtual void copyTinyInfoFrom(const MEDCouplingMesh *other);
// comparison methods
- MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const = 0;
- MEDCOUPLING_EXPORT virtual void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ virtual bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ virtual bool isEqual(const MEDCouplingMesh *other, double prec) const;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const = 0;
+ virtual void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const = 0;
- MEDCOUPLING_EXPORT virtual void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ virtual void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const = 0;
- MEDCOUPLING_EXPORT virtual void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec,
+ virtual void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
+ void checkGeoEquivalWith(const MEDCouplingMesh *other, int levOfCheck, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
//
- MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const = 0;
- MEDCOUPLING_EXPORT virtual void checkConsistency(double eps=1e-12) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfCells() const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfNodes() const = 0;
- MEDCOUPLING_EXPORT virtual int getSpaceDimension() const = 0;
- MEDCOUPLING_EXPORT virtual int getMeshDimension() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayDouble *getCoordinatesAndOwner() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayDouble *computeCellCenterOfMass() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *computeNbOfNodesPerCell() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *computeEffectiveNbOfNodesPerCell() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *computeNbOfFacesPerCell() const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
- MEDCOUPLING_EXPORT virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const = 0;
- MEDCOUPLING_EXPORT virtual std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const = 0;
- MEDCOUPLING_EXPORT virtual void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
- MEDCOUPLING_EXPORT virtual void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const = 0;
- MEDCOUPLING_EXPORT virtual std::string simpleRepr() const = 0;
- MEDCOUPLING_EXPORT virtual std::string advancedRepr() const = 0;
+ virtual void checkConsistencyLight() const = 0;
+ virtual void checkConsistency(double eps=1e-12) const = 0;
+ virtual mcIdType getNumberOfCells() const = 0;
+ virtual mcIdType getNumberOfNodes() const = 0;
+ virtual int getSpaceDimension() const = 0;
+ virtual int getMeshDimension() const = 0;
+ virtual DataArrayDouble *getCoordinatesAndOwner() const = 0;
+ virtual DataArrayDouble *computeCellCenterOfMass() const = 0;
+ virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const = 0;
+ virtual DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
+ virtual DataArrayIdType *computeNbOfNodesPerCell() const = 0;
+ virtual DataArrayIdType *computeEffectiveNbOfNodesPerCell() const = 0;
+ virtual DataArrayIdType *computeNbOfFacesPerCell() const = 0;
+ virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0;
+ virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const = 0;
+ virtual std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const = 0;
+ virtual void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const = 0;
+ virtual DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
+ virtual void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const = 0;
+ virtual std::string simpleRepr() const = 0;
+ virtual std::string advancedRepr() const = 0;
// tools
- MEDCOUPLING_EXPORT virtual const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const = 0;
- MEDCOUPLING_EXPORT virtual std::vector<mcIdType> getDistributionOfTypes() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
- MEDCOUPLING_EXPORT virtual void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const = 0;
- MEDCOUPLING_EXPORT virtual void getBoundingBox(double *bbox) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getCellContainingPoint(const double *pos, double eps) const = 0;
- MEDCOUPLING_EXPORT virtual void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const = 0;
- MEDCOUPLING_EXPORT virtual void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
- MEDCOUPLING_EXPORT virtual void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalyticCompo(TypeOfField t, int nbOfComp, const std::string& func) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *fillFromAnalyticNamedCompo(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *buildOrthogonalField() const = 0;
- MEDCOUPLING_EXPORT virtual void rotate(const double *center, const double *vector, double angle) = 0;
- MEDCOUPLING_EXPORT virtual void translate(const double *vector) = 0;
- MEDCOUPLING_EXPORT virtual void scale(const double *point, double factor) = 0;
- MEDCOUPLING_EXPORT virtual void renumberCells(const mcIdType *old2NewBg, bool check=true) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingUMesh *buildUnstructured() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *simplexize(int policy) = 0;
- MEDCOUPLING_EXPORT virtual void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const = 0;
- MEDCOUPLING_EXPORT virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
- MEDCOUPLING_EXPORT static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
- MEDCOUPLING_EXPORT static MEDCouplingMesh *MergeMeshes(std::vector<const MEDCouplingMesh *>& meshes);
- MEDCOUPLING_EXPORT static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType(INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static mcIdType GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static int GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
- MEDCOUPLING_EXPORT static const char *GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
+ virtual const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const = 0;
+ virtual std::vector<mcIdType> getDistributionOfTypes() const = 0;
+ virtual DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const = 0;
+ virtual void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const = 0;
+ virtual void getBoundingBox(double *bbox) const = 0;
+ virtual MEDCouplingFieldDouble *getMeasureField(bool isAbs) const = 0;
+ virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const = 0;
+ virtual mcIdType getCellContainingPoint(const double *pos, double eps) const = 0;
+ virtual void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const = 0;
+ virtual void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
+ virtual void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const;
+ virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, FunctionToEvaluate func) const;
+ virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const;
+ virtual MEDCouplingFieldDouble *fillFromAnalyticCompo(TypeOfField t, int nbOfComp, const std::string& func) const;
+ virtual MEDCouplingFieldDouble *fillFromAnalyticNamedCompo(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const;
+ virtual MEDCouplingFieldDouble *buildOrthogonalField() const = 0;
+ virtual void rotate(const double *center, const double *vector, double angle) = 0;
+ virtual void translate(const double *vector) = 0;
+ virtual void scale(const double *point, double factor) = 0;
+ virtual void renumberCells(const mcIdType *old2NewBg, bool check=true) = 0;
+ virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const = 0;
+ virtual MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const = 0;
+ virtual MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const = 0;
+ virtual MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+ virtual MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
+ virtual MEDCouplingUMesh *buildUnstructured() const = 0;
+ virtual DataArrayIdType *simplexize(int policy) = 0;
+ virtual void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const = 0;
+ virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
+ static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
+ static MEDCouplingMesh *MergeMeshes(std::vector<const MEDCouplingMesh *>& meshes);
+ static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type);
+ static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type);
+ static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType(INTERP_KERNEL::NormalizedCellType type);
+ static mcIdType GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
+ static int GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
+ static const char *GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type);
//serialisation-unserialization
- MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
- MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
- MEDCOUPLING_EXPORT virtual void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const = 0;
- MEDCOUPLING_EXPORT virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ virtual void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
+ virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
+ virtual void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const = 0;
+ virtual void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings) = 0;
- MEDCOUPLING_EXPORT std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
- MEDCOUPLING_EXPORT std::string getVTKFileNameOf(const std::string& fileName) const;
- MEDCOUPLING_EXPORT virtual std::string getVTKFileExtension() const = 0;
+ std::string writeVTK(const std::string& fileName, bool isBinary=true) const;
+ std::string getVTKFileNameOf(const std::string& fileName) const;
+ virtual std::string getVTKFileExtension() const = 0;
/// @cond INTERNAL
- MEDCOUPLING_EXPORT void writeVTKAdvanced(const std::string& fileName, const std::string& cda, const std::string& pda, DataArrayByte *byteData) const;
- MEDCOUPLING_EXPORT static void SplitExtension(const std::string& fileName, std::string& baseName, std::string& extension);
+ void writeVTKAdvanced(const std::string& fileName, const std::string& cda, const std::string& pda, DataArrayByte *byteData) const;
+ static void SplitExtension(const std::string& fileName, std::string& baseName, std::string& extension);
/// @endcond
- MEDCOUPLING_EXPORT virtual void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const = 0;
- MEDCOUPLING_EXPORT virtual void reprQuickOverview(std::ostream& stream) const = 0;
+ virtual void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const = 0;
+ virtual void reprQuickOverview(std::ostream& stream) const = 0;
protected:
- MEDCOUPLING_EXPORT MEDCouplingMesh();
- MEDCOUPLING_EXPORT MEDCouplingMesh(const MEDCouplingMesh& other);
- MEDCOUPLING_EXPORT virtual std::string getVTKDataSetType() const = 0;
- MEDCOUPLING_EXPORT virtual ~MEDCouplingMesh() { }
+ MEDCouplingMesh();
+ MEDCouplingMesh(const MEDCouplingMesh& other);
+ virtual std::string getVTKDataSetType() const = 0;
+ virtual ~MEDCouplingMesh() { }
private:
std::string _name;
std::string _description;
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingMultiFields : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT MEDCouplingMultiFields : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingMultiFields *New(const std::vector<MEDCouplingFieldDouble *>& fs);
- MEDCOUPLING_EXPORT static MEDCouplingMultiFields *New();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingMultiFields"); }
- MEDCOUPLING_EXPORT MEDCouplingMultiFields *deepCopy() const;
- MEDCOUPLING_EXPORT std::string getName() const;
- MEDCOUPLING_EXPORT std::string getDescription() const;
- MEDCOUPLING_EXPORT std::string getTimeUnit() const;
- MEDCOUPLING_EXPORT double getTimeResolution() const;
- MEDCOUPLING_EXPORT virtual std::string simpleRepr() const;
- MEDCOUPLING_EXPORT virtual std::string advancedRepr() const;
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble *getFieldWithId(int id) const;
- MEDCOUPLING_EXPORT std::vector<const MEDCouplingFieldDouble *> getFields() const;
- MEDCOUPLING_EXPORT int getNumberOfFields() const;
- MEDCOUPLING_EXPORT const MEDCouplingFieldDouble *getFieldAtPos(int id) const;
- MEDCOUPLING_EXPORT virtual std::vector<MEDCouplingMesh *> getMeshes() const;
- MEDCOUPLING_EXPORT virtual std::vector<MEDCouplingMesh *> getDifferentMeshes(std::vector<int>& refs) const;
- MEDCOUPLING_EXPORT virtual std::vector<DataArrayDouble *> getArrays() const;
- MEDCOUPLING_EXPORT virtual std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const;
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<mcIdType>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD,
+ static MEDCouplingMultiFields *New(const std::vector<MEDCouplingFieldDouble *>& fs);
+ static MEDCouplingMultiFields *New();
+ std::string getClassName() const override { return std::string("MEDCouplingMultiFields"); }
+ MEDCouplingMultiFields *deepCopy() const;
+ std::string getName() const;
+ std::string getDescription() const;
+ std::string getTimeUnit() const;
+ double getTimeResolution() const;
+ virtual std::string simpleRepr() const;
+ virtual std::string advancedRepr() const;
+ virtual bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
+ const MEDCouplingFieldDouble *getFieldWithId(int id) const;
+ std::vector<const MEDCouplingFieldDouble *> getFields() const;
+ int getNumberOfFields() const;
+ const MEDCouplingFieldDouble *getFieldAtPos(int id) const;
+ virtual std::vector<MEDCouplingMesh *> getMeshes() const;
+ virtual std::vector<MEDCouplingMesh *> getDifferentMeshes(std::vector<int>& refs) const;
+ virtual std::vector<DataArrayDouble *> getArrays() const;
+ virtual std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void getTinySerializationInformation(std::vector<mcIdType>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD,
const std::vector<MEDCouplingFieldTemplate *>& ft, const std::vector<MEDCouplingMesh *>& ms,
const std::vector<DataArrayDouble *>& das);
- MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const;
+ virtual void checkConsistencyLight() const;
protected:
- MEDCOUPLING_EXPORT MEDCouplingMultiFields(const std::vector<MEDCouplingFieldDouble *>& fs);
- MEDCOUPLING_EXPORT MEDCouplingMultiFields(const MEDCouplingMultiFields& other);
- MEDCOUPLING_EXPORT MEDCouplingMultiFields();
+ MEDCouplingMultiFields(const std::vector<MEDCouplingFieldDouble *>& fs);
+ MEDCouplingMultiFields(const MEDCouplingMultiFields& other);
+ MEDCouplingMultiFields();
protected:
std::vector< MCAuto<MEDCouplingFieldDouble> > _fs;
};
namespace MEDCoupling
{
- class PartDefinition : public RefCountObject, public TimeLabel
+ class MEDCOUPLING_EXPORT PartDefinition : public RefCountObject, public TimeLabel
{
public:
- MEDCOUPLING_EXPORT static PartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
- MEDCOUPLING_EXPORT static PartDefinition *New(DataArrayIdType *listOfIds);
- MEDCOUPLING_EXPORT static PartDefinition *Unserialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
- MEDCOUPLING_EXPORT virtual bool isEqual(const PartDefinition *other, std::string& what) const = 0;
- MEDCOUPLING_EXPORT virtual PartDefinition *deepCopy() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *toDAI() const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfElems() const = 0;
- MEDCOUPLING_EXPORT virtual PartDefinition *operator+(const PartDefinition& other) const = 0;
- MEDCOUPLING_EXPORT virtual std::string getRepr() const = 0;
- MEDCOUPLING_EXPORT virtual PartDefinition *composeWith(const PartDefinition *other) const = 0;
- MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const = 0;
- MEDCOUPLING_EXPORT virtual PartDefinition *tryToSimplify() const = 0;
- MEDCOUPLING_EXPORT virtual void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const = 0;
+ static PartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
+ static PartDefinition *New(DataArrayIdType *listOfIds);
+ static PartDefinition *Unserialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI);
+ virtual bool isEqual(const PartDefinition *other, std::string& what) const = 0;
+ virtual PartDefinition *deepCopy() const = 0;
+ virtual DataArrayIdType *toDAI() const = 0;
+ virtual mcIdType getNumberOfElems() const = 0;
+ virtual PartDefinition *operator+(const PartDefinition& other) const = 0;
+ virtual std::string getRepr() const = 0;
+ virtual PartDefinition *composeWith(const PartDefinition *other) const = 0;
+ virtual void checkConsistencyLight() const = 0;
+ virtual PartDefinition *tryToSimplify() const = 0;
+ virtual void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const = 0;
protected:
virtual ~PartDefinition();
};
class SlicePartDefinition;
- class DataArrayPartDefinition : public PartDefinition
+ class MEDCOUPLING_EXPORT DataArrayPartDefinition : public PartDefinition
{
public:
- MEDCOUPLING_EXPORT static DataArrayPartDefinition *New(DataArrayIdType *listOfIds);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("DataArrayPartDefinition"); }
- MEDCOUPLING_EXPORT bool isEqual(const PartDefinition *other, std::string& what) const;
- MEDCOUPLING_EXPORT DataArrayPartDefinition *deepCopy() const;
- MEDCOUPLING_EXPORT DataArrayIdType *toDAI() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
- MEDCOUPLING_EXPORT PartDefinition *operator+(const PartDefinition& other) const;
- MEDCOUPLING_EXPORT std::string getRepr() const;
- MEDCOUPLING_EXPORT PartDefinition *composeWith(const PartDefinition *other) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT PartDefinition *tryToSimplify() const;
- MEDCOUPLING_EXPORT void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
+ static DataArrayPartDefinition *New(DataArrayIdType *listOfIds);
+ std::string getClassName() const override { return std::string("DataArrayPartDefinition"); }
+ bool isEqual(const PartDefinition *other, std::string& what) const;
+ DataArrayPartDefinition *deepCopy() const;
+ DataArrayIdType *toDAI() const;
+ mcIdType getNumberOfElems() const;
+ PartDefinition *operator+(const PartDefinition& other) const;
+ std::string getRepr() const;
+ PartDefinition *composeWith(const PartDefinition *other) const;
+ void checkConsistencyLight() const;
+ PartDefinition *tryToSimplify() const;
+ void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
private:
DataArrayPartDefinition(DataArrayIdType *listOfIds);
void checkInternalArrayOK() const;
static void CheckInternalArrayOK(const DataArrayIdType *listOfIds);
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
DataArrayPartDefinition *add1(const DataArrayPartDefinition *other) const;
DataArrayPartDefinition *add2(const SlicePartDefinition *other) const;
virtual ~DataArrayPartDefinition();
MCAuto<DataArrayIdType> _arr;
};
- class SlicePartDefinition : public PartDefinition
+ class MEDCOUPLING_EXPORT SlicePartDefinition : public PartDefinition
{
public:
- MEDCOUPLING_EXPORT static SlicePartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("SlicePartDefinition"); }
- MEDCOUPLING_EXPORT bool isEqual(const PartDefinition *other, std::string& what) const;
- MEDCOUPLING_EXPORT SlicePartDefinition *deepCopy() const;
- MEDCOUPLING_EXPORT DataArrayIdType *toDAI() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
- MEDCOUPLING_EXPORT PartDefinition *operator+(const PartDefinition& other) const;
- MEDCOUPLING_EXPORT std::string getRepr() const;
- MEDCOUPLING_EXPORT PartDefinition *composeWith(const PartDefinition *other) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT PartDefinition *tryToSimplify() const;
- MEDCOUPLING_EXPORT void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
+ static SlicePartDefinition *New(mcIdType start, mcIdType stop, mcIdType step);
+ std::string getClassName() const override { return std::string("SlicePartDefinition"); }
+ bool isEqual(const PartDefinition *other, std::string& what) const;
+ SlicePartDefinition *deepCopy() const;
+ DataArrayIdType *toDAI() const;
+ mcIdType getNumberOfElems() const;
+ PartDefinition *operator+(const PartDefinition& other) const;
+ std::string getRepr() const;
+ PartDefinition *composeWith(const PartDefinition *other) const;
+ void checkConsistencyLight() const;
+ PartDefinition *tryToSimplify() const;
+ void serialize(std::vector<mcIdType>& tinyInt, std::vector< MCAuto<DataArrayIdType> >& bigArraysI) const;
//specific method
- MEDCOUPLING_EXPORT mcIdType getEffectiveStop() const;
- MEDCOUPLING_EXPORT void getSlice(mcIdType& start, mcIdType& stop, mcIdType& step) const;
+ mcIdType getEffectiveStop() const;
+ void getSlice(mcIdType& start, mcIdType& stop, mcIdType& step) const;
private:
SlicePartDefinition(mcIdType start, mcIdType stop, mcIdType step);
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
DataArrayPartDefinition *add1(const DataArrayPartDefinition *other) const;
PartDefinition *add2(const SlicePartDefinition *other) const;
virtual ~SlicePartDefinition();
* This is the case for example for following methods :
* rotation, translation, scaling, getNodeIdsNearPoint, boundingbox...
*/
- class MEDCouplingPointSet : public MEDCouplingMesh
+ class MEDCOUPLING_EXPORT MEDCouplingPointSet : public MEDCouplingMesh
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingPointSet();
- MEDCOUPLING_EXPORT MEDCouplingPointSet(const MEDCouplingPointSet& other, bool deepCpy);
- MEDCOUPLING_EXPORT ~MEDCouplingPointSet();
+ MEDCouplingPointSet();
+ MEDCouplingPointSet(const MEDCouplingPointSet& other, bool deepCpy);
+ ~MEDCouplingPointSet();
public:
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
- MEDCOUPLING_EXPORT int getSpaceDimension() const;
- MEDCOUPLING_EXPORT void setCoords(const DataArrayDouble *coords);
- MEDCOUPLING_EXPORT const DataArrayDouble *getCoords() const { return _coords; }
- MEDCOUPLING_EXPORT DataArrayDouble *getCoords() { return _coords; }
- MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const;
- MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const { return _coords; }
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ mcIdType getNumberOfNodes() const;
+ int getSpaceDimension() const;
+ void setCoords(const DataArrayDouble *coords);
+ const DataArrayDouble *getCoords() const { return _coords; }
+ DataArrayDouble *getCoords() { return _coords; }
+ DataArrayDouble *getCoordinatesAndOwner() const;
+ const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const { return _coords; }
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
+ void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const;
- MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
+ void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec,
DataArrayIdType *&cellCor) const;
- MEDCOUPLING_EXPORT bool areCoordsEqualIfNotWhy(const MEDCouplingPointSet& other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const;
- MEDCOUPLING_EXPORT bool areCoordsEqualWithoutConsideringStr(const MEDCouplingPointSet& other, double prec) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const = 0;
- MEDCOUPLING_EXPORT virtual void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *mergeNodes(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
- MEDCOUPLING_EXPORT virtual DataArrayIdType *mergeNodesCenter(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const = 0;
- MEDCOUPLING_EXPORT virtual void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const = 0;
- MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
- MEDCOUPLING_EXPORT DataArrayIdType *buildPermArrayForMergeNode(double precision, mcIdType limitNodeId, bool& areNodesMerged, mcIdType& newNbOfNodes) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsNearPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getNodeIdsNearPoints(const double *pos, mcIdType nbOfPoints, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const;
- MEDCOUPLING_EXPORT void findCommonNodes(double prec, mcIdType limitNodeId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const;
- MEDCOUPLING_EXPORT virtual void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const = 0;
- MEDCOUPLING_EXPORT DataArrayIdType *buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex,
+ bool areCoordsEqualIfNotWhy(const MEDCouplingPointSet& other, double prec, std::string& reason) const;
+ bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const;
+ bool areCoordsEqualWithoutConsideringStr(const MEDCouplingPointSet& other, double prec) const;
+ virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const = 0;
+ virtual void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) = 0;
+ virtual DataArrayIdType *mergeNodes(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
+ virtual DataArrayIdType *mergeNodesCenter(double precision, bool& areNodesMerged, mcIdType& newNbOfNodes);
+ virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const = 0;
+ virtual void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const = 0;
+ void getCoordinatesOfNode(mcIdType nodeId, std::vector<double>& coo) const;
+ DataArrayIdType *buildPermArrayForMergeNode(double precision, mcIdType limitNodeId, bool& areNodesMerged, mcIdType& newNbOfNodes) const;
+ DataArrayIdType *getNodeIdsNearPoint(const double *pos, double eps) const;
+ void getNodeIdsNearPoints(const double *pos, mcIdType nbOfPoints, double eps, DataArrayIdType *& c, DataArrayIdType *& cI) const;
+ void findCommonNodes(double prec, mcIdType limitNodeId, DataArrayIdType *&comm, DataArrayIdType *&commIndex) const;
+ virtual void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const = 0;
+ DataArrayIdType *buildNewNumberingFromCommonNodesFormat(const DataArrayIdType *comm, const DataArrayIdType *commIndex,
mcIdType& newNbOfNodes) const;
- MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
- MEDCOUPLING_EXPORT void zipCoords();
- MEDCOUPLING_EXPORT double getCaracteristicDimension() const;
- MEDCOUPLING_EXPORT void recenterForMaxPrecision(double eps);
- MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle);
- MEDCOUPLING_EXPORT void translate(const double *vector);
- MEDCOUPLING_EXPORT void scale(const double *point, double factor);
- MEDCOUPLING_EXPORT void changeSpaceDimension(int newSpaceDim, double dftVal=0.);
- MEDCOUPLING_EXPORT void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon);
- MEDCOUPLING_EXPORT void duplicateNodesInCoords(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
- MEDCOUPLING_EXPORT virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon);
- MEDCOUPLING_EXPORT void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
- MEDCOUPLING_EXPORT void findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
- MEDCOUPLING_EXPORT static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2);
- MEDCOUPLING_EXPORT static DataArrayDouble *MergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms);
- MEDCOUPLING_EXPORT static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type);
- MEDCOUPLING_EXPORT static DataArrayIdType *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsLyingOnNodes(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelf(const mcIdType *start, const mcIdType *end, bool keepCoords=true) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildPartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *findBoundaryNodes() const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const = 0;
- MEDCOUPLING_EXPORT virtual mcIdType getNumberOfNodesInCell(mcIdType cellId) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *computeFetchedNodeIds() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const = 0;
- MEDCOUPLING_EXPORT virtual void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const = 0;
- MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const mcIdType *newNodeNumbersO2N) = 0;
- MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
- MEDCOUPLING_EXPORT virtual void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
- MEDCOUPLING_EXPORT virtual void renumberNodesWithOffsetInConn(mcIdType offset) = 0;
- MEDCOUPLING_EXPORT virtual void renumberNodes(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
- MEDCOUPLING_EXPORT virtual void renumberNodesCenter(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
- MEDCOUPLING_EXPORT virtual bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const = 0;
- MEDCOUPLING_EXPORT virtual void invertOrientationOfAllCells() = 0;
- MEDCOUPLING_EXPORT virtual void checkFullyDefined() const = 0;
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
+ void getBoundingBox(double *bbox) const;
+ void zipCoords();
+ double getCaracteristicDimension() const;
+ void recenterForMaxPrecision(double eps);
+ void rotate(const double *center, const double *vector, double angle);
+ void translate(const double *vector);
+ void scale(const double *point, double factor);
+ void changeSpaceDimension(int newSpaceDim, double dftVal=0.);
+ void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon);
+ void duplicateNodesInCoords(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
+ virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon);
+ void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
+ void findNodesOnLine(const double *pt, const double *vec, double eps, std::vector<mcIdType>& nodes) const;
+ static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2);
+ static DataArrayDouble *MergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms);
+ static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type);
+ static DataArrayIdType *ComputeNbOfInteractionsWithSrcCells(const MEDCouplingPointSet *srcMesh, const MEDCouplingPointSet *trgMesh, double eps);
+ MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+ MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+ MEDCouplingMesh *buildPartRange(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds) const;
+ MEDCouplingMesh *buildPartRangeAndReduceNodes(mcIdType beginCellIds, mcIdType endCellIds, mcIdType stepCellIds, mcIdType& beginOut, mcIdType& endOut, mcIdType& stepOut, DataArrayIdType*& arr) const;
+ DataArrayIdType *getCellIdsFullyIncludedInNodeIds(const mcIdType *partBg, const mcIdType *partEnd) const;
+ DataArrayIdType *getCellIdsLyingOnNodes(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
+ virtual MEDCouplingPointSet *buildPartOfMySelf(const mcIdType *start, const mcIdType *end, bool keepCoords=true) const;
+ virtual MEDCouplingPointSet *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
+ virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoords(const mcIdType *begin, const mcIdType *end) const = 0;
+ virtual MEDCouplingPointSet *buildPartOfMySelfKeepCoordsSlice(mcIdType start, mcIdType end, mcIdType step) const = 0;
+ virtual MEDCouplingPointSet *buildPartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const;
+ virtual MEDCouplingPointSet *buildFacePartOfMySelfNode(const mcIdType *start, const mcIdType *end, bool fullyIn) const = 0;
+ virtual DataArrayIdType *findBoundaryNodes() const = 0;
+ virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const = 0;
+ virtual mcIdType getNumberOfNodesInCell(mcIdType cellId) const = 0;
+ virtual DataArrayIdType *computeFetchedNodeIds() const = 0;
+ virtual DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const = 0;
+ virtual void fillCellIdsToKeepFromNodeIds(const mcIdType *begin, const mcIdType *end, bool fullyIn, DataArrayIdType *&cellIdsKeptArr) const = 0;
+ virtual void renumberNodesInConn(const mcIdType *newNodeNumbersO2N) = 0;
+ virtual void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
+ virtual void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) = 0;
+ virtual void renumberNodesWithOffsetInConn(mcIdType offset) = 0;
+ virtual void renumberNodes(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
+ virtual void renumberNodesCenter(const mcIdType *newNodeNumbers, mcIdType newNbOfNodes);
+ virtual bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const = 0;
+ virtual void invertOrientationOfAllCells() = 0;
+ virtual void checkFullyDefined() const = 0;
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2,
const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingFieldDouble *computeDiameterField() const = 0;
- MEDCOUPLING_EXPORT virtual DataArrayIdType *zipCoordsTraducer();
- MEDCOUPLING_EXPORT virtual DataArrayIdType *zipConnectivityTraducer(int compType, mcIdType startCellId=0);
- MEDCOUPLING_EXPORT virtual bool areAllNodesFetched() const;
+ virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const = 0;
+ virtual DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const = 0;
+ virtual DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) = 0;
+ virtual MEDCouplingFieldDouble *computeDiameterField() const = 0;
+ virtual DataArrayIdType *zipCoordsTraducer();
+ virtual DataArrayIdType *zipConnectivityTraducer(int compType, mcIdType startCellId=0);
+ virtual bool areAllNodesFetched() const;
//tools
public:
- MEDCOUPLING_EXPORT bool areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, mcIdType cellId, double prec) const;
+ bool areCellsFrom2MeshEqual(const MEDCouplingPointSet *other, mcIdType cellId, double prec) const;
protected:
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT static bool intersectsBoundingBox(const double* bb1, const double* bb2, int dim, double eps);
- MEDCOUPLING_EXPORT static bool intersectsBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bb1, const double* bb2, int dim, double eps);
- MEDCOUPLING_EXPORT void rotate2D(const double *center, double angle);
- MEDCOUPLING_EXPORT void rotate3D(const double *center, const double *vect, double angle);
- MEDCOUPLING_EXPORT void project2DCellOnXY(const mcIdType *startConn, const mcIdType *endConn, std::vector<double>& res) const;
- MEDCOUPLING_EXPORT static bool isButterfly2DCell(const std::vector<double>& res, bool isQuad, double eps);
+ void checkConsistencyLight() const;
+ static bool intersectsBoundingBox(const double* bb1, const double* bb2, int dim, double eps);
+ static bool intersectsBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bb1, const double* bb2, int dim, double eps);
+ void rotate2D(const double *center, double angle);
+ void rotate3D(const double *center, const double *vect, double angle);
+ void project2DCellOnXY(const mcIdType *startConn, const mcIdType *endConn, std::vector<double>& res) const;
+ static bool isButterfly2DCell(const std::vector<double>& res, bool isQuad, double eps);
protected:
DataArrayDouble *_coords;
};
{
class MEDCoupling1SGTUMesh;
- class MEDCouplingStructuredMesh : public MEDCouplingMesh
+ class MEDCOUPLING_EXPORT MEDCouplingStructuredMesh : public MEDCouplingMesh
{
public:
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getLocationFromCellId(mcIdType cellId) const;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getLocationFromNodeId(mcIdType nodeId) const;
- MEDCOUPLING_EXPORT static void GetPosFromId(mcIdType eltId, int meshDim, const mcIdType *split, mcIdType *res);
- MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension( int meshDim);
- MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ DataArrayIdType *computeNbOfNodesPerCell() const;
+ DataArrayIdType *computeNbOfFacesPerCell() const;
+ DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+ std::vector<mcIdType> getLocationFromCellId(mcIdType cellId) const;
+ std::vector<mcIdType> getLocationFromNodeId(mcIdType nodeId) const;
+ static void GetPosFromId(mcIdType eltId, int meshDim, const mcIdType *split, mcIdType *res);
+ static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension( int meshDim);
+ void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ void copyTinyStringsFrom(const MEDCouplingMesh *other);
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
//tools
- MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
- MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *build1SGTUnstructured() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
- MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
- MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+ std::vector<mcIdType> getDistributionOfTypes() const;
+ DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+ MEDCoupling1SGTUMesh *build1SGTUnstructured() const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ MEDCouplingMesh *buildPart(const mcIdType *start, const mcIdType *end) const;
+ MEDCouplingMesh *buildPartAndReduceNodes(const mcIdType *start, const mcIdType *end, DataArrayIdType*& arr) const;
+ DataArrayIdType *simplexize(int policy);
+ MEDCouplingFieldDouble *buildOrthogonalField() const;
+ void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
//some useful methods
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const;
- MEDCOUPLING_EXPORT mcIdType getCellIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
- MEDCOUPLING_EXPORT mcIdType getNodeIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodes() const;
- MEDCOUPLING_EXPORT int getMeshDimension() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsOfSubLevelMesh() const;
- MEDCOUPLING_EXPORT int getSpaceDimensionOnNodeStruct() const;
- MEDCOUPLING_EXPORT virtual void getNodeGridStructure(mcIdType *res) const = 0;
- MEDCOUPLING_EXPORT virtual void getSplitCellValues(mcIdType *res) const;
- MEDCOUPLING_EXPORT virtual void getSplitNodeValues(mcIdType *res) const;
- MEDCOUPLING_EXPORT virtual std::vector<mcIdType> getNodeGridStructure() const = 0;
- MEDCOUPLING_EXPORT std::vector<mcIdType> getCellGridStructure() const;
- MEDCOUPLING_EXPORT double computeSquareness() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const = 0;
- MEDCOUPLING_EXPORT static std::vector<mcIdType> GetSplitVectFromStruct(const std::vector<mcIdType>& strct);
- MEDCOUPLING_EXPORT static bool IsPartStructured(const mcIdType *startIds, const mcIdType *stopIds, const std::vector<mcIdType>& st, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static std::vector<mcIdType> GetDimensionsFromCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > GetCompactFrmtFromDimensions(const std::vector<mcIdType>& dims);
- MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > IntersectRanges(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
- MEDCOUPLING_EXPORT static bool AreRangesIntersect(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
- MEDCOUPLING_EXPORT static void SwitchOnIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& vectToSwitchOn);
- MEDCOUPLING_EXPORT static void ExtractFieldOfBoolFrom(const std::vector<mcIdType>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& fieldOut);
- MEDCOUPLING_EXPORT static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<mcIdType>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static void AssignPartOfFieldOfDoubleUsing(const std::vector<mcIdType>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, const DataArrayDouble *other);
- MEDCOUPLING_EXPORT static void ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, bool check=true);
- MEDCOUPLING_EXPORT static void ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, bool check=true);
- MEDCOUPLING_EXPORT static std::vector< std::pair<mcIdType,mcIdType> > TranslateCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& part, const std::vector<mcIdType>& translation);
- MEDCOUPLING_EXPORT static std::vector<mcIdType> FindTranslationFrom(const std::vector< std::pair<mcIdType,mcIdType> >& startingFrom, const std::vector< std::pair<mcIdType,mcIdType> >& goingTo);
- MEDCOUPLING_EXPORT static DataArrayIdType *BuildExplicitIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static void MultiplyPartOf(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, double factor, DataArrayDouble *da);
- MEDCOUPLING_EXPORT static void MultiplyPartOfByGhost(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, mcIdType ghostSize, double factor, DataArrayDouble *da);
- MEDCOUPLING_EXPORT static void PutInGhostFormat(mcIdType ghostSize, const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, std::vector<mcIdType>& stWithGhost, std::vector< std::pair<mcIdType,mcIdType> >&partWithGhost);
- MEDCOUPLING_EXPORT static void ApplyGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize);
- MEDCOUPLING_EXPORT static DataArrayIdType *Build1GTNodalConnectivity(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
- MEDCOUPLING_EXPORT static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
- MEDCOUPLING_EXPORT static DataArrayIdType *ComputeCornersGhost(const std::vector<mcIdType>& st, mcIdType ghostLev);
- MEDCOUPLING_EXPORT static mcIdType DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static mcIdType DeduceNumberOfGivenStructure(const std::vector<mcIdType>& st);
- MEDCOUPLING_EXPORT static void FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, int& axisId, mcIdType& sizeOfRange);
- MEDCOUPLING_EXPORT static mcIdType FindMinimalPartOf(mcIdType minPatchLgth, const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
- MEDCOUPLING_EXPORT static std::vector< std::vector<mcIdType> > ComputeSignaturePerAxisOf(const std::vector<mcIdType>& st, const std::vector<bool>& crit);
+ MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const;
+ mcIdType getCellIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+ mcIdType getNodeIdFromPos(mcIdType i, mcIdType j, mcIdType k) const;
+ mcIdType getNumberOfCells() const;
+ mcIdType getNumberOfNodes() const;
+ int getMeshDimension() const;
+ mcIdType getNumberOfCellsOfSubLevelMesh() const;
+ int getSpaceDimensionOnNodeStruct() const;
+ virtual void getNodeGridStructure(mcIdType *res) const = 0;
+ virtual void getSplitCellValues(mcIdType *res) const;
+ virtual void getSplitNodeValues(mcIdType *res) const;
+ virtual std::vector<mcIdType> getNodeGridStructure() const = 0;
+ std::vector<mcIdType> getCellGridStructure() const;
+ double computeSquareness() const;
+ virtual MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair<mcIdType,mcIdType> >& cellPart) const = 0;
+ static std::vector<mcIdType> GetSplitVectFromStruct(const std::vector<mcIdType>& strct);
+ static bool IsPartStructured(const mcIdType *startIds, const mcIdType *stopIds, const std::vector<mcIdType>& st, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static std::vector<mcIdType> GetDimensionsFromCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static std::vector< std::pair<mcIdType,mcIdType> > GetCompactFrmtFromDimensions(const std::vector<mcIdType>& dims);
+ static std::vector< std::pair<mcIdType,mcIdType> > IntersectRanges(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
+ static bool AreRangesIntersect(const std::vector< std::pair<mcIdType,mcIdType> >& r1, const std::vector< std::pair<mcIdType,mcIdType> >& r2);
+ static void SwitchOnIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& vectToSwitchOn);
+ static void ExtractFieldOfBoolFrom(const std::vector<mcIdType>& st, const std::vector<bool>& fieldOfBool, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, std::vector<bool>& fieldOut);
+ static DataArrayDouble *ExtractFieldOfDoubleFrom(const std::vector<mcIdType>& st, const DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static void AssignPartOfFieldOfDoubleUsing(const std::vector<mcIdType>& st, DataArrayDouble *fieldOfDbl, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, const DataArrayDouble *other);
+ static void ChangeReferenceFromGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, bool check=true);
+ static void ChangeReferenceToGlobalOfCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& bigInAbs, const std::vector< std::pair<mcIdType,mcIdType> >& partOfBigRelativeToBig, std::vector< std::pair<mcIdType,mcIdType> >& partOfBigInAbs, bool check=true);
+ static std::vector< std::pair<mcIdType,mcIdType> > TranslateCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& part, const std::vector<mcIdType>& translation);
+ static std::vector<mcIdType> FindTranslationFrom(const std::vector< std::pair<mcIdType,mcIdType> >& startingFrom, const std::vector< std::pair<mcIdType,mcIdType> >& goingTo);
+ static DataArrayIdType *BuildExplicitIdsFrom(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static void MultiplyPartOf(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, double factor, DataArrayDouble *da);
+ static void MultiplyPartOfByGhost(const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, mcIdType ghostSize, double factor, DataArrayDouble *da);
+ static void PutInGhostFormat(mcIdType ghostSize, const std::vector<mcIdType>& st, const std::vector< std::pair<mcIdType,mcIdType> >& part, std::vector<mcIdType>& stWithGhost, std::vector< std::pair<mcIdType,mcIdType> >&partWithGhost);
+ static void ApplyGhostOnCompactFrmt(std::vector< std::pair<mcIdType,mcIdType> >& partBeforeFact, mcIdType ghostSize);
+ static DataArrayIdType *Build1GTNodalConnectivity(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
+ static DataArrayIdType *Build1GTNodalConnectivityOfSubLevelMesh(const mcIdType *nodeStBg, const mcIdType *nodeStEnd);
+ static DataArrayIdType *ComputeCornersGhost(const std::vector<mcIdType>& st, mcIdType ghostLev);
+ static mcIdType DeduceNumberOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static mcIdType DeduceNumberOfGivenStructure(const std::vector<mcIdType>& st);
+ static void FindTheWidestAxisOfGivenRangeInCompactFrmt(const std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat, int& axisId, mcIdType& sizeOfRange);
+ static mcIdType FindMinimalPartOf(mcIdType minPatchLgth, const std::vector<mcIdType>& st, const std::vector<bool>& crit, std::vector<bool>& reducedCrit, std::vector< std::pair<mcIdType,mcIdType> >& partCompactFormat);
+ static std::vector< std::vector<mcIdType> > ComputeSignaturePerAxisOf(const std::vector<mcIdType>& st, const std::vector<bool>& crit);
private:
static mcIdType GetNumberOfCellsOfSubLevelMesh(const std::vector<mcIdType>& cgs, int mdim);
static void GetReverseNodalConnectivity1(const std::vector<mcIdType>& ngs, DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx);
protected:
static int ZipNodeStructure(const mcIdType *nodeStBg, const mcIdType *nodeStEnd, mcIdType zipNodeSt[3]);
protected:
- MEDCOUPLING_EXPORT MEDCouplingStructuredMesh();
- MEDCOUPLING_EXPORT MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy);
- MEDCOUPLING_EXPORT ~MEDCouplingStructuredMesh();
+ MEDCouplingStructuredMesh();
+ MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy);
+ ~MEDCouplingStructuredMesh();
};
}
class DataArrayDouble;
class TimeLabel;
- class TimeHolder
+ class MEDCOUPLING_EXPORT TimeHolder
{
public:
- MEDCOUPLING_EXPORT std::string getTimeUnit() const { return _time_unit; }
- MEDCOUPLING_EXPORT void setTimeUnit(const std::string& unit) { _time_unit=unit; }
- MEDCOUPLING_EXPORT double getTime(int& iteration, int& order) const { return getStartTime(iteration,order); }
- MEDCOUPLING_EXPORT virtual double getStartTime(int& iteration, int& order) const = 0;
+ std::string getTimeUnit() const { return _time_unit; }
+ void setTimeUnit(const std::string& unit) { _time_unit=unit; }
+ double getTime(int& iteration, int& order) const { return getStartTime(iteration,order); }
+ virtual double getStartTime(int& iteration, int& order) const = 0;
void copyTinyAttrFrom(const TimeHolder& other) { _time_unit=other._time_unit; }
protected:
TimeHolder() { }
};
template<class T>
- class MEDCouplingTimeDiscretizationTemplate : public TimeLabel, public BigMemoryObject, public TimeHolder
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationTemplate : public TimeLabel, public BigMemoryObject, public TimeHolder
{
public:
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT virtual void setArray(typename Traits<T>::ArrayType *array, TimeLabel *owner);
- MEDCOUPLING_EXPORT typename Traits<T>::ArrayType *getArray() { return _array; }
- MEDCOUPLING_EXPORT const typename Traits<T>::ArrayType *getArray() const { return _array; }
- MEDCOUPLING_EXPORT void setTimeTolerance(double val) { _time_tolerance=val; }
- MEDCOUPLING_EXPORT double getTimeTolerance() const { return _time_tolerance; }
- MEDCOUPLING_EXPORT void setTime(double time, int iteration, int order) { setStartTime(time,iteration,order); }
- MEDCOUPLING_EXPORT void setIteration(int it) { setStartIteration(it); }
- MEDCOUPLING_EXPORT void setOrder(int order) { setStartOrder(order); }
- MEDCOUPLING_EXPORT void setTimeValue(double val) { setStartTimeValue(val); }
- MEDCOUPLING_EXPORT virtual void setStartIteration(int it) = 0;
- MEDCOUPLING_EXPORT virtual void setStartOrder(int order) = 0;
- MEDCOUPLING_EXPORT virtual void setStartTime(double time, int iteration, int order) = 0;
- MEDCOUPLING_EXPORT virtual void setStartTimeValue(double time) = 0;
- MEDCOUPLING_EXPORT virtual double getEndTime(int& iteration, int& order) const = 0;
- MEDCOUPLING_EXPORT virtual void setEndIteration(int it) = 0;
- MEDCOUPLING_EXPORT virtual void setEndOrder(int order) = 0;
- MEDCOUPLING_EXPORT virtual void setEndTimeValue(double time) = 0;
- MEDCOUPLING_EXPORT virtual void setEndTime(double time, int iteration, int order) = 0;
+ void updateTime() const;
+ virtual void setArray(typename Traits<T>::ArrayType *array, TimeLabel *owner);
+ typename Traits<T>::ArrayType *getArray() { return _array; }
+ const typename Traits<T>::ArrayType *getArray() const { return _array; }
+ void setTimeTolerance(double val) { _time_tolerance=val; }
+ double getTimeTolerance() const { return _time_tolerance; }
+ void setTime(double time, int iteration, int order) { setStartTime(time,iteration,order); }
+ void setIteration(int it) { setStartIteration(it); }
+ void setOrder(int order) { setStartOrder(order); }
+ void setTimeValue(double val) { setStartTimeValue(val); }
+ virtual void setStartIteration(int it) = 0;
+ virtual void setStartOrder(int order) = 0;
+ virtual void setStartTime(double time, int iteration, int order) = 0;
+ virtual void setStartTimeValue(double time) = 0;
+ virtual double getEndTime(int& iteration, int& order) const = 0;
+ virtual void setEndIteration(int it) = 0;
+ virtual void setEndOrder(int order) = 0;
+ virtual void setEndTimeValue(double time) = 0;
+ virtual void setEndTime(double time, int iteration, int order) = 0;
- MEDCOUPLING_EXPORT virtual void setEndArray(typename Traits<T>::ArrayType *array, TimeLabel *owner);
- MEDCOUPLING_EXPORT virtual void setArrays(const std::vector< typename Traits<T>::ArrayType *>& arrays, TimeLabel *owner);
- MEDCOUPLING_EXPORT virtual const typename Traits<T>::ArrayType *getEndArray() const;
- MEDCOUPLING_EXPORT virtual typename Traits<T>::ArrayType *getEndArray();
- MEDCOUPLING_EXPORT virtual void getArrays(std::vector<typename Traits<T>::ArrayType *>& arrays) const;
+ virtual void setEndArray(typename Traits<T>::ArrayType *array, TimeLabel *owner);
+ virtual void setArrays(const std::vector< typename Traits<T>::ArrayType *>& arrays, TimeLabel *owner);
+ virtual const typename Traits<T>::ArrayType *getEndArray() const;
+ virtual typename Traits<T>::ArrayType *getEndArray();
+ virtual void getArrays(std::vector<typename Traits<T>::ArrayType *>& arrays) const;
- MEDCOUPLING_EXPORT virtual std::string getStringRepr() const = 0;
- MEDCOUPLING_EXPORT virtual TypeOfTimeDiscretization getEnum() const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretizationTemplate<T> *performCopyOrIncrRef(bool deepCopy) const = 0;
+ virtual std::string getStringRepr() const = 0;
+ virtual TypeOfTimeDiscretization getEnum() const = 0;
+ virtual MEDCouplingTimeDiscretizationTemplate<T> *performCopyOrIncrRef(bool deepCopy) const = 0;
//
- MEDCOUPLING_EXPORT virtual void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<T>& other);
- MEDCOUPLING_EXPORT virtual void copyTinyStringsFrom(const MEDCouplingTimeDiscretizationTemplate<T>& other);
- MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT virtual std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT virtual std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ virtual void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<T>& other);
+ virtual void copyTinyStringsFrom(const MEDCouplingTimeDiscretizationTemplate<T>& other);
+ virtual void checkConsistencyLight() const;
+ virtual std::size_t getHeapMemorySizeWithoutChildren() const;
+ virtual std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
//
- MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<T> *other, T prec, std::string& reason) const = 0;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<T> *other, T prec) const = 0;
+ virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<T> *other, T prec, std::string& reason) const = 0;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<T> *other, T prec) const = 0;
//
- MEDCOUPLING_EXPORT virtual bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<T> *other, std::string& reason) const;
- MEDCOUPLING_EXPORT virtual bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
- MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
- MEDCOUPLING_EXPORT virtual bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
- MEDCOUPLING_EXPORT virtual ~MEDCouplingTimeDiscretizationTemplate();
- MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT virtual void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
- MEDCOUPLING_EXPORT virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays);
- MEDCOUPLING_EXPORT virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays);
- MEDCOUPLING_EXPORT virtual void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ virtual bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<T> *other, std::string& reason) const;
+ virtual bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
+ virtual bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
+ virtual bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<T> *other) const;
+ virtual ~MEDCouplingTimeDiscretizationTemplate();
+ virtual void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ virtual void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ virtual void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
+ virtual void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<typename Traits<T>::ArrayType *>& arrays);
+ virtual void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<typename Traits<T>::ArrayType *>& arrays);
+ virtual void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
protected:
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationTemplate();
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationTemplate(const MEDCouplingTimeDiscretizationTemplate<T>& other, bool deepCopy);
+ MEDCouplingTimeDiscretizationTemplate();
+ MEDCouplingTimeDiscretizationTemplate(const MEDCouplingTimeDiscretizationTemplate<T>& other, bool deepCopy);
protected:
double _time_tolerance;
typename Traits<T>::ArrayType *_array;
static const double TIME_TOLERANCE_DFT;
};
- class MEDCouplingTimeKeeper
+ class MEDCOUPLING_EXPORT MEDCouplingTimeKeeper
{
public:
- MEDCOUPLING_EXPORT MEDCouplingTimeKeeper():_time(0.),_iteration(-1),_order(-1) { }
- MEDCOUPLING_EXPORT double getAllInfo(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
- MEDCOUPLING_EXPORT void setAllInfo(double time, int iteration, int order) { _time=time; _iteration=iteration; _order=order; }
- MEDCOUPLING_EXPORT int getIteration() const { return _iteration; }
- MEDCOUPLING_EXPORT void setIteration(int it) { _iteration=it; }
- MEDCOUPLING_EXPORT int getOrder() const { return _order; }
- MEDCOUPLING_EXPORT void setOrder(int order) { _order=order; }
- MEDCOUPLING_EXPORT double getTimeValue() const { return _time; }
- MEDCOUPLING_EXPORT void setTimeValue(double time) { _time=time; }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeKeeper& other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingTimeKeeper& other, double prec) const;
- MEDCOUPLING_EXPORT void copyFrom(const MEDCouplingTimeKeeper& other);
- MEDCOUPLING_EXPORT void checkTimePresence(double time, double eps) const;
+ MEDCouplingTimeKeeper():_time(0.),_iteration(-1),_order(-1) { }
+ double getAllInfo(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
+ void setAllInfo(double time, int iteration, int order) { _time=time; _iteration=iteration; _order=order; }
+ int getIteration() const { return _iteration; }
+ void setIteration(int it) { _iteration=it; }
+ int getOrder() const { return _order; }
+ void setOrder(int order) { _order=order; }
+ double getTimeValue() const { return _time; }
+ void setTimeValue(double time) { _time=time; }
+ bool isEqualIfNotWhy(const MEDCouplingTimeKeeper& other, double prec, std::string& reason) const;
+ bool isEqual(const MEDCouplingTimeKeeper& other, double prec) const;
+ void copyFrom(const MEDCouplingTimeKeeper& other);
+ void checkTimePresence(double time, double eps) const;
private:
double _time;
int _iteration;
int _order;
};
- class MEDCouplingTimeDiscretization : public MEDCouplingTimeDiscretizationTemplate<double>
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization : public MEDCouplingTimeDiscretizationTemplate<double>
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization() { }
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization(const MEDCouplingTimeDiscretization& other, bool deepCopy):MEDCouplingTimeDiscretizationTemplate<double>(other,deepCopy) { }
+ MEDCouplingTimeDiscretization() { }
+ MEDCouplingTimeDiscretization(const MEDCouplingTimeDiscretization& other, bool deepCopy):MEDCouplingTimeDiscretizationTemplate<double>(other,deepCopy) { }
public:
- MEDCOUPLING_EXPORT static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type);
- MEDCOUPLING_EXPORT virtual bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
- MEDCOUPLING_EXPORT virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *buildNewTimeReprFromThis(TypeOfTimeDiscretization type, bool deepCopy) const;
- MEDCOUPLING_EXPORT virtual void synchronizeTimeWith(const MEDCouplingMesh *mesh) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual void addEqual(const MEDCouplingTimeDiscretization *other) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual void substractEqual(const MEDCouplingTimeDiscretization *other) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual void multiplyEqual(const MEDCouplingTimeDiscretization *other) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual void divideEqual(const MEDCouplingTimeDiscretization *other) = 0;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const = 0;
- MEDCOUPLING_EXPORT virtual void powEqual(const MEDCouplingTimeDiscretization *other) = 0;
- MEDCOUPLING_EXPORT virtual void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const = 0;
- MEDCOUPLING_EXPORT virtual void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const = 0;
- MEDCOUPLING_EXPORT virtual void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD) = 0;
- MEDCOUPLING_EXPORT virtual void checkNoTimePresence() const = 0;
- MEDCOUPLING_EXPORT virtual void checkTimePresence(double time) const = 0;
- MEDCOUPLING_EXPORT virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const = 0;
- MEDCOUPLING_EXPORT virtual void getValueForTime(double time, const std::vector<double>& vals, double *res) const = 0;
- MEDCOUPLING_EXPORT virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT virtual void getValueOnTime(mcIdType eltId, double time, double *value) const = 0;
- MEDCOUPLING_EXPORT virtual void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const = 0;
+ static MEDCouplingTimeDiscretization *New(TypeOfTimeDiscretization type);
+ virtual bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
+ virtual bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
+ virtual bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
+ virtual bool isEqual(const MEDCouplingTimeDiscretization *other, double prec) const;
+ virtual MEDCouplingTimeDiscretization *buildNewTimeReprFromThis(TypeOfTimeDiscretization type, bool deepCopy) const;
+ virtual void synchronizeTimeWith(const MEDCouplingMesh *mesh) = 0;
+ virtual MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const = 0;
+ virtual MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual void addEqual(const MEDCouplingTimeDiscretization *other) = 0;
+ virtual MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual void substractEqual(const MEDCouplingTimeDiscretization *other) = 0;
+ virtual MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual void multiplyEqual(const MEDCouplingTimeDiscretization *other) = 0;
+ virtual MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual void divideEqual(const MEDCouplingTimeDiscretization *other) = 0;
+ virtual MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const = 0;
+ virtual void powEqual(const MEDCouplingTimeDiscretization *other) = 0;
+ virtual void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const = 0;
+ virtual void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const = 0;
+ virtual void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD) = 0;
+ virtual void checkNoTimePresence() const = 0;
+ virtual void checkTimePresence(double time) const = 0;
+ virtual std::vector< const DataArrayDouble *> getArraysForTime(double time) const = 0;
+ virtual void getValueForTime(double time, const std::vector<double>& vals, double *res) const = 0;
+ virtual bool isBefore(const MEDCouplingTimeDiscretization *other) const;
+ virtual bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const;
+ virtual void getValueOnTime(mcIdType eltId, double time, double *value) const = 0;
+ virtual void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const = 0;
//
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *computeVectorFieldCyl(const DataArrayDouble *coords, const double center[3], const double vect[3]) const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *doublyContractedProduct() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *determinant() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *eigenValues() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *eigenVectors() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *inverse() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *trace() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *deviator() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *magnitude() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *negate() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *maxPerTuple() const;
- MEDCOUPLING_EXPORT virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
- MEDCOUPLING_EXPORT virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<std::size_t>& compoIds);
- MEDCOUPLING_EXPORT virtual void changeNbOfComponents(std::size_t newNbOfComp, double dftValue);
- MEDCOUPLING_EXPORT virtual void sortPerTuple(bool asc);
- MEDCOUPLING_EXPORT virtual void setUniformValue(mcIdType nbOfTuple, int nbOfCompo, double value);
- MEDCOUPLING_EXPORT virtual void setOrCreateUniformValueOnAllComponents(mcIdType nbOfTuple, double value);
- MEDCOUPLING_EXPORT virtual void applyLin(double a, double b, int compoId);
- MEDCOUPLING_EXPORT virtual void applyLin(double a, double b);
- MEDCOUPLING_EXPORT virtual void applyFunc(int nbOfComp, FunctionToEvaluate func);
- MEDCOUPLING_EXPORT virtual void applyFunc(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT virtual void applyFuncCompo(int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT virtual void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
- MEDCOUPLING_EXPORT virtual void applyFunc(const std::string& func);
- MEDCOUPLING_EXPORT virtual void applyFuncFast32(const std::string& func);
- MEDCOUPLING_EXPORT virtual void applyFuncFast64(const std::string& func);
- MEDCOUPLING_EXPORT virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, FunctionToEvaluate func);
- MEDCOUPLING_EXPORT virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT virtual void fillFromAnalyticCompo(const DataArrayDouble *loc, int nbOfComp, const std::string& func);
- MEDCOUPLING_EXPORT virtual void fillFromAnalyticNamedCompo(const DataArrayDouble *loc, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
+ virtual MEDCouplingTimeDiscretization *computeVectorFieldCyl(const DataArrayDouble *coords, const double center[3], const double vect[3]) const;
+ virtual MEDCouplingTimeDiscretization *doublyContractedProduct() const;
+ virtual MEDCouplingTimeDiscretization *determinant() const;
+ virtual MEDCouplingTimeDiscretization *eigenValues() const;
+ virtual MEDCouplingTimeDiscretization *eigenVectors() const;
+ virtual MEDCouplingTimeDiscretization *inverse() const;
+ virtual MEDCouplingTimeDiscretization *trace() const;
+ virtual MEDCouplingTimeDiscretization *deviator() const;
+ virtual MEDCouplingTimeDiscretization *magnitude() const;
+ virtual MEDCouplingTimeDiscretization *negate() const;
+ virtual MEDCouplingTimeDiscretization *maxPerTuple() const;
+ virtual MEDCouplingTimeDiscretization *keepSelectedComponents(const std::vector<std::size_t>& compoIds) const;
+ virtual void setSelectedComponents(const MEDCouplingTimeDiscretization *other, const std::vector<std::size_t>& compoIds);
+ virtual void changeNbOfComponents(std::size_t newNbOfComp, double dftValue);
+ virtual void sortPerTuple(bool asc);
+ virtual void setUniformValue(mcIdType nbOfTuple, int nbOfCompo, double value);
+ virtual void setOrCreateUniformValueOnAllComponents(mcIdType nbOfTuple, double value);
+ virtual void applyLin(double a, double b, int compoId);
+ virtual void applyLin(double a, double b);
+ virtual void applyFunc(int nbOfComp, FunctionToEvaluate func);
+ virtual void applyFunc(int nbOfComp, const std::string& func);
+ virtual void applyFuncCompo(int nbOfComp, const std::string& func);
+ virtual void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
+ virtual void applyFunc(const std::string& func);
+ virtual void applyFuncFast32(const std::string& func);
+ virtual void applyFuncFast64(const std::string& func);
+ virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, FunctionToEvaluate func);
+ virtual void fillFromAnalytic(const DataArrayDouble *loc, int nbOfComp, const std::string& func);
+ virtual void fillFromAnalyticCompo(const DataArrayDouble *loc, int nbOfComp, const std::string& func);
+ virtual void fillFromAnalyticNamedCompo(const DataArrayDouble *loc, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func);
};
template<class T>
- class MEDCouplingTimeDiscretizationSimple : public MEDCouplingTimeDiscretizationTemplate<T>
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationSimple : public MEDCouplingTimeDiscretizationTemplate<T>
{
public:
std::string getStringRepr() const;
protected:
MEDCouplingTimeKeeper _tk;
private:
- MEDCOUPLING_EXPORT static const char REPR[];
+ static const char REPR[];
protected:
static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME;
};
- class MEDCouplingTimeDiscretizationInt32 : public MEDCouplingTimeDiscretizationSimple<Int32>
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationInt32 : public MEDCouplingTimeDiscretizationSimple<Int32>
{
public:
MEDCouplingTimeDiscretizationInt32() { }
bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<Int32> *other, Int32 prec) const;
};
- class MEDCouplingTimeDiscretizationInt64 : public MEDCouplingTimeDiscretizationSimple<Int64>
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationInt64 : public MEDCouplingTimeDiscretizationSimple<Int64>
{
public:
MEDCouplingTimeDiscretizationInt64() { }
bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<Int64> *other, Int64 prec) const override;
};
- class MEDCouplingTimeDiscretizationFloat : public MEDCouplingTimeDiscretizationSimple<float>
+ class MEDCOUPLING_EXPORT MEDCouplingTimeDiscretizationFloat : public MEDCouplingTimeDiscretizationSimple<float>
{
public:
MEDCouplingTimeDiscretizationFloat() { }
static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME;
};
- class MEDCouplingNoTimeLabel : public MEDCouplingTimeDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel : public MEDCouplingTimeDiscretization
{
public:
- MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel();
- MEDCOUPLING_EXPORT MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCopy);
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingNoTimeLabel"); }
- MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
- MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
- MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
- MEDCOUPLING_EXPORT void checkNoTimePresence() const { }
- MEDCOUPLING_EXPORT void checkTimePresence(double time) const;
- MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
- MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
- MEDCOUPLING_EXPORT bool isBefore(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const;
- MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const;
- MEDCOUPLING_EXPORT void setStartIteration(int it);
- MEDCOUPLING_EXPORT void setEndIteration(int it);
- MEDCOUPLING_EXPORT void setStartOrder(int order);
- MEDCOUPLING_EXPORT void setEndOrder(int order);
- MEDCOUPLING_EXPORT void setStartTimeValue(double time);
- MEDCOUPLING_EXPORT void setEndTimeValue(double time);
- MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order);
- MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order);
- MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
- MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
+ MEDCouplingNoTimeLabel();
+ MEDCouplingNoTimeLabel(const MEDCouplingTimeDiscretization& other, bool deepCopy);
+ std::string getStringRepr() const;
+ std::string getClassName() const override { return std::string("MEDCouplingNoTimeLabel"); }
+ TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
+ void synchronizeTimeWith(const MEDCouplingMesh *mesh);
+ MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
+ MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
+ void addEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
+ void substractEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
+ void multiplyEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
+ void divideEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
+ void powEqual(const MEDCouplingTimeDiscretization *other);
+ bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
+ bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
+ bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
+ void checkNoTimePresence() const { }
+ void checkTimePresence(double time) const;
+ std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
+ void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
+ bool isBefore(const MEDCouplingTimeDiscretization *other) const;
+ bool isStrictlyBefore(const MEDCouplingTimeDiscretization *other) const;
+ double getStartTime(int& iteration, int& order) const;
+ double getEndTime(int& iteration, int& order) const;
+ void setStartIteration(int it);
+ void setEndIteration(int it);
+ void setStartOrder(int order);
+ void setEndOrder(int order);
+ void setStartTimeValue(double time);
+ void setEndTimeValue(double time);
+ void setStartTime(double time, int iteration, int order);
+ void setEndTime(double time, int iteration, int order);
+ void getValueOnTime(mcIdType eltId, double time, double *value) const;
+ void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
+ void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
+ void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
public:
static const TypeOfTimeDiscretization DISCRETIZATION=NO_TIME;
- MEDCOUPLING_EXPORT static const char REPR[];
+ static const char REPR[];
private:
static const char EXCEPTION_MSG[];
};
- class MEDCouplingWithTimeStep : public MEDCouplingTimeDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingWithTimeStep : public MEDCouplingTimeDiscretization
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCopy);
+ MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCopy);
public:
- MEDCOUPLING_EXPORT MEDCouplingWithTimeStep();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingWithTimeLabel"); }
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
- MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
- MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
- MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
- MEDCOUPLING_EXPORT void checkNoTimePresence() const;
- MEDCOUPLING_EXPORT void checkTimePresence(double time) const;
- MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) { _tk.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) { _tk.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _tk.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _tk.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT void setStartIteration(int it) { _tk.setIteration(it); }
- MEDCOUPLING_EXPORT void setEndIteration(int it) { _tk.setIteration(it); }
- MEDCOUPLING_EXPORT void setStartOrder(int order) { _tk.setOrder(order); }
- MEDCOUPLING_EXPORT void setEndOrder(int order) { _tk.setOrder(order); }
- MEDCOUPLING_EXPORT void setStartTimeValue(double time) { _tk.setTimeValue(time); }
- MEDCOUPLING_EXPORT void setEndTimeValue(double time) { _tk.setTimeValue(time); }
- MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
- MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
- MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
+ MEDCouplingWithTimeStep();
+ std::string getClassName() const override { return std::string("MEDCouplingWithTimeLabel"); }
+ std::string getStringRepr() const;
+ void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
+ TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
+ void synchronizeTimeWith(const MEDCouplingMesh *mesh);
+ MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
+ MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
+ void addEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
+ void substractEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
+ void multiplyEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
+ void divideEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
+ void powEqual(const MEDCouplingTimeDiscretization *other);
+ bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
+ bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
+ bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
+ void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
+ MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
+ void checkNoTimePresence() const;
+ void checkTimePresence(double time) const;
+ void setStartTime(double time, int iteration, int order) { _tk.setAllInfo(time,iteration,order); }
+ void setEndTime(double time, int iteration, int order) { _tk.setAllInfo(time,iteration,order); }
+ double getStartTime(int& iteration, int& order) const { return _tk.getAllInfo(iteration,order); }
+ double getEndTime(int& iteration, int& order) const { return _tk.getAllInfo(iteration,order); }
+ void setStartIteration(int it) { _tk.setIteration(it); }
+ void setEndIteration(int it) { _tk.setIteration(it); }
+ void setStartOrder(int order) { _tk.setOrder(order); }
+ void setEndOrder(int order) { _tk.setOrder(order); }
+ void setStartTimeValue(double time) { _tk.setTimeValue(time); }
+ void setEndTimeValue(double time) { _tk.setTimeValue(time); }
+ std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
+ void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
+ void getValueOnTime(mcIdType eltId, double time, double *value) const;
+ void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
public:
static const TypeOfTimeDiscretization DISCRETIZATION=ONE_TIME;
- MEDCOUPLING_EXPORT static const char REPR[];
+ static const char REPR[];
private:
static const char EXCEPTION_MSG[];
protected:
MEDCouplingTimeKeeper _tk;
};
- class MEDCouplingConstOnTimeInterval : public MEDCouplingTimeDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval : public MEDCouplingTimeDiscretization
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCopy);
+ MEDCouplingConstOnTimeInterval(const MEDCouplingConstOnTimeInterval& other, bool deepCopy);
public:
- MEDCOUPLING_EXPORT MEDCouplingConstOnTimeInterval();
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingConstOnTimeInterval"); }
- MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
- MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
- MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
- MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
- MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
- MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
- MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh);
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingConstOnTimeInterval();
+ std::string getClassName() const override { return std::string("MEDCouplingConstOnTimeInterval"); }
+ void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
+ void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
+ MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
+ bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
+ bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
+ bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
+ std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
+ void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
+ void getValueOnTime(mcIdType eltId, double time, double *value) const;
+ void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
+ TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
+ void synchronizeTimeWith(const MEDCouplingMesh *mesh);
+ std::string getStringRepr() const;
+ MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
+ MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
+ void addEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
+ void substractEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
+ void multiplyEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
+ void divideEqual(const MEDCouplingTimeDiscretization *other);
MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) { _start.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) { _end.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _start.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _end.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT void setStartIteration(int it) { _start.setIteration(it); }
- MEDCOUPLING_EXPORT void setEndIteration(int it) { _end.setIteration(it); }
- MEDCOUPLING_EXPORT void setStartOrder(int order) { _start.setOrder(order); }
- MEDCOUPLING_EXPORT void setEndOrder(int order) { _end.setOrder(order); }
- MEDCOUPLING_EXPORT void setStartTimeValue(double time) { _start.setTimeValue(time); }
- MEDCOUPLING_EXPORT void setEndTimeValue(double time) { _end.setTimeValue(time); }
- MEDCOUPLING_EXPORT void checkNoTimePresence() const;
- MEDCOUPLING_EXPORT void checkTimePresence(double time) const;
+ void powEqual(const MEDCouplingTimeDiscretization *other);
+ void setStartTime(double time, int iteration, int order) { _start.setAllInfo(time,iteration,order); }
+ void setEndTime(double time, int iteration, int order) { _end.setAllInfo(time,iteration,order); }
+ double getStartTime(int& iteration, int& order) const { return _start.getAllInfo(iteration,order); }
+ double getEndTime(int& iteration, int& order) const { return _end.getAllInfo(iteration,order); }
+ void setStartIteration(int it) { _start.setIteration(it); }
+ void setEndIteration(int it) { _end.setIteration(it); }
+ void setStartOrder(int order) { _start.setOrder(order); }
+ void setEndOrder(int order) { _end.setOrder(order); }
+ void setStartTimeValue(double time) { _start.setTimeValue(time); }
+ void setEndTimeValue(double time) { _end.setTimeValue(time); }
+ void checkNoTimePresence() const;
+ void checkTimePresence(double time) const;
public:
static const TypeOfTimeDiscretization DISCRETIZATION=CONST_ON_TIME_INTERVAL;
- MEDCOUPLING_EXPORT static const char REPR[];
+ static const char REPR[];
private:
static const char EXCEPTION_MSG[];
protected:
MEDCouplingTimeKeeper _end;
};
- class MEDCouplingTwoTimeSteps : public MEDCouplingTimeDiscretization
+ class MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps : public MEDCouplingTimeDiscretization
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps(const MEDCouplingTwoTimeSteps& other, bool deepCopy);
- MEDCOUPLING_EXPORT MEDCouplingTwoTimeSteps();
- MEDCOUPLING_EXPORT ~MEDCouplingTwoTimeSteps();
+ MEDCouplingTwoTimeSteps(const MEDCouplingTwoTimeSteps& other, bool deepCopy);
+ MEDCouplingTwoTimeSteps();
+ ~MEDCouplingTwoTimeSteps();
public:
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingTwoTimeSteps"); }
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT void synchronizeTimeWith(const MEDCouplingMesh *mesh);
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
- MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
- MEDCOUPLING_EXPORT const DataArrayDouble *getEndArray() const;
- MEDCOUPLING_EXPORT DataArrayDouble *getEndArray();
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
- MEDCOUPLING_EXPORT void checkNoTimePresence() const;
- MEDCOUPLING_EXPORT void checkTimePresence(double time) const;
- MEDCOUPLING_EXPORT void getArrays(std::vector<DataArrayDouble *>& arrays) const;
- MEDCOUPLING_EXPORT void setEndArray(DataArrayDouble *array, TimeLabel *owner);
- MEDCOUPLING_EXPORT void setStartTime(double time, int iteration, int order) { _start.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT void setEndTime(double time, int iteration, int order) { _end.setAllInfo(time,iteration,order); }
- MEDCOUPLING_EXPORT double getStartTime(int& iteration, int& order) const { return _start.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT double getEndTime(int& iteration, int& order) const { return _end.getAllInfo(iteration,order); }
- MEDCOUPLING_EXPORT void setStartIteration(int it) { _start.setIteration(it); }
- MEDCOUPLING_EXPORT void setEndIteration(int it) { _end.setIteration(it); }
- MEDCOUPLING_EXPORT void setStartOrder(int order) { _start.setOrder(order); }
- MEDCOUPLING_EXPORT void setEndOrder(int order) { _end.setOrder(order); }
- MEDCOUPLING_EXPORT void setStartTimeValue(double time) { _start.setTimeValue(time); }
- MEDCOUPLING_EXPORT void setEndTimeValue(double time) { _end.setTimeValue(time); }
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<DataArrayDouble *>& arrays);
- MEDCOUPLING_EXPORT void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays);
- MEDCOUPLING_EXPORT void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
- MEDCOUPLING_EXPORT void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
- MEDCOUPLING_EXPORT void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
- MEDCOUPLING_EXPORT std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
- MEDCOUPLING_EXPORT void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner);
+ std::string getClassName() const override { return std::string("MEDCouplingTwoTimeSteps"); }
+ void updateTime() const;
+ void synchronizeTimeWith(const MEDCouplingMesh *mesh);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void copyTinyAttrFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
+ void copyTinyStringsFrom(const MEDCouplingTimeDiscretizationTemplate<double>& other);
+ const DataArrayDouble *getEndArray() const;
+ DataArrayDouble *getEndArray();
+ void checkConsistencyLight() const;
+ bool isEqualIfNotWhy(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingTimeDiscretizationTemplate<double> *other, double prec) const;
+ void checkNoTimePresence() const;
+ void checkTimePresence(double time) const;
+ void getArrays(std::vector<DataArrayDouble *>& arrays) const;
+ void setEndArray(DataArrayDouble *array, TimeLabel *owner);
+ void setStartTime(double time, int iteration, int order) { _start.setAllInfo(time,iteration,order); }
+ void setEndTime(double time, int iteration, int order) { _end.setAllInfo(time,iteration,order); }
+ double getStartTime(int& iteration, int& order) const { return _start.getAllInfo(iteration,order); }
+ double getEndTime(int& iteration, int& order) const { return _end.getAllInfo(iteration,order); }
+ void setStartIteration(int it) { _start.setIteration(it); }
+ void setEndIteration(int it) { _end.setIteration(it); }
+ void setStartOrder(int order) { _start.setOrder(order); }
+ void setEndOrder(int order) { _end.setOrder(order); }
+ void setStartTimeValue(double time) { _start.setTimeValue(time); }
+ void setEndTimeValue(double time) { _end.setTimeValue(time); }
+ void getTinySerializationIntInformation(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation(std::vector<double>& tinyInfo) const;
+ void getTinySerializationStrInformation(std::vector<std::string>& tinyInfo) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfoI, std::vector<DataArrayDouble *>& arrays);
+ void checkForUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<DataArrayDouble *>& arrays);
+ void finishUnserialization(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD, const std::vector<std::string>& tinyInfoS);
+ void getTinySerializationIntInformation2(std::vector<mcIdType>& tinyInfo) const;
+ void getTinySerializationDbleInformation2(std::vector<double>& tinyInfo) const;
+ void finishUnserialization2(const std::vector<mcIdType>& tinyInfoI, const std::vector<double>& tinyInfoD);
+ std::vector< const DataArrayDouble *> getArraysForTime(double time) const;
+ void setArrays(const std::vector<DataArrayDouble *>& arrays, TimeLabel *owner);
protected:
static const char EXCEPTION_MSG[];
protected:
DataArrayDouble *_end_array;
};
- class MEDCouplingLinearTime : public MEDCouplingTwoTimeSteps
+ class MEDCOUPLING_EXPORT MEDCouplingLinearTime : public MEDCouplingTwoTimeSteps
{
protected:
- MEDCOUPLING_EXPORT MEDCouplingLinearTime(const MEDCouplingLinearTime& other, bool deepCopy);
+ MEDCouplingLinearTime(const MEDCouplingLinearTime& other, bool deepCopy);
public:
- MEDCOUPLING_EXPORT MEDCouplingLinearTime();
- MEDCOUPLING_EXPORT std::string getStringRepr() const;
- MEDCOUPLING_EXPORT TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
- MEDCOUPLING_EXPORT bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
- MEDCOUPLING_EXPORT bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
- MEDCOUPLING_EXPORT void getValueOnTime(mcIdType eltId, double time, double *value) const;
- MEDCOUPLING_EXPORT void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void addEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void substractEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void multiplyEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void divideEqual(const MEDCouplingTimeDiscretization *other);
- MEDCOUPLING_EXPORT MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
- MEDCOUPLING_EXPORT void powEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingLinearTime();
+ std::string getStringRepr() const;
+ TypeOfTimeDiscretization getEnum() const { return DISCRETIZATION; }
+ void checkConsistencyLight() const;
+ MEDCouplingTimeDiscretization *performCopyOrIncrRef(bool deepCopy) const;
+ bool areCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatible(const MEDCouplingTimeDiscretizationTemplate<double> *other, std::string& reason) const;
+ bool areStrictlyCompatibleForMul(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areStrictlyCompatibleForDiv(const MEDCouplingTimeDiscretizationTemplate<double> *other) const;
+ bool areCompatibleForMeld(const MEDCouplingTimeDiscretization *other) const;
+ void getValueForTime(double time, const std::vector<double>& vals, double *res) const;
+ void getValueOnTime(mcIdType eltId, double time, double *value) const;
+ void getValueOnDiscTime(mcIdType eltId, int iteration, int order, double *value) const;
+ MEDCouplingTimeDiscretization *aggregate(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *aggregate(const std::vector<const MEDCouplingTimeDiscretization *>& other) const;
+ MEDCouplingTimeDiscretization *meld(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *dot(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *crossProduct(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *max(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *min(const MEDCouplingTimeDiscretization *other) const;
+ MEDCouplingTimeDiscretization *add(const MEDCouplingTimeDiscretization *other) const;
+ void addEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *substract(const MEDCouplingTimeDiscretization *other) const;
+ void substractEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *multiply(const MEDCouplingTimeDiscretization *other) const;
+ void multiplyEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *divide(const MEDCouplingTimeDiscretization *other) const;
+ void divideEqual(const MEDCouplingTimeDiscretization *other);
+ MEDCouplingTimeDiscretization *pow(const MEDCouplingTimeDiscretization *other) const;
+ void powEqual(const MEDCouplingTimeDiscretization *other);
public:
static const TypeOfTimeDiscretization DISCRETIZATION=LINEAR_TIME;
- MEDCOUPLING_EXPORT static const char REPR[];
+ static const char REPR[];
};
}
* Class representing a label of time of the lastely modified part of this.
* More _time is high more the object has been modified recently.
*/
- class TimeLabel
+ class MEDCOUPLING_EXPORT TimeLabel
{
public:
- MEDCOUPLING_EXPORT TimeLabel(const TimeLabel& other) = default;
- MEDCOUPLING_EXPORT TimeLabel& operator=(const TimeLabel& other);
+ TimeLabel(const TimeLabel& other) = default;
+ TimeLabel& operator=(const TimeLabel& other);
//! This method should be called when write access has been done on this.
- MEDCOUPLING_EXPORT void declareAsNew() const;
+ void declareAsNew() const;
//! This method should be called on high level classes as Field or Mesh to take into account modifications done in aggregates objects.
- MEDCOUPLING_EXPORT virtual void updateTime() const = 0;
- MEDCOUPLING_EXPORT std::size_t getTimeOfThis() const { return _time; }
+ virtual void updateTime() const = 0;
+ std::size_t getTimeOfThis() const { return _time; }
protected:
- MEDCOUPLING_EXPORT TimeLabel();
- MEDCOUPLING_EXPORT virtual ~TimeLabel();
- MEDCOUPLING_EXPORT void updateTimeWith(const TimeLabel& other) const;
- MEDCOUPLING_EXPORT void forceTimeOfThis(const TimeLabel& other) const;
+ TimeLabel();
+ virtual ~TimeLabel();
+ void updateTimeWith(const TimeLabel& other) const;
+ void forceTimeOfThis(const TimeLabel& other) const;
private:
static std::atomic<std::size_t> GLOBAL_TIME;
mutable std::size_t _time;
};
- class TimeLabelConstOverseer
+ class MEDCOUPLING_EXPORT TimeLabelConstOverseer
{
public:
- MEDCOUPLING_EXPORT TimeLabelConstOverseer(const TimeLabel *tl);
- MEDCOUPLING_EXPORT void checkConst() const;
- MEDCOUPLING_EXPORT bool resetState();
- MEDCOUPLING_EXPORT bool keepTrackOfNewTL(const TimeLabel *tl);
+ TimeLabelConstOverseer(const TimeLabel *tl);
+ void checkConst() const;
+ bool resetState();
+ bool keepTrackOfNewTL(const TimeLabel *tl);
private:
const TimeLabel *_tl;
std::size_t _ref_time;
class MEDCoupling1GTUMesh;
class MEDCouplingSkyLineArray;
- class MEDCouplingUMesh : public MEDCouplingPointSet
+ class MEDCOUPLING_EXPORT MEDCouplingUMesh : public MEDCouplingPointSet
{
public:
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *New();
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *New(const std::string& meshName, int meshDim);
- MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingUMesh"); }
+ static MEDCouplingUMesh *New();
+ static MEDCouplingUMesh *New(const std::string& meshName, int meshDim);
+ std::string getClassName() const override { return std::string("MEDCouplingUMesh"); }
// Copy methods
- MEDCOUPLING_EXPORT MEDCouplingUMesh *deepCopy() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *clone(bool recDeepCpy) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *deepCopyConnectivityOnly() const;
+ MEDCouplingUMesh *deepCopy() const;
+ MEDCouplingUMesh *clone(bool recDeepCpy) const;
+ MEDCouplingUMesh *deepCopyConnectivityOnly() const;
- MEDCOUPLING_EXPORT void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
- MEDCOUPLING_EXPORT void updateTime() const;
- MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED; }
- MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
- MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
- MEDCOUPLING_EXPORT void checkConsistencyLight() const;
- MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT void setMeshDimension(int meshDim);
- MEDCOUPLING_EXPORT void allocateCells(mcIdType nbOfCells=0);
- MEDCOUPLING_EXPORT void insertNextCell(INTERP_KERNEL::NormalizedCellType type, mcIdType size, const mcIdType *nodalConnOfCell);
- MEDCOUPLING_EXPORT void finishInsertingCells();
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator *cellIterator();
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeEntry *cellsByType();
- MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
- MEDCOUPLING_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypesSorted() const;
- MEDCOUPLING_EXPORT std::set<INTERP_KERNEL::NormalizedCellType> getTypesOfPart(const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT void setConnectivity(DataArrayIdType *conn, DataArrayIdType *connIndex, bool isComputingTypes=true);
- MEDCOUPLING_EXPORT const DataArrayIdType *getNodalConnectivity() const { return _nodal_connec; }
- MEDCOUPLING_EXPORT const DataArrayIdType *getNodalConnectivityIndex() const { return _nodal_connec_index; }
- MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivity() { return _nodal_connec; }
- MEDCOUPLING_EXPORT DataArrayIdType *getNodalConnectivityIndex() { return _nodal_connec_index; }
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
- MEDCOUPLING_EXPORT void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
- MEDCOUPLING_EXPORT std::string simpleRepr() const;
- MEDCOUPLING_EXPORT std::string advancedRepr() const;
- MEDCOUPLING_EXPORT std::string cppRepr() const;
- MEDCOUPLING_EXPORT std::string reprConnectivityOfThis() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfCells() const;
- MEDCOUPLING_EXPORT int getMeshDimension() const;
- MEDCOUPLING_EXPORT mcIdType getNodalConnectivityArrayLen() const;
- MEDCOUPLING_EXPORT void computeTypes();
+ void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other);
+ void updateTime() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDCouplingMeshType getType() const { return UNSTRUCTURED; }
+ bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
+ bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
+ void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
+ void checkConsistencyLight() const;
+ void checkConsistency(double eps=1e-12) const;
+ void setMeshDimension(int meshDim);
+ void allocateCells(mcIdType nbOfCells=0);
+ void insertNextCell(INTERP_KERNEL::NormalizedCellType type, mcIdType size, const mcIdType *nodalConnOfCell);
+ void finishInsertingCells();
+ MEDCouplingUMeshCellIterator *cellIterator();
+ MEDCouplingUMeshCellByTypeEntry *cellsByType();
+ std::set<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
+ std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypesSorted() const;
+ std::set<INTERP_KERNEL::NormalizedCellType> getTypesOfPart(const mcIdType *begin, const mcIdType *end) const;
+ void setConnectivity(DataArrayIdType *conn, DataArrayIdType *connIndex, bool isComputingTypes=true);
+ const DataArrayIdType *getNodalConnectivity() const { return _nodal_connec; }
+ const DataArrayIdType *getNodalConnectivityIndex() const { return _nodal_connec_index; }
+ DataArrayIdType *getNodalConnectivity() { return _nodal_connec; }
+ DataArrayIdType *getNodalConnectivityIndex() { return _nodal_connec_index; }
+ INTERP_KERNEL::NormalizedCellType getTypeOfCell(mcIdType cellId) const;
+ DataArrayIdType *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
+ void getNodeIdsOfCell(mcIdType cellId, std::vector<mcIdType>& conn) const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ std::string cppRepr() const;
+ std::string reprConnectivityOfThis() const;
+ MEDCouplingUMesh *buildSetInstanceFromThis(std::size_t spaceDim) const;
+ mcIdType getNumberOfNodesInCell(mcIdType cellId) const;
+ mcIdType getNumberOfCells() const;
+ int getMeshDimension() const;
+ mcIdType getNodalConnectivityArrayLen() const;
+ void computeTypes();
//! size of returned tinyInfo must be always the same.
- MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
- MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
- MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
- MEDCOUPLING_EXPORT void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
- MEDCOUPLING_EXPORT std::string getVTKDataSetType() const;
- MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
- MEDCOUPLING_EXPORT void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
- MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
+ void getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<mcIdType>& tinyInfo, std::vector<std::string>& littleStrings) const;
+ bool isEmptyMesh(const std::vector<mcIdType>& tinyInfo) const;
+ void resizeForUnserialization(const std::vector<mcIdType>& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const;
+ void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const;
+ void unserialization(const std::vector<double>& tinyInfoD, const std::vector<mcIdType>& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector<std::string>& littleStrings);
+ std::string getVTKDataSetType() const;
+ std::string getVTKFileExtension() const;
+ void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
+ void reprQuickOverview(std::ostream& stream) const;
//tools
- MEDCOUPLING_EXPORT static int AreCellsEqual(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2, int compType);
- MEDCOUPLING_EXPORT static int AreCellsEqualPolicy0(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
- MEDCOUPLING_EXPORT static int AreCellsEqualPolicy1(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
- MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
- MEDCOUPLING_EXPORT static int AreCellsEqualPolicy2NoType(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
- MEDCOUPLING_EXPORT static int AreCellsEqualPolicy7(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
- MEDCOUPLING_EXPORT void convertToPolyTypes(const mcIdType *cellIdsToConvertBg, const mcIdType *cellIdsToConvertEnd);
- MEDCOUPLING_EXPORT void convertAllToPoly();
- MEDCOUPLING_EXPORT void convertExtrudedPolyhedra();
- MEDCOUPLING_EXPORT bool unPolyze();
- MEDCOUPLING_EXPORT void simplifyPolyhedra(double eps);
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSpreadZonesWithPoly() const;
- MEDCOUPLING_EXPORT std::vector<DataArrayIdType *> partitionBySpreadZone() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
- MEDCOUPLING_EXPORT void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeNbOfFacesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayIdType *zipCoordsTraducer();
- MEDCOUPLING_EXPORT void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
- MEDCOUPLING_EXPORT bool areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayIdType *& arr) const;
- MEDCOUPLING_EXPORT bool areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayIdType *& arr) const;
- MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> explodeIntoEdges(MCAuto<DataArrayIdType>& desc, MCAuto<DataArrayIdType>& descIndex, MCAuto<DataArrayIdType>& revDesc, MCAuto<DataArrayIdType>& revDescIndx) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *explode3DMeshTo1D(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
- MEDCOUPLING_EXPORT void computeNeighborsOfCells(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
- MEDCOUPLING_EXPORT void computeCellNeighborhoodFromNodesOne(const DataArrayIdType *nodeNeigh, const DataArrayIdType *nodeNeighI, MCAuto<DataArrayIdType>& cellNeigh, MCAuto<DataArrayIdType>& cellNeighIndex) const;
- MEDCOUPLING_EXPORT static void ComputeNeighborsOfCellsAdv(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *revDesc, const DataArrayIdType *revDescI,
+ static int AreCellsEqual(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2, int compType);
+ static int AreCellsEqualPolicy0(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+ static int AreCellsEqualPolicy1(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+ static int AreCellsEqualPolicy2(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+ static int AreCellsEqualPolicy2NoType(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+ static int AreCellsEqualPolicy7(const mcIdType *conn, const mcIdType *connI, mcIdType cell1, mcIdType cell2);
+ void convertToPolyTypes(const mcIdType *cellIdsToConvertBg, const mcIdType *cellIdsToConvertEnd);
+ void convertAllToPoly();
+ void convertExtrudedPolyhedra();
+ bool unPolyze();
+ void simplifyPolyhedra(double eps);
+ MEDCouplingUMesh *buildSpreadZonesWithPoly() const;
+ std::vector<DataArrayIdType *> partitionBySpreadZone() const;
+ DataArrayIdType *computeFetchedNodeIds() const;
+ DataArrayIdType *getNodeIdsInUse(mcIdType& nbrOfNodesInUse) const;
+ void computeNodeIdsAlg(std::vector<bool>& nodeIdsInUse) const;
+ DataArrayIdType *computeNbOfNodesPerCell() const;
+ DataArrayIdType *computeNbOfFacesPerCell() const;
+ DataArrayIdType *computeEffectiveNbOfNodesPerCell() const;
+ DataArrayIdType *zipCoordsTraducer();
+ void findCommonCells(int compType, mcIdType startCellId, DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr) const;
+ bool areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayIdType *& arr) const;
+ bool areCellsIncludedInPolicy7(const MEDCouplingUMesh *other, DataArrayIdType *& arr) const;
+ void getReverseNodalConnectivity(DataArrayIdType *revNodal, DataArrayIdType *revNodalIndx) const;
+ MCAuto<MEDCouplingUMesh> explodeIntoEdges(MCAuto<DataArrayIdType>& desc, MCAuto<DataArrayIdType>& descIndex, MCAuto<DataArrayIdType>& revDesc, MCAuto<DataArrayIdType>& revDescIndx) const;
+ MEDCouplingUMesh *explode3DMeshTo1D(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+ MEDCouplingUMesh *buildDescendingConnectivity(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+ MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+ MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *revDesc, DataArrayIdType *revDescIndx) const;
+ void computeNeighborsOfCells(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
+ void computeCellNeighborhoodFromNodesOne(const DataArrayIdType *nodeNeigh, const DataArrayIdType *nodeNeighI, MCAuto<DataArrayIdType>& cellNeigh, MCAuto<DataArrayIdType>& cellNeighIndex) const;
+ static void ComputeNeighborsOfCellsAdv(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *revDesc, const DataArrayIdType *revDescI,
DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx);
- MEDCOUPLING_EXPORT void computeNeighborsOfNodes(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
- MEDCOUPLING_EXPORT void computeEnlargedNeighborsOfNodes(MCAuto<DataArrayIdType> &neighbors, MCAuto<DataArrayIdType>& neighborsIdx) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelf(const mcIdType *begin, const mcIdType *end, bool keepCoords=true) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
- MEDCOUPLING_EXPORT void setPartOfMySelf(const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
- MEDCOUPLING_EXPORT void setPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildFacePartOfMySelfNode(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
- MEDCOUPLING_EXPORT DataArrayIdType *findBoundaryNodes() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildBoundaryMesh(bool keepCoords) const;
- MEDCOUPLING_EXPORT DataArrayIdType *findCellIdsOnBoundary() const;
- MEDCOUPLING_EXPORT void findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *&cellIdsRk0, DataArrayIdType *&cellIdsRk1) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *computeSkin() const;
- MEDCOUPLING_EXPORT void findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *& nodeIdsToDuplicate,
+ void computeNeighborsOfNodes(DataArrayIdType *&neighbors, DataArrayIdType *&neighborsIdx) const;
+ void computeEnlargedNeighborsOfNodes(MCAuto<DataArrayIdType> &neighbors, MCAuto<DataArrayIdType>& neighborsIdx) const;
+ MEDCouplingUMesh *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const;
+ MEDCouplingUMesh *buildPartOfMySelf(const mcIdType *begin, const mcIdType *end, bool keepCoords=true) const;
+ MEDCouplingUMesh *buildPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, bool keepCoords=true) const;
+ void setPartOfMySelf(const mcIdType *cellIdsBg, const mcIdType *cellIdsEnd, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
+ void setPartOfMySelfSlice(mcIdType start, mcIdType end, mcIdType step, const MEDCouplingUMesh& otherOnSameCoordsThanThis);
+ MEDCouplingUMesh *buildFacePartOfMySelfNode(const mcIdType *begin, const mcIdType *end, bool fullyIn) const;
+ MEDCouplingUMesh *buildUnstructured() const;
+ DataArrayIdType *findBoundaryNodes() const;
+ MEDCouplingUMesh *buildBoundaryMesh(bool keepCoords) const;
+ DataArrayIdType *findCellIdsOnBoundary() const;
+ void findCellIdsLyingOn(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *&cellIdsRk0, DataArrayIdType *&cellIdsRk1) const;
+ MEDCouplingUMesh *computeSkin() const;
+ void findNodesToDuplicate(const MEDCouplingUMesh& otherDimM1OnSameCoords, DataArrayIdType *& nodeIdsToDuplicate,
DataArrayIdType *& cellIdsNeededToBeRenum, DataArrayIdType *& cellIdsNotModified) const;
- MEDCOUPLING_EXPORT void duplicateNodes(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
- MEDCOUPLING_EXPORT void renumberNodesWithOffsetInConn(mcIdType offset);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
- MEDCOUPLING_EXPORT void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
- MEDCOUPLING_EXPORT void shiftNodeNumbersInConn(mcIdType delta);
- MEDCOUPLING_EXPORT void duplicateNodesInConn(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd, mcIdType offset);
- MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getPartMeasureField(bool isAbs, const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildPartOrthogonalField(const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildDirectionVectorField() const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3D(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
- MEDCOUPLING_EXPORT MCAuto<MEDCouplingUMesh> clipSingle3DCellByPlane(const double origin[3], const double vec[3], double eps) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const;
- MEDCOUPLING_EXPORT bool isContiguous1D() const;
- MEDCOUPLING_EXPORT void project1D(const double *pt, const double *v, double eps, double *res) const;
- MEDCOUPLING_EXPORT double distanceToPoint(const double *ptBg, const double *ptEnd, mcIdType& cellId) const;
- MEDCOUPLING_EXPORT DataArrayDouble *distanceToPoints(const DataArrayDouble *pts, DataArrayIdType *& cellIds) const;
- MEDCOUPLING_EXPORT mcIdType getCellContainingPoint(const double *pos, double eps) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
- MEDCOUPLING_EXPORT void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
- MEDCOUPLING_EXPORT void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
- MEDCOUPLING_EXPORT void checkButterflyCells(std::vector<mcIdType>& cells, double eps=1e-12) const;
- MEDCOUPLING_EXPORT DataArrayIdType *convexEnvelop2D();
- MEDCOUPLING_EXPORT DataArrayIdType *findAndCorrectBadOriented3DExtrudedCells();
- MEDCOUPLING_EXPORT DataArrayIdType *findAndCorrectBadOriented3DCells();
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTreeFast() const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const;
- MEDCOUPLING_EXPORT DataArrayDouble *getBoundingBoxForBBTree1DQuadratic(double arcDetEps=1e-12) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy);
- MEDCOUPLING_EXPORT bool isFullyQuadratic() const;
- MEDCOUPLING_EXPORT bool isPresenceOfQuadratic() const;
- MEDCOUPLING_EXPORT void convertQuadraticCellsToLinear();
- MEDCOUPLING_EXPORT DataArrayIdType *convertLinearCellsToQuadratic(int conversionType=0);
- MEDCOUPLING_EXPORT void tessellate2D(double eps);
- MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *tetrahedrize(int policy, DataArrayIdType *& n2oCells, mcIdType& nbOfAdditionalPoints) const;
- MEDCOUPLING_EXPORT DataArrayIdType *simplexize(int policy);
- MEDCOUPLING_EXPORT bool areOnlySimplexCells() const;
- MEDCOUPLING_EXPORT void convertDegeneratedCells();
- MEDCOUPLING_EXPORT DataArrayIdType *convertDegeneratedCellsAndRemoveFlatOnes();
- MEDCOUPLING_EXPORT bool removeDegenerated1DCells();
- MEDCOUPLING_EXPORT void are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<mcIdType>& cells) const;
- MEDCOUPLING_EXPORT void orientCorrectly2DCells(const double *vec, bool polyOnly);
- MEDCOUPLING_EXPORT void changeOrientationOfCells();
- MEDCOUPLING_EXPORT void arePolyhedronsNotCorrectlyOriented(std::vector<mcIdType>& cells) const;
- MEDCOUPLING_EXPORT void orientCorrectlyPolyhedrons();
- MEDCOUPLING_EXPORT void invertOrientationOfAllCells();
- MEDCOUPLING_EXPORT void getFastAveragePlaneOfThis(double *vec, double *pos) const;
- MEDCOUPLING_EXPORT void attractSeg3MidPtsAroundNodes(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd);
+ void duplicateNodes(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd);
+ void renumberNodesWithOffsetInConn(mcIdType offset);
+ void renumberNodesInConn(const INTERP_KERNEL::HashMap<mcIdType,mcIdType>& newNodeNumbersO2N);
+ void renumberNodesInConn(const mcIdType *newNodeNumbersO2N);
+ void renumberNodesInConn(const std::map<mcIdType,mcIdType>& newNodeNumbersO2N) override;
+ void shiftNodeNumbersInConn(mcIdType delta);
+ void duplicateNodesInConn(const mcIdType *nodeIdsToDuplicateBg, const mcIdType *nodeIdsToDuplicateEnd, mcIdType offset);
+ void renumberCells(const mcIdType *old2NewBg, bool check=true);
+ DataArrayIdType *getCellsInBoundingBox(const double *bbox, double eps) const;
+ DataArrayIdType *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps);
+ MEDCouplingFieldDouble *getMeasureField(bool isAbs) const;
+ DataArrayDouble *getPartMeasureField(bool isAbs, const mcIdType *begin, const mcIdType *end) const;
+ MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const;
+ MEDCouplingFieldDouble *buildOrthogonalField() const;
+ MEDCouplingFieldDouble *buildPartOrthogonalField(const mcIdType *begin, const mcIdType *end) const;
+ MEDCouplingFieldDouble *buildDirectionVectorField() const;
+ MEDCouplingUMesh *buildSlice3D(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
+ MEDCouplingUMesh *buildSlice3DSurf(const double *origin, const double *vec, double eps, DataArrayIdType *&cellIds) const;
+ MCAuto<MEDCouplingUMesh> clipSingle3DCellByPlane(const double origin[3], const double vec[3], double eps) const;
+ DataArrayIdType *getCellIdsCrossingPlane(const double *origin, const double *vec, double eps) const;
+ bool isContiguous1D() const;
+ void project1D(const double *pt, const double *v, double eps, double *res) const;
+ double distanceToPoint(const double *ptBg, const double *ptEnd, mcIdType& cellId) const;
+ DataArrayDouble *distanceToPoints(const DataArrayDouble *pts, DataArrayIdType *& cellIds) const;
+ mcIdType getCellContainingPoint(const double *pos, double eps) const;
+ void getCellsContainingPoint(const double *pos, double eps, std::vector<mcIdType>& elts) const;
+ void getCellsContainingPoints(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
+ void getCellsContainingPointsLinearPartOnlyOnNonDynType(const double *pos, mcIdType nbOfPoints, double eps, MCAuto<DataArrayIdType>& elts, MCAuto<DataArrayIdType>& eltsIndex) const override;
+ void checkButterflyCells(std::vector<mcIdType>& cells, double eps=1e-12) const;
+ DataArrayIdType *convexEnvelop2D();
+ DataArrayIdType *findAndCorrectBadOriented3DExtrudedCells();
+ DataArrayIdType *findAndCorrectBadOriented3DCells();
+ DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const;
+ DataArrayDouble *getBoundingBoxForBBTreeFast() const;
+ DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const;
+ DataArrayDouble *getBoundingBoxForBBTree1DQuadratic(double arcDetEps=1e-12) const;
+ MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy);
+ bool isFullyQuadratic() const;
+ bool isPresenceOfQuadratic() const;
+ void convertQuadraticCellsToLinear();
+ DataArrayIdType *convertLinearCellsToQuadratic(int conversionType=0);
+ void tessellate2D(double eps);
+ MEDCoupling1SGTUMesh *tetrahedrize(int policy, DataArrayIdType *& n2oCells, mcIdType& nbOfAdditionalPoints) const;
+ DataArrayIdType *simplexize(int policy);
+ bool areOnlySimplexCells() const;
+ void convertDegeneratedCells();
+ DataArrayIdType *convertDegeneratedCellsAndRemoveFlatOnes();
+ bool removeDegenerated1DCells();
+ void are2DCellsNotCorrectlyOriented(const double *vec, bool polyOnly, std::vector<mcIdType>& cells) const;
+ void orientCorrectly2DCells(const double *vec, bool polyOnly);
+ void changeOrientationOfCells();
+ void arePolyhedronsNotCorrectlyOriented(std::vector<mcIdType>& cells) const;
+ void orientCorrectlyPolyhedrons();
+ void invertOrientationOfAllCells();
+ void getFastAveragePlaneOfThis(double *vec, double *pos) const;
+ void attractSeg3MidPtsAroundNodes(double ratio, const mcIdType *nodeIdsBg, const mcIdType *nodeIdsEnd);
//Mesh quality
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getEdgeRatioField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getAspectRatioField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getWarpField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getSkewField() const;
- MEDCOUPLING_EXPORT MEDCouplingFieldDouble *computeDiameterField() const;
+ MEDCouplingFieldDouble *getEdgeRatioField() const;
+ MEDCouplingFieldDouble *getAspectRatioField() const;
+ MEDCouplingFieldDouble *getWarpField() const;
+ MEDCouplingFieldDouble *getSkewField() const;
+ MEDCouplingFieldDouble *computeDiameterField() const;
//utilities for MED File RW
- MEDCOUPLING_EXPORT std::vector<mcIdType> getDistributionOfTypes() const;
- MEDCOUPLING_EXPORT DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
- MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *&revDesc, DataArrayIdType *&revDescIndx, DataArrayIdType *& nM1LevMeshIds, DataArrayIdType *&meshnM1Old2New) const;
- MEDCOUPLING_EXPORT DataArrayIdType *sortCellsInMEDFileFrmt();
- MEDCOUPLING_EXPORT bool checkConsecutiveCellTypes() const;
- MEDCOUPLING_EXPORT bool checkConsecutiveCellTypesForMEDFileFrmt() const;
- MEDCOUPLING_EXPORT bool checkConsecutiveCellTypesAndOrder(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayIdType *&nbPerType) const;
- MEDCOUPLING_EXPORT DataArrayIdType *getRenumArrForMEDFileFrmt() const;
- MEDCOUPLING_EXPORT DataArrayIdType *getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
- MEDCOUPLING_EXPORT DataArrayIdType *rearrange2ConsecutiveCellTypes();
- MEDCOUPLING_EXPORT std::vector<MEDCouplingUMesh *> splitByType() const;
- MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const;
- MEDCOUPLING_EXPORT DataArrayIdType *convertNodalConnectivityToStaticGeoTypeMesh() const;
- MEDCOUPLING_EXPORT void convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndex) const;
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *AggregateSortedByTypeMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& ms,
+ std::vector<mcIdType> getDistributionOfTypes() const;
+ DataArrayIdType *checkTypeConsistencyAndContig(const std::vector<mcIdType>& code, const std::vector<const DataArrayIdType *>& idsPerType) const;
+ void splitProfilePerType(const DataArrayIdType *profile, std::vector<mcIdType>& code, std::vector<DataArrayIdType *>& idsInPflPerType, std::vector<DataArrayIdType *>& idsPerType, bool smartPflKiller=true) const;
+ MEDCouplingUMesh *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh, DataArrayIdType *desc, DataArrayIdType *descIndx, DataArrayIdType *&revDesc, DataArrayIdType *&revDescIndx, DataArrayIdType *& nM1LevMeshIds, DataArrayIdType *&meshnM1Old2New) const;
+ DataArrayIdType *sortCellsInMEDFileFrmt();
+ bool checkConsecutiveCellTypes() const;
+ bool checkConsecutiveCellTypesForMEDFileFrmt() const;
+ bool checkConsecutiveCellTypesAndOrder(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
+ DataArrayIdType *getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayIdType *&nbPerType) const;
+ DataArrayIdType *getRenumArrForMEDFileFrmt() const;
+ DataArrayIdType *getRenumArrForConsecutiveCellTypesSpec(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd) const;
+ DataArrayIdType *rearrange2ConsecutiveCellTypes();
+ std::vector<MEDCouplingUMesh *> splitByType() const;
+ MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const;
+ DataArrayIdType *convertNodalConnectivityToStaticGeoTypeMesh() const;
+ void convertNodalConnectivityToDynamicGeoTypeMesh(DataArrayIdType *&nodalConn, DataArrayIdType *&nodalConnIndex) const;
+ static MEDCouplingUMesh *AggregateSortedByTypeMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& ms,
DataArrayIdType *&szOfCellGrpOfSameType,
DataArrayIdType *&idInMsOfCellGrpOfSameType);
- MEDCOUPLING_EXPORT DataArrayIdType *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT DataArrayIdType *convertCellArrayPerGeoType(const DataArrayIdType *da) const;
- MEDCOUPLING_EXPORT MEDCouplingUMesh *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const mcIdType *idsPerGeoTypeBg, const mcIdType *idsPerGeoTypeEnd) const;
- MEDCOUPLING_EXPORT std::vector<bool> getQuadraticStatus() const;
+ DataArrayIdType *keepCellIdsByType(INTERP_KERNEL::NormalizedCellType type, const mcIdType *begin, const mcIdType *end) const;
+ DataArrayIdType *convertCellArrayPerGeoType(const DataArrayIdType *da) const;
+ MEDCouplingUMesh *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, const mcIdType *idsPerGeoTypeBg, const mcIdType *idsPerGeoTypeEnd) const;
+ std::vector<bool> getQuadraticStatus() const;
//
- MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMassWithPrecision(double eps) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
- MEDCOUPLING_EXPORT DataArrayDouble *getPartBarycenterAndOwner(const mcIdType *begin, const mcIdType *end) const;
- MEDCOUPLING_EXPORT DataArrayDouble *computePlaneEquationOf3DFaces() const;
- MEDCOUPLING_EXPORT DataArrayIdType *conformize2D(double eps);
- MEDCOUPLING_EXPORT DataArrayIdType *colinearize2D(double eps);
- MEDCOUPLING_EXPORT DataArrayIdType *colinearizeKeepingConform2D(double eps);
- MEDCOUPLING_EXPORT DataArrayIdType *conformize3D(double eps);
- MEDCOUPLING_EXPORT mcIdType split2DCells(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *midOpt=0, const DataArrayIdType *midOptI=0);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da);
- MEDCOUPLING_EXPORT static MCAuto<MEDCouplingUMesh> Build1DMeshFromCoords(DataArrayDouble *da);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const std::vector<const MEDCouplingUMesh *>& a);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayIdType *>& corr);
- MEDCOUPLING_EXPORT static void PutUMeshesOnSameAggregatedCoords(const std::vector<MEDCouplingUMesh *>& meshes);
- MEDCOUPLING_EXPORT static void MergeNodesOnUMeshesSharingSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, double eps);
- MEDCOUPLING_EXPORT static bool IsPolygonWellOriented(bool isQuadratic, const double *vec, const mcIdType *begin, const mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static bool IsPolyhedronWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static bool Is3DExtrudedStaticCellWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static void CorrectExtrudedStaticCell(mcIdType *begin, mcIdType *end);
- MEDCOUPLING_EXPORT static bool IsTetra4WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static bool IsPyra5WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static void SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, mcIdType index, DataArrayIdType *res, MEDCouplingUMesh *faces,
+ MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
+ DataArrayDouble *computeCellCenterOfMass() const;
+ DataArrayDouble *computeCellCenterOfMassWithPrecision(double eps) const;
+ DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const;
+ DataArrayDouble *getPartBarycenterAndOwner(const mcIdType *begin, const mcIdType *end) const;
+ DataArrayDouble *computePlaneEquationOf3DFaces() const;
+ DataArrayIdType *conformize2D(double eps);
+ DataArrayIdType *colinearize2D(double eps);
+ DataArrayIdType *colinearizeKeepingConform2D(double eps);
+ DataArrayIdType *conformize3D(double eps);
+ mcIdType split2DCells(const DataArrayIdType *desc, const DataArrayIdType *descI, const DataArrayIdType *subNodesInSeg, const DataArrayIdType *subNodesInSegI, const DataArrayIdType *midOpt=0, const DataArrayIdType *midOptI=0);
+ static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da);
+ static MCAuto<MEDCouplingUMesh> Build1DMeshFromCoords(DataArrayDouble *da);
+ static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
+ static MEDCouplingUMesh *MergeUMeshes(const std::vector<const MEDCouplingUMesh *>& a);
+ static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2);
+ static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes);
+ static MEDCouplingUMesh *FuseUMeshesOnSameCoords(const std::vector<const MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayIdType *>& corr);
+ static void PutUMeshesOnSameAggregatedCoords(const std::vector<MEDCouplingUMesh *>& meshes);
+ static void MergeNodesOnUMeshesSharingSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, double eps);
+ static bool IsPolygonWellOriented(bool isQuadratic, const double *vec, const mcIdType *begin, const mcIdType *end, const double *coords);
+ static bool IsPolyhedronWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+ static bool Is3DExtrudedStaticCellWellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+ static void CorrectExtrudedStaticCell(mcIdType *begin, mcIdType *end);
+ static bool IsTetra4WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+ static bool IsPyra5WellOriented(const mcIdType *begin, const mcIdType *end, const double *coords);
+ static void SimplifyPolyhedronCell(double eps, const DataArrayDouble *coords, mcIdType index, DataArrayIdType *res, MEDCouplingUMesh *faces,
DataArrayIdType *E_Fi, DataArrayIdType *E_F, DataArrayIdType *F_Ei, DataArrayIdType *F_E);
- MEDCOUPLING_EXPORT static void ComputeVecAndPtOfFace(double eps, const double *coords, const mcIdType *begin, const mcIdType *end, double *v, double *p);
- MEDCOUPLING_EXPORT static void TryToCorrectPolyhedronOrientation(mcIdType *begin, mcIdType *end, const double *coords);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, DataArrayIdType *&cellNb1, DataArrayIdType *&cellNb2);
- MEDCOUPLING_EXPORT static void Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D,
+ static void ComputeVecAndPtOfFace(double eps, const double *coords, const mcIdType *begin, const mcIdType *end, double *v, double *p);
+ static void TryToCorrectPolyhedronOrientation(mcIdType *begin, mcIdType *end, const double *coords);
+ static MEDCouplingUMesh *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, DataArrayIdType *&cellNb1, DataArrayIdType *&cellNb2);
+ static void Intersect2DMeshWith1DLine(const MEDCouplingUMesh *mesh2D, const MEDCouplingUMesh *mesh1D,
double eps, MEDCouplingUMesh *&splitMesh2D, MEDCouplingUMesh *&splitMesh1D, DataArrayIdType *&cellIdInMesh2D, DataArrayIdType *&cellIdInMesh1D);
- MEDCOUPLING_EXPORT static bool BuildConvexEnvelopOf2DCellJarvis(const double *coords, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, DataArrayIdType *nodalConnecOut);
- MEDCOUPLING_EXPORT static std::vector<DataArrayIdType *> PartitionBySpreadZone(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
- MEDCOUPLING_EXPORT static DataArrayIdType *ComputeSpreadZoneGradually(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
- MEDCOUPLING_EXPORT static DataArrayIdType *ComputeSpreadZoneGraduallyFromSeed(const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed);
- MEDCOUPLING_EXPORT static void FindCommonCellsAlg(int compType, mcIdType startCellId, const DataArrayIdType *nodal, const DataArrayIdType *nodalI, const DataArrayIdType *revNodal, const DataArrayIdType *revNodalI,
+ static bool BuildConvexEnvelopOf2DCellJarvis(const double *coords, const mcIdType *nodalConnBg, const mcIdType *nodalConnEnd, DataArrayIdType *nodalConnecOut);
+ static std::vector<DataArrayIdType *> PartitionBySpreadZone(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
+ static DataArrayIdType *ComputeSpreadZoneGradually(const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn);
+ static DataArrayIdType *ComputeSpreadZoneGraduallyFromSeed(const mcIdType *seedBg, const mcIdType *seedEnd, const DataArrayIdType *arrIn, const DataArrayIdType *arrIndxIn, mcIdType nbOfDepthPeeling, mcIdType& nbOfDepthPeelingPerformed);
+ static void FindCommonCellsAlg(int compType, mcIdType startCellId, const DataArrayIdType *nodal, const DataArrayIdType *nodalI, const DataArrayIdType *revNodal, const DataArrayIdType *revNodalI,
DataArrayIdType *& commonCellsArr, DataArrayIdType *& commonCellsIArr);
- MEDCOUPLING_EXPORT DataArrayIdType *buildUnionOf2DMesh() const;
- MEDCOUPLING_EXPORT DataArrayIdType *buildUnionOf3DMesh() const;
- MEDCOUPLING_EXPORT DataArrayIdType *orderConsecutiveCells1D() const;
- MEDCOUPLING_EXPORT MEDCouplingSkyLineArray* generateGraph() const;
+ DataArrayIdType *buildUnionOf2DMesh() const;
+ DataArrayIdType *buildUnionOf3DMesh() const;
+ DataArrayIdType *orderConsecutiveCells1D() const;
+ MEDCouplingSkyLineArray* generateGraph() const;
private: // all private methods are impl in MEDCouplingUMesh_internal.cxx
MEDCouplingUMesh();
template<class MAPCLS>
void renumberNodesInConnT(const MAPCLS& newNodeNumbersO2N);
public:
- MEDCOUPLING_EXPORT static DataArrayIdType *ComputeRangesFromTypeDistribution(const std::vector<mcIdType>& code);
- MEDCOUPLING_EXPORT static const int N_MEDMEM_ORDER=25;
- MEDCOUPLING_EXPORT static const INTERP_KERNEL::NormalizedCellType MEDMEM_ORDER[N_MEDMEM_ORDER];
+ static DataArrayIdType *ComputeRangesFromTypeDistribution(const std::vector<mcIdType>& code);
+ static const int N_MEDMEM_ORDER=25;
+ static const INTERP_KERNEL::NormalizedCellType MEDMEM_ORDER[N_MEDMEM_ORDER];
/// @endcond
private:
int _mesh_dim;
class MEDCouplingUMeshCell;
- class MEDCouplingUMeshCellIterator
+ class MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator
{
public:
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh);
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
- MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellIterator();
- MEDCOUPLING_EXPORT MEDCouplingUMeshCell *nextt();
+ MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh);
+ MEDCouplingUMeshCellIterator(MEDCouplingUMesh *mesh, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
+ ~MEDCouplingUMeshCellIterator();
+ MEDCouplingUMeshCell *nextt();
private:
MEDCouplingUMesh *_mesh;
MEDCouplingUMeshCell *_cell;
class MEDCouplingUMeshCellByTypeIterator;
- class MEDCouplingUMeshCellByTypeEntry
+ class MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeEntry
{
public:
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeEntry(MEDCouplingUMesh *mesh);
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeIterator *iterator();
- MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellByTypeEntry();
+ MEDCouplingUMeshCellByTypeEntry(MEDCouplingUMesh *mesh);
+ MEDCouplingUMeshCellByTypeIterator *iterator();
+ ~MEDCouplingUMeshCellByTypeEntry();
private:
MEDCouplingUMesh *_mesh;
};
- class MEDCouplingUMeshCellEntry
+ class MEDCOUPLING_EXPORT MEDCouplingUMeshCellEntry
{
public:
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh, INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
- MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellEntry();
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const;
- MEDCOUPLING_EXPORT mcIdType getNumberOfElems() const;
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator *iterator();
+ MEDCouplingUMeshCellEntry(MEDCouplingUMesh *mesh, INTERP_KERNEL::NormalizedCellType type, MEDCouplingUMeshCell *itc, mcIdType bg, mcIdType end);
+ ~MEDCouplingUMeshCellEntry();
+ INTERP_KERNEL::NormalizedCellType getType() const;
+ mcIdType getNumberOfElems() const;
+ MEDCouplingUMeshCellIterator *iterator();
private:
MEDCouplingUMesh *_mesh;
INTERP_KERNEL::NormalizedCellType _type;
mcIdType _end;
};
- class MEDCouplingUMeshCellByTypeIterator
+ class MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeIterator
{
public:
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeIterator(MEDCouplingUMesh *mesh);
- MEDCOUPLING_EXPORT ~MEDCouplingUMeshCellByTypeIterator();
- MEDCOUPLING_EXPORT MEDCouplingUMeshCellEntry *nextt();
+ MEDCouplingUMeshCellByTypeIterator(MEDCouplingUMesh *mesh);
+ ~MEDCouplingUMeshCellByTypeIterator();
+ MEDCouplingUMeshCellEntry *nextt();
private:
MEDCouplingUMesh *_mesh;
MEDCouplingUMeshCell *_cell;
mcIdType _nb_cell;
};
- class MEDCouplingUMeshCell
+ class MEDCOUPLING_EXPORT MEDCouplingUMeshCell
{
public:
- MEDCOUPLING_EXPORT MEDCouplingUMeshCell(MEDCouplingUMesh *mesh);
- MEDCOUPLING_EXPORT void next();
- MEDCOUPLING_EXPORT std::string repr() const;
- MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getType() const;
- MEDCOUPLING_EXPORT const mcIdType *getAllConn(mcIdType& lgth) const;
+ MEDCouplingUMeshCell(MEDCouplingUMesh *mesh);
+ void next();
+ std::string repr() const;
+ INTERP_KERNEL::NormalizedCellType getType() const;
+ const mcIdType *getAllConn(mcIdType& lgth) const;
private:
mcIdType *_conn;
mcIdType *_conn_indx;
};
template<typename T, typename TOUT>
- class UMeshGenIterator : public std::iterator< std::input_iterator_tag, const TOUT *, mcIdType, const TOUT **, const TOUT *>
+ class MEDCOUPLING_EXPORT UMeshGenIterator : public std::iterator< std::input_iterator_tag, const TOUT *, mcIdType, const TOUT **, const TOUT *>
{
std::size_t _num = 0;
std::vector<const MEDCouplingUMesh *> *_data = nullptr;
/*!
* User class.
*/
- class MEDFileData : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileData : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileData *New(const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileData *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileData *New();
- MEDLOADER_EXPORT static MEDFileData *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileData>(db); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileData"); }
- MEDLOADER_EXPORT MEDFileData *deepCopy() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileFields *getFields() const;
- MEDLOADER_EXPORT MEDFileMeshes *getMeshes() const;
- MEDLOADER_EXPORT MEDFileParameters *getParams() const;
- MEDLOADER_EXPORT void setFields(MEDFileFields *fields);
- MEDLOADER_EXPORT void setMeshes(MEDFileMeshes *meshes);
- MEDLOADER_EXPORT void setParams(MEDFileParameters *params);
- MEDLOADER_EXPORT int getNumberOfFields() const;
- MEDLOADER_EXPORT int getNumberOfMeshes() const;
- MEDLOADER_EXPORT int getNumberOfParams() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
+ static MEDFileData *New(const std::string& fileName);
+ static MEDFileData *New(med_idt fid);
+ static MEDFileData *New();
+ static MEDFileData *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileData>(db); }
+ std::string getClassName() const override { return std::string("MEDFileData"); }
+ MEDFileData *deepCopy() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileFields *getFields() const;
+ MEDFileMeshes *getMeshes() const;
+ MEDFileParameters *getParams() const;
+ void setFields(MEDFileFields *fields);
+ void setMeshes(MEDFileMeshes *meshes);
+ void setParams(MEDFileParameters *params);
+ int getNumberOfFields() const;
+ int getNumberOfMeshes() const;
+ int getNumberOfParams() const;
+ std::string simpleRepr() const;
//
- MEDLOADER_EXPORT std::string getHeader() const;
- MEDLOADER_EXPORT void setHeader(const std::string& header);
+ std::string getHeader() const;
+ void setHeader(const std::string& header);
//
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName);
- MEDLOADER_EXPORT bool unPolyzeMeshes();
- MEDLOADER_EXPORT void dealWithStructureElements();
- MEDLOADER_EXPORT static MCAuto<MEDFileData> Aggregate(const std::vector<const MEDFileData *>& mfds);
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ bool changeMeshName(const std::string& oldMeshName, const std::string& newMeshName);
+ bool unPolyzeMeshes();
+ void dealWithStructureElements();
+ static MCAuto<MEDFileData> Aggregate(const std::vector<const MEDFileData *>& mfds);
//
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
+ void writeLL(med_idt fid) const;
private:
MEDFileData();
MEDFileData(med_idt fid);
class MEDFileEquivalences;
class MEDFileMesh;
- class MEDFileEquivalencePair : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileEquivalencePair : public RefCountObject, public MEDFileWritableStandAlone
{
public:
static MEDFileEquivalencePair *Load(MEDFileEquivalences *father, med_idt fid, const std::string& name, const std::string &desc);
bool isEqual(const MEDFileEquivalencePair *other, std::string& what) const;
void getRepr(std::ostream& oss) const;
static MEDFileEquivalencePair *New(MEDFileEquivalences *father, const std::string& name);
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
public:
- MEDLOADER_EXPORT std::string getName() const { return _name; }
- MEDLOADER_EXPORT void setName(const std::string& name) { _name=name; }
- MEDLOADER_EXPORT std::string getDescription() const { return _description; }
- MEDLOADER_EXPORT void setDescription(const std::string& descr) { _description=descr; }
- MEDLOADER_EXPORT MEDFileEquivalenceCell *initCell();
- MEDLOADER_EXPORT MEDFileEquivalenceNode *initNode();
- MEDLOADER_EXPORT MEDFileEquivalenceCell *getCell() { return _cell; }
- MEDLOADER_EXPORT MEDFileEquivalenceNode *getNode() { return _node; }
- MEDLOADER_EXPORT void setArray(int meshDimRelToMaxExt, DataArrayInt *da);
+ std::string getName() const { return _name; }
+ void setName(const std::string& name) { _name=name; }
+ std::string getDescription() const { return _description; }
+ void setDescription(const std::string& descr) { _description=descr; }
+ MEDFileEquivalenceCell *initCell();
+ MEDFileEquivalenceNode *initNode();
+ MEDFileEquivalenceCell *getCell() { return _cell; }
+ MEDFileEquivalenceNode *getNode() { return _node; }
+ void setArray(int meshDimRelToMaxExt, DataArrayInt *da);
private:
MEDFileEquivalencePair(MEDFileEquivalences *father, const std::string& name, const std::string& desc):_father(father),_name(name),_description(desc) { }
void load(med_idt fid);
MCAuto<MEDFileEquivalenceNode> _node;
};
- class MEDFileEquivalences : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileEquivalences : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT const MEDFileMesh *getMesh() const { return _owner; }
- MEDLOADER_EXPORT MEDFileMesh *getMesh() { return _owner; }
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ const MEDFileMesh *getMesh() const { return _owner; }
+ MEDFileMesh *getMesh() { return _owner; }
void getDtIt(int &dt, int &it) const;
std::string getMeshName() const;
void pushEquivalence(MEDFileEquivalencePair *elt);
bool isEqual(const MEDFileEquivalences *other, std::string& what) const;
void getRepr(std::ostream& oss) const;
public:
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileEquivalences"); }
- MEDLOADER_EXPORT MEDFileEquivalencePair *getEquivalence(int i);
- MEDLOADER_EXPORT MEDFileEquivalencePair *getEquivalenceWithName(const std::string& name);
- MEDLOADER_EXPORT int size() const;
- MEDLOADER_EXPORT std::vector<std::string> getEquivalenceNames() const;
- MEDLOADER_EXPORT MEDFileEquivalencePair *appendEmptyEquivalenceWithName(const std::string& name);
- MEDLOADER_EXPORT void killEquivalenceWithName(const std::string& name);
- MEDLOADER_EXPORT void killEquivalenceAt(int i);
- MEDLOADER_EXPORT void clear();
+ std::string getClassName() const override { return std::string("MEDFileEquivalences"); }
+ MEDFileEquivalencePair *getEquivalence(int i);
+ MEDFileEquivalencePair *getEquivalenceWithName(const std::string& name);
+ int size() const;
+ std::vector<std::string> getEquivalenceNames() const;
+ MEDFileEquivalencePair *appendEmptyEquivalenceWithName(const std::string& name);
+ void killEquivalenceWithName(const std::string& name);
+ void killEquivalenceAt(int i);
+ void clear();
public:
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
+ void writeLL(med_idt fid) const;
static int PresenceOfEquivalences(med_idt fid, const std::string& meshName);
static MEDFileEquivalences *Load(med_idt fid, int nbOfEq, MEDFileMesh *owner);
static void CheckDataArray(const DataArrayInt *data);
std::vector< MCAuto<MEDFileEquivalencePair> > _equ;
};
- class MEDFileEquivalenceBase : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileEquivalenceBase : public RefCountObject, public MEDFileWritableStandAlone
{
protected:
MEDFileEquivalenceBase(MEDFileEquivalencePair *father);
MEDFileEquivalencePair *_father;
};
- class MEDFileEquivalenceData : public MEDFileEquivalenceBase
+ class MEDLOADER_EXPORT MEDFileEquivalenceData : public MEDFileEquivalenceBase
{
public:
MEDFileEquivalenceData(MEDFileEquivalencePair *owner, DataArrayInt *data);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileEquivalenceData"); }
- MEDLOADER_EXPORT void setArray(DataArrayInt *data);
- MEDLOADER_EXPORT const DataArrayInt *getArray() const { return _data; }
- MEDLOADER_EXPORT DataArrayInt *getArray() { return _data; }
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::string getClassName() const override { return std::string("MEDFileEquivalenceData"); }
+ void setArray(DataArrayInt *data);
+ const DataArrayInt *getArray() const { return _data; }
+ DataArrayInt *getArray() { return _data; }
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
bool isEqual(const MEDFileEquivalenceData *other, std::string& what) const;
protected:
void writeAdvanced(med_idt fid, med_entity_type medtype, med_geometry_type medgt) const;
MCAuto<DataArrayInt> _data;
};
- class MEDFileEquivalenceCellType : public MEDFileEquivalenceData
+ class MEDLOADER_EXPORT MEDFileEquivalenceCellType : public MEDFileEquivalenceData
{
public:
MEDFileEquivalenceCellType(MEDFileEquivalencePair *owner, INTERP_KERNEL::NormalizedCellType type, DataArrayInt *data):MEDFileEquivalenceData(owner,data),_type(type) { }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileEquivalenceCellType"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::string getClassName() const override { return std::string("MEDFileEquivalenceCellType"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
INTERP_KERNEL::NormalizedCellType getType() const { return _type; }
MEDFileEquivalenceCellType *deepCopy(MEDFileEquivalencePair *owner) const;
bool isEqual(const MEDFileEquivalenceCellType *other, std::string& what) const;
INTERP_KERNEL::NormalizedCellType _type;
};
- class MEDFileEquivalenceCell : public MEDFileEquivalenceBase
+ class MEDLOADER_EXPORT MEDFileEquivalenceCell : public MEDFileEquivalenceBase
{
public:
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileEquivalenceCell"); }
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::string getClassName() const override { return std::string("MEDFileEquivalenceCell"); }
static MEDFileEquivalenceCell *Load(med_idt fid, MEDFileEquivalencePair *owner);
void writeLL(med_idt fid) const;
MEDFileEquivalenceCell *deepCopy(MEDFileEquivalencePair *owner) const;
bool isEqual(const MEDFileEquivalenceCell *other, std::string& what) const;
void getRepr(std::ostream& oss) const;
public:
- MEDLOADER_EXPORT void clear() { _types.clear(); }
- MEDLOADER_EXPORT std::size_t size() const { return _types.size(); }
- MEDLOADER_EXPORT DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type);
- MEDLOADER_EXPORT void setArray(int meshDimRelToMax, DataArrayInt *da);
- MEDLOADER_EXPORT void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da);
- MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getTypes() const;
+ void clear() { _types.clear(); }
+ std::size_t size() const { return _types.size(); }
+ DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type);
+ void setArray(int meshDimRelToMax, DataArrayInt *da);
+ void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da);
+ std::vector<INTERP_KERNEL::NormalizedCellType> getTypes() const;
public:
MEDFileEquivalenceCell(MEDFileEquivalencePair *owner):MEDFileEquivalenceBase(owner) { }
private:
std::vector< MCAuto<MEDFileEquivalenceCellType> > _types;
};
- class MEDFileEquivalenceNode : public MEDFileEquivalenceData
+ class MEDLOADER_EXPORT MEDFileEquivalenceNode : public MEDFileEquivalenceData
{
public:
MEDFileEquivalenceNode(MEDFileEquivalencePair *owner, DataArrayInt *data):MEDFileEquivalenceData(owner,data) { }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileEquivalenceNode"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::string getClassName() const override { return std::string("MEDFileEquivalenceNode"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
void writeLL(med_idt fid) const;
MEDFileEquivalenceNode *deepCopy(MEDFileEquivalencePair *owner) const;
bool isEqual(const MEDFileEquivalenceNode *other, std::string& what) const;
/*!
* Use class.
*/
- class MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileFields : public RefCountObject, public MEDFileFieldGlobsReal, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileFields *New();
- MEDLOADER_EXPORT static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFields *New(med_idt fid, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFields *NewAdv(const std::string& fileName, bool loadAll, const MEDFileEntities *entities);
- MEDLOADER_EXPORT static MEDFileFields *NewAdv(med_idt fid, bool loadAll, const MEDFileEntities *entities);
- MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFields *NewWithDynGT(med_idt fid, const MEDFileStructureElements *se, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileFields *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFields>(db); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFields"); }
- MEDLOADER_EXPORT static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
- MEDLOADER_EXPORT static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileFields *deepCopy() const;
- MEDLOADER_EXPORT MEDFileFields *shallowCpy() const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT void loadArrays();
- MEDLOADER_EXPORT void loadArraysIfNecessary();
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
- MEDLOADER_EXPORT int getNumberOfFields() const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getCommonIterations(bool& areThereSomeForgottenTS) const;
- MEDLOADER_EXPORT std::vector<std::string> getFieldsNames() const;
- MEDLOADER_EXPORT std::vector<std::string> getMeshesNames() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss) const;
+ static MEDFileFields *New();
+ static MEDFileFields *New(const std::string& fileName, bool loadAll=true);
+ static MEDFileFields *New(med_idt fid, bool loadAll=true);
+ static MEDFileFields *NewAdv(const std::string& fileName, bool loadAll, const MEDFileEntities *entities);
+ static MEDFileFields *NewAdv(med_idt fid, bool loadAll, const MEDFileEntities *entities);
+ static MEDFileFields *NewWithDynGT(const std::string& fileName, const MEDFileStructureElements *se, bool loadAll=true);
+ static MEDFileFields *NewWithDynGT(med_idt fid, const MEDFileStructureElements *se, bool loadAll=true);
+ static MEDFileFields *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileFields>(db); }
+ std::string getClassName() const override { return std::string("MEDFileFields"); }
+ static MEDFileFields *LoadPartOf(const std::string& fileName, bool loadAll=true, const MEDFileMeshes *ms=0);
+ static MEDFileFields *LoadSpecificEntities(const std::string& fileName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileFields *deepCopy() const;
+ MEDFileFields *shallowCpy() const;
+ void writeLL(med_idt fid) const;
+ void loadArrays();
+ void loadArraysIfNecessary();
+ void unloadArrays();
+ void unloadArraysWithoutDataLoss();
+ int getNumberOfFields() const;
+ std::vector< std::pair<int,int> > getCommonIterations(bool& areThereSomeForgottenTS) const;
+ std::vector<std::string> getFieldsNames() const;
+ std::vector<std::string> getMeshesNames() const;
+ std::string simpleRepr() const;
+ void simpleRepr(int bkOffset, std::ostream& oss) const;
//
- MEDLOADER_EXPORT void resize(int newSize);
- MEDLOADER_EXPORT void pushField(MEDFileAnyTypeFieldMultiTS *field);
- MEDLOADER_EXPORT void pushFields(const std::vector<MEDFileAnyTypeFieldMultiTS *>& fields);
- MEDLOADER_EXPORT void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field);
- MEDLOADER_EXPORT int getPosFromFieldName(const std::string& fieldName) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const;
- MEDLOADER_EXPORT MEDFileFields *buildSubPart(const int *startIds, const int *endIds) const;
- MEDLOADER_EXPORT bool removeFieldsWithoutAnyTimeStep();
- MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const;
- MEDLOADER_EXPORT MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
- MEDLOADER_EXPORT void keepOnlyStructureElements();
- MEDLOADER_EXPORT void keepOnlyOnMeshSE(const std::string& meshName, const std::string& seName);
- MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
- MEDLOADER_EXPORT void blowUpSE(MEDFileMeshes *ms, const MEDFileStructureElements *ses);
- MEDLOADER_EXPORT MCAuto<MEDFileFields> partOfThisOnStructureElements() const;
- MEDLOADER_EXPORT MCAuto<MEDFileFields> partOfThisLyingOnSpecifiedMeshSEName(const std::string& meshName, const std::string& seName) const;
- MEDLOADER_EXPORT void aggregate(const MEDFileFields& other);
- MEDLOADER_EXPORT MEDFileFieldsIterator *iterator();
- MEDLOADER_EXPORT void destroyFieldAtPos(int i);
- MEDLOADER_EXPORT void destroyFieldsAtPos(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT void destroyFieldsAtPos2(int bg, int end, int step);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N);
- MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
- MEDLOADER_EXPORT MCAuto<MEDFileFields> linearToQuadratic(const MEDFileMeshes *oldLin, const MEDFileMeshes *newQuad) const;
+ void resize(int newSize);
+ void pushField(MEDFileAnyTypeFieldMultiTS *field);
+ void pushFields(const std::vector<MEDFileAnyTypeFieldMultiTS *>& fields);
+ void setFieldAtPos(int i, MEDFileAnyTypeFieldMultiTS *field);
+ int getPosFromFieldName(const std::string& fieldName) const;
+ MEDFileAnyTypeFieldMultiTS *getFieldAtPos(int i) const;
+ MEDFileAnyTypeFieldMultiTS *getFieldWithName(const std::string& fieldName) const;
+ MEDFileFields *buildSubPart(const int *startIds, const int *endIds) const;
+ bool removeFieldsWithoutAnyTimeStep();
+ MEDFileFields *partOfThisLyingOnSpecifiedMeshName(const std::string& meshName) const;
+ MEDFileFields *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
+ MEDFileFields *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
+ bool presenceOfStructureElements() const;
+ void killStructureElements();
+ void keepOnlyStructureElements();
+ void keepOnlyOnMeshSE(const std::string& meshName, const std::string& seName);
+ void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
+ void blowUpSE(MEDFileMeshes *ms, const MEDFileStructureElements *ses);
+ MCAuto<MEDFileFields> partOfThisOnStructureElements() const;
+ MCAuto<MEDFileFields> partOfThisLyingOnSpecifiedMeshSEName(const std::string& meshName, const std::string& seName) const;
+ void aggregate(const MEDFileFields& other);
+ MEDFileFieldsIterator *iterator();
+ void destroyFieldAtPos(int i);
+ void destroyFieldsAtPos(const int *startIds, const int *endIds);
+ void destroyFieldsAtPos2(int bg, int end, int step);
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N);
+ void accept(MEDFileFieldVisitor& visitor) const;
+ MCAuto<MEDFileFields> linearToQuadratic(const MEDFileMeshes *oldLin, const MEDFileMeshes *newQuad) const;
public:
- MEDLOADER_EXPORT MEDFileFields *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
+ MEDFileFields *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
public:
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ std::vector<std::string> getPflsReallyUsed() const;
+ std::vector<std::string> getLocsReallyUsed() const;
+ std::vector<std::string> getPflsReallyUsedMulti() const;
+ std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
private:
~MEDFileFields() { }
MEDFileFields();
std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > _fields;
};
- class MEDFileFieldsIterator
+ class MEDLOADER_EXPORT MEDFileFieldsIterator
{
public:
- MEDLOADER_EXPORT MEDFileFieldsIterator(MEDFileFields *fs);
- MEDLOADER_EXPORT ~MEDFileFieldsIterator();
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *nextt();
+ MEDFileFieldsIterator(MEDFileFields *fs);
+ ~MEDFileFieldsIterator();
+ MEDFileAnyTypeFieldMultiTS *nextt();
private:
MCAuto<MEDFileFields> _fs;
int _iter_id;
/*!
* SDA is for Shared Data Arrays such as profiles.
*/
- class MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
+ class MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
{
public:
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TSWithoutSDA"); }
- MEDLOADER_EXPORT int getIteration() const { return _iteration; }
- MEDLOADER_EXPORT int getOrder() const { return _order; }
- MEDLOADER_EXPORT double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
- MEDLOADER_EXPORT void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
- MEDLOADER_EXPORT int getDimension() const;
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getMeshIteration() const;
- MEDLOADER_EXPORT int getMeshOrder() const;
- MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
- MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
- MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
- MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
- MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
+ MEDFileAnyTypeField1TSWithoutSDA();
+ MEDFileAnyTypeField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order);
+ std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TSWithoutSDA"); }
+ int getIteration() const { return _iteration; }
+ int getOrder() const { return _order; }
+ double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
+ void setTime(int iteration, int order, double val) { _dt=val; _iteration=iteration; _order=order; }
+ int getDimension() const;
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ int getMeshIteration() const;
+ int getMeshOrder() const;
+ bool isDealingTS(int iteration, int order) const;
+ std::pair<int,int> getDtIt() const;
+ void fillIteration(std::pair<int,int>& p) const;
+ void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
+ std::vector<TypeOfField> getTypesOfFieldAvailable() const;
//
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ std::vector<std::string> getPflsReallyUsed2() const;
+ std::vector<std::string> getLocsReallyUsed2() const;
+ std::vector<std::string> getPflsReallyUsedMulti2() const;
+ std::vector<std::string> getLocsReallyUsedMulti2() const;
+ void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
//
- MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT void convertMedBallIntoClassic();
- MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
- MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
+ void convertMedBallIntoClassic();
+ void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
+ std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
//
- MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
- MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
- MEDLOADER_EXPORT void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
- MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
- public:
- MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT std::vector<std::string>& getInfo();
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT bool onlyStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
- MEDLOADER_EXPORT void keepOnlyStructureElements();
- MEDLOADER_EXPORT void keepOnlyOnSE(const std::string& seName);
- MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
- MEDLOADER_EXPORT void setFieldNoProfileSBT(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller=true);
- MEDLOADER_EXPORT virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *deepCopy() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
- MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArray() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const = 0;
- MEDLOADER_EXPORT virtual void setArray(DataArray *arr) = 0;
- MEDLOADER_EXPORT virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
- MEDLOADER_EXPORT virtual DataArray *getOrCreateAndGetArray() = 0;
- MEDLOADER_EXPORT virtual const DataArray *getOrCreateAndGetArray() const = 0;
- public:
- MEDLOADER_EXPORT MEDCouplingFieldDouble *fieldOnMesh(const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayIdType *cellRenum, const DataArrayIdType *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+ MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
+ const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
+ void deepCpyLeavesFrom(const MEDFileAnyTypeField1TSWithoutSDA& other);
+ void accept(MEDFileFieldVisitor& visitor) const;
+ public:
+ std::size_t getNumberOfComponents() const;
+ const std::vector<std::string>& getInfo() const;
+ std::vector<std::string>& getInfo();
+ bool presenceOfMultiDiscPerGeoType() const;
+ bool presenceOfStructureElements() const;
+ bool onlyStructureElements() const;
+ void killStructureElements();
+ void keepOnlyStructureElements();
+ void keepOnlyOnSE(const std::string& seName);
+ void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
+ void setInfo(const std::vector<std::string>& infos);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
+ void setFieldNoProfileSBT(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc);
+ void setFieldProfile(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, const MEDFileFieldNameScope& nasc, bool smartPflKiller=true);
+ virtual void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
+ virtual MEDFileAnyTypeField1TSWithoutSDA *deepCopy() const = 0;
+ virtual MEDFileAnyTypeField1TSWithoutSDA *shallowCpy() const = 0;
+ virtual std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitComponents() const;
+ virtual const char *getTypeStr() const = 0;
+ virtual DataArray *getUndergroundDataArray() const = 0;
+ virtual DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const = 0;
+ virtual void setArray(DataArray *arr) = 0;
+ virtual DataArray *createNewEmptyDataArrayInstance() const = 0;
+ virtual DataArray *getOrCreateAndGetArray() = 0;
+ virtual const DataArray *getOrCreateAndGetArray() const = 0;
+ public:
+ MEDCouplingFieldDouble *fieldOnMesh(const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray>& arrOut, const MEDFileFieldNameScope& nasc) const;
+ MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+ MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+ MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const std::string& mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
+ MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayIdType *cellRenum, const DataArrayIdType *nodeRenum, MCAuto<DataArray> &arrOut, const MEDFileFieldNameScope& nasc) const;
DataArray *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope& nasc) const;
public:
- MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT mcIdType keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<mcIdType,mcIdType> >& its);
- MEDLOADER_EXPORT mcIdType keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<mcIdType,mcIdType> >& its);
- public:
- MEDLOADER_EXPORT void allocNotFromFile(mcIdType newNbOfTuples);
- MEDLOADER_EXPORT bool allocIfNecessaryTheArrayToReceiveDataFromFile();
- MEDLOADER_EXPORT void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities, const MEDFileCapability *capability = nullptr);
- MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
- MEDLOADER_EXPORT static std::string FieldNameToMEDFileConvention(const std::string& nonCorrectFieldName);
+ bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
+ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitDiscretizations() const;
+ std::vector< MCAuto<MEDFileAnyTypeField1TSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
+ mcIdType keepOnlySpatialDiscretization(TypeOfField tof, std::vector< std::pair<mcIdType,mcIdType> >& its);
+ mcIdType keepOnlyGaussDiscretization(std::size_t idOfDisc, std::vector< std::pair<mcIdType,mcIdType> >& its);
+ public:
+ void allocNotFromFile(mcIdType newNbOfTuples);
+ bool allocIfNecessaryTheArrayToReceiveDataFromFile();
+ void loadOnlyStructureOfDataRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities, const MEDFileCapability *capability = nullptr);
+ void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
+ void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
+ void loadStructureAndBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ void unloadArrays();
+ void writeLL(med_idt fid, const MEDFileWritable& opts, const MEDFileFieldNameScope& nasc) const;
+ static std::string FieldNameToMEDFileConvention(const std::string& nonCorrectFieldName);
protected:
int getMeshIdFromMeshName(const std::string& mName) const;
int addNewEntryIfNecessary(const MEDCouplingMesh *mesh);
class MEDFileInt32Field1TSWithoutSDA;
template<class T>
- class MEDFileField1TSTemplateWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
+ class MEDLOADER_EXPORT MEDFileField1TSTemplateWithoutSDA : public MEDFileAnyTypeField1TSWithoutSDA
{
protected:
MEDFileField1TSTemplateWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order):MEDFileAnyTypeField1TSWithoutSDA(fieldName,meshName,csit,iteration,order) { }
MEDFileField1TSTemplateWithoutSDA() { }
public:
- MEDLOADER_EXPORT void setArray(DataArray *arr);
- MEDLOADER_EXPORT DataArray *createNewEmptyDataArrayInstance() const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getOrCreateAndGetArrayTemplate();
- MEDLOADER_EXPORT typename Traits<T>::ArrayType const *getOrCreateAndGetArrayTemplate() const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplate() const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray();
- MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const;
- MEDLOADER_EXPORT void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
- MEDLOADER_EXPORT void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
+ void setArray(DataArray *arr);
+ DataArray *createNewEmptyDataArrayInstance() const;
+ typename Traits<T>::ArrayType *getOrCreateAndGetArrayTemplate();
+ typename Traits<T>::ArrayType const *getOrCreateAndGetArrayTemplate() const;
+ typename Traits<T>::ArrayType *getUndergroundDataArrayTemplate() const;
+ typename Traits<T>::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ DataArray *getOrCreateAndGetArray();
+ const DataArray *getOrCreateAndGetArray() const;
+ DataArray *getUndergroundDataArray() const;
+ void aggregate(const typename std::vector< typename MLFieldTraits<T>::F1TSWSDAType const * >& f1tss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
+ void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
protected:
MCAuto< typename Traits<T>::ArrayType > _arr;
};
/*!
* SDA is for Shared Data Arrays such as profiles.
*/
- class MEDFileField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<double>
+ class MEDLOADER_EXPORT MEDFileField1TSWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<double>
{
public:
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileField1TSWithoutSDA"); }
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax);
- MEDLOADER_EXPORT static std::vector<mcIdType> CheckSBTMesh(const MEDCouplingMesh *mesh);
- MEDLOADER_EXPORT static MEDFileField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
+ const char *getTypeStr() const;
+ std::string getClassName() const override { return std::string("MEDFileField1TSWithoutSDA"); }
+ DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ static void CheckMeshDimRel(int meshDimRelToMax);
+ static std::vector<mcIdType> CheckSBTMesh(const MEDCouplingMesh *mesh);
+ static MEDFileField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
public:
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA();
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *deepCopy() const;
- MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *convertToInt() const;
+ MEDFileField1TSWithoutSDA();
+ MEDFileField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
+ MEDFileField1TSWithoutSDA *shallowCpy() const;
+ MEDFileField1TSWithoutSDA *deepCopy() const;
+ MEDFileInt32Field1TSWithoutSDA *convertToInt() const;
public:
static const char TYPE_STR[];
};
template<class T>
- class MEDFileField1TSNDTemplateWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<T>
+ class MEDLOADER_EXPORT MEDFileField1TSNDTemplateWithoutSDA : public MEDFileField1TSTemplateWithoutSDA<T>
{
public:
- MEDLOADER_EXPORT MEDFileField1TSWithoutSDA *convertToDouble() const;
+ MEDFileField1TSWithoutSDA *convertToDouble() const;
protected:
MEDFileField1TSNDTemplateWithoutSDA() { }
MEDFileField1TSNDTemplateWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos):MEDFileField1TSTemplateWithoutSDA<T>(fieldName,meshName,csit,iteration,order) { }
/*!
* SDA is for Shared Data Arrays such as profiles.
*/
- class MEDFileInt32Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int32>
+ class MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int32>
{
public:
- MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32Field1TSWithoutSDA"); }
- MEDLOADER_EXPORT static MEDFileInt32Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *deepCopy() const;
- MEDLOADER_EXPORT MEDFileInt32Field1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT DataArrayInt32 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ MEDFileInt32Field1TSWithoutSDA();
+ std::string getClassName() const override { return std::string("MEDFileInt32Field1TSWithoutSDA"); }
+ static MEDFileInt32Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
+ MEDFileInt32Field1TSWithoutSDA *deepCopy() const;
+ MEDFileInt32Field1TSWithoutSDA *shallowCpy() const;
+ const char *getTypeStr() const;
+ DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ DataArrayInt32 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
protected:
MEDFileInt32Field1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
public:
- MEDLOADER_EXPORT static const char TYPE_STR[];
+ static const char TYPE_STR[];
};
/*!
* SDA is for Shared Data Arrays such as profiles.
*/
- class MEDFileInt64Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int64>
+ class MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<Int64>
{
public:
- MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64Field1TSWithoutSDA"); }
- MEDLOADER_EXPORT static MEDFileInt64Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA *deepCopy() const;
- MEDLOADER_EXPORT MEDFileInt64Field1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT DataArrayInt64 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ MEDFileInt64Field1TSWithoutSDA();
+ std::string getClassName() const override { return std::string("MEDFileInt64Field1TSWithoutSDA"); }
+ static MEDFileInt64Field1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
+ MEDFileInt64Field1TSWithoutSDA *deepCopy() const;
+ MEDFileInt64Field1TSWithoutSDA *shallowCpy() const;
+ const char *getTypeStr() const;
+ DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ DataArrayInt64 *getUndergroundDataArrayIntExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
protected:
MEDFileInt64Field1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
public:
- MEDLOADER_EXPORT static const char TYPE_STR[];
+ static const char TYPE_STR[];
};
/*!
* SDA is for Shared Data Arrays such as profiles.
*/
- class MEDFileFloatField1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<float>
+ class MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA : public MEDFileField1TSNDTemplateWithoutSDA<float>
{
public:
- MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatField1TSWithoutSDA"); }
- MEDLOADER_EXPORT static MEDFileFloatField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
- MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *deepCopy() const;
- MEDLOADER_EXPORT MEDFileFloatField1TSWithoutSDA *shallowCpy() const;
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ MEDFileFloatField1TSWithoutSDA();
+ std::string getClassName() const override { return std::string("MEDFileFloatField1TSWithoutSDA"); }
+ static MEDFileFloatField1TSWithoutSDA *New(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
+ MEDFileFloatField1TSWithoutSDA *deepCopy() const;
+ MEDFileFloatField1TSWithoutSDA *shallowCpy() const;
+ const char *getTypeStr() const;
+ DataArray *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ DataArrayFloat *getUndergroundDataArrayFloatExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
protected:
MEDFileFloatField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector<std::string>& infos);
public:
- MEDLOADER_EXPORT static const char TYPE_STR[];
+ static const char TYPE_STR[];
};
/*!
* User class.
*/
- class MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
+ class MEDLOADER_EXPORT MEDFileAnyTypeField1TS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
{
protected:
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TS"); }
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, med_idt fid);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
+ MEDFileAnyTypeField1TS();
+ MEDFileAnyTypeField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
+ MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
+ MEDFileAnyTypeField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0);
+ MEDFileAnyTypeField1TS(const MEDFileAnyTypeField1TSWithoutSDA& other, bool shallowCopyOfContent);
+ std::string getClassName() const override { return std::string("MEDFileAnyTypeField1TS"); }
+ static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c);
+ static MEDFileAnyTypeField1TS *BuildNewInstanceFromContent(MEDFileAnyTypeField1TSWithoutSDA *c, med_idt fid);
+ static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ static MEDFileAnyTypeField1TSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ void writeLL(med_idt fid) const;
// direct forwarding to MEDFileAnyTypeField1TSWithoutSDA instance _content
public:
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
- MEDLOADER_EXPORT static MEDFileAnyTypeField1TS *NewAdv(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
- MEDLOADER_EXPORT int getDimension() const;
- MEDLOADER_EXPORT int getIteration() const;
- MEDLOADER_EXPORT int getOrder() const;
- MEDLOADER_EXPORT double getTime(int& iteration, int& order) const;
- MEDLOADER_EXPORT void setTime(int iteration, int order, double val);
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT void setName(const std::string& name);
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
- MEDLOADER_EXPORT std::string getDtUnit() const;
- MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getMeshIteration() const;
- MEDLOADER_EXPORT int getMeshOrder() const;
- MEDLOADER_EXPORT std::size_t getNumberOfComponents() const;
- MEDLOADER_EXPORT bool isDealingTS(int iteration, int order) const;
- MEDLOADER_EXPORT std::pair<int,int> getDtIt() const;
- MEDLOADER_EXPORT void fillIteration(std::pair<int,int>& p) const;
- MEDLOADER_EXPORT void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& infos);
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT std::vector<std::string>& getInfo();
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT std::vector<TypeOfField> getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
+ static MEDFileAnyTypeField1TS *New(const std::string& fileName, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *New(med_idt fid, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ static MEDFileAnyTypeField1TS *NewAdv(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
+ static MEDFileAnyTypeField1TS *NewAdv(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileEntities *entities);
+ int getDimension() const;
+ int getIteration() const;
+ int getOrder() const;
+ double getTime(int& iteration, int& order) const;
+ void setTime(int iteration, int order, double val);
+ std::string getName() const;
+ void setName(const std::string& name);
+ std::string simpleRepr() const;
+ void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
+ std::string getDtUnit() const;
+ void setDtUnit(const std::string& dtUnit);
+ std::string getMeshName() const;
+ void setMeshName(const std::string& newMeshName);
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ int getMeshIteration() const;
+ int getMeshOrder() const;
+ std::size_t getNumberOfComponents() const;
+ bool isDealingTS(int iteration, int order) const;
+ std::pair<int,int> getDtIt() const;
+ void fillIteration(std::pair<int,int>& p) const;
+ void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const;
+ void setInfo(const std::vector<std::string>& infos);
+ const std::vector<std::string>& getInfo() const;
+ std::vector<std::string>& getInfo();
+ bool presenceOfMultiDiscPerGeoType() const;
+ std::vector<TypeOfField> getTypesOfFieldAvailable() const;
+ std::vector< std::vector<std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
- MEDLOADER_EXPORT const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
- MEDLOADER_EXPORT int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT void convertMedBallIntoClassic();
- MEDLOADER_EXPORT void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
- public:
- MEDLOADER_EXPORT void loadArrays();
- MEDLOADER_EXPORT void loadArraysIfNecessary();
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitComponents() const;
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *deepCopy() const;
- MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
- MEDLOADER_EXPORT mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
+ MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId);
+ const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const;
+ int getNonEmptyLevels(const std::string& mname, std::vector<int>& levs) const;
+ void convertMedBallIntoClassic();
+ void makeReduction(INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayIdType *pfl);
+ virtual MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
+ virtual MEDFileAnyTypeField1TS *shallowCpy() const = 0;
+ public:
+ void loadArrays();
+ void loadArraysIfNecessary();
+ void unloadArrays();
+ void unloadArraysWithoutDataLoss();
+ std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitComponents() const;
+ std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitDiscretizations() const;
+ std::vector< MCAuto< MEDFileAnyTypeField1TS > > splitMultiDiscrPerGeoTypes() const;
+ MEDFileAnyTypeField1TS *deepCopy() const;
+ mcIdType copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
+ mcIdType copyTinyInfoFrom(const TimeHolder *th, const MEDCouplingFieldTemplate *field, const DataArray *arr);
public:
//! underground method see MEDFileField1TSWithoutSDA::setProfileNameOnLeaf
- MEDLOADER_EXPORT void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
+ void setProfileNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newPflName, bool forceRenameOnGlob=false);
//! underground method see MEDFileField1TSWithoutSDA::setLocNameOnLeaf
- MEDLOADER_EXPORT void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- public:
- MEDLOADER_EXPORT static int LocateField2(med_idt fid, int fieldIdCFormat, bool checkFieldId, std::string& fieldName, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
- MEDLOADER_EXPORT static int LocateField(med_idt fid, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
- public:
- MEDLOADER_EXPORT virtual med_field_type getMEDFileFieldType() const = 0;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
+ void setLocNameOnLeaf(const std::string& mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const std::string& newLocName, bool forceRenameOnGlob=false);
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::vector<std::string> getPflsReallyUsed() const;
+ std::vector<std::string> getLocsReallyUsed() const;
+ std::vector<std::string> getPflsReallyUsedMulti() const;
+ std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ public:
+ static int LocateField2(med_idt fid, int fieldIdCFormat, bool checkFieldId, std::string& fieldName, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
+ static int LocateField(med_idt fid, const std::string& fieldName, int& posCFormat, med_field_type& typcha, std::vector<std::string>& infos, std::string& dtunitOut, std::string& meshName);
+ public:
+ virtual med_field_type getMEDFileFieldType() const = 0;
+ MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase();
+ const MEDFileAnyTypeField1TSWithoutSDA *contentNotNullBase() const;
protected:
MCAuto<MEDFileAnyTypeField1TSWithoutSDA> _content;
};
class MEDFileInt32Field1TS;
template<class T>
- class MEDFileTemplateField1TS : public MEDFileAnyTypeField1TS
+ class MEDLOADER_EXPORT MEDFileTemplateField1TS : public MEDFileAnyTypeField1TS
{
public:
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New();
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::F1TSType>(db); }
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::F1TSType *New(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent);
- public:
- MEDLOADER_EXPORT static typename Traits<T>::ArrayType *ReturnSafelyTypedDataArray(MCAuto<DataArray>& arr);
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
- MEDLOADER_EXPORT void setArray(DataArray *arr);
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArray() const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT static MCAuto<typename Traits<T>::FieldType> SetDataArrayInField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
- MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ToFieldTemplateWithTime(const typename Traits<T>::FieldType *f);
- public:
- MEDLOADER_EXPORT void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
- MEDLOADER_EXPORT typename Traits<T>::FieldType *field(const MEDFileMesh *mesh) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT void setFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
- MEDLOADER_EXPORT void setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
- MEDLOADER_EXPORT void setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
- MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
+ static typename MLFieldTraits<T>::F1TSType *New();
+ static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::F1TSType>(db); }
+ static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true);
+ static typename MLFieldTraits<T>::F1TSType *New(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent);
+ public:
+ static typename Traits<T>::ArrayType *ReturnSafelyTypedDataArray(MCAuto<DataArray>& arr);
+ typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
+ void setArray(DataArray *arr);
+ typename Traits<T>::ArrayType *getUndergroundDataArray() const;
+ typename Traits<T>::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ static MCAuto<typename Traits<T>::FieldType> SetDataArrayInField(MEDCouplingFieldDouble *f, MCAuto<DataArray>& arr);
+ static MCAuto<MEDCouplingFieldDouble> ToFieldTemplateWithTime(const typename Traits<T>::FieldType *f);
+ public:
+ void copyTimeInfoFrom(const typename Traits<T>::FieldType *mcf);
+ typename Traits<T>::FieldType *field(const MEDFileMesh *mesh) const;
+ typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+ void setFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
+ void setFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+ void setFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+ typename MLFieldTraits<T>::F1TSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
+ MEDFileAnyTypeField1TS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
protected:
~MEDFileTemplateField1TS() { }
MEDFileTemplateField1TS();
/*!
* User class.
*/
- class MEDFileField1TS : public MEDFileTemplateField1TS<double>
+ class MEDLOADER_EXPORT MEDFileField1TS : public MEDFileTemplateField1TS<double>
{
friend class MEDFileTemplateField1TS<double>;
public:
- MEDLOADER_EXPORT MEDFileInt32Field1TS *convertToInt(bool isDeepCpyGlobs=true) const;
+ MEDFileInt32Field1TS *convertToInt(bool isDeepCpyGlobs=true) const;
public:
- MEDLOADER_EXPORT MEDFileField1TS *shallowCpy() const;
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
+ MEDFileField1TS *shallowCpy() const;
+ std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF,
std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileField1TS"); }
+ std::string getClassName() const override { return std::string("MEDFileField1TS"); }
public:
private:
med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
};
template<class T>
- class MEDFileNDTemplateField1TS : public MEDFileTemplateField1TS<T>
+ class MEDLOADER_EXPORT MEDFileNDTemplateField1TS : public MEDFileTemplateField1TS<T>
{
public:
- MEDLOADER_EXPORT MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
+ MEDFileField1TS *convertToDouble(bool isDeepCpyGlobs=true) const;
protected:
~MEDFileNDTemplateField1TS() { }
MEDFileNDTemplateField1TS() { }
MEDFileNDTemplateField1TS(const typename MLFieldTraits<T>::F1TSWSDAType& other, bool shallowCopyOfContent):MEDFileTemplateField1TS<T>(other,shallowCopyOfContent) { }
};
- class MEDFileInt32Field1TS : public MEDFileNDTemplateField1TS<Int32>
+ class MEDLOADER_EXPORT MEDFileInt32Field1TS : public MEDFileNDTemplateField1TS<Int32>
{
friend class MEDFileTemplateField1TS<Int32>;
public:
- MEDLOADER_EXPORT MEDFileInt32Field1TS *shallowCpy() const { return new MEDFileInt32Field1TS(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32Field1TS"); }
+ MEDFileInt32Field1TS *shallowCpy() const { return new MEDFileInt32Field1TS(*this); }
+ std::string getClassName() const override { return std::string("MEDFileInt32Field1TS"); }
public:
- MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt32 *f);
+ static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt32 *f);
private:
med_field_type getMEDFileFieldType() const { return MED_INT32; }
private:
MEDFileInt32Field1TS(const MEDFileInt32Field1TSWithoutSDA& other, bool shallowCopyOfContent):MEDFileNDTemplateField1TS<Int32>(other,shallowCopyOfContent) { }
};
- class MEDFileInt64Field1TS : public MEDFileNDTemplateField1TS<Int64>
+ class MEDLOADER_EXPORT MEDFileInt64Field1TS : public MEDFileNDTemplateField1TS<Int64>
{
friend class MEDFileTemplateField1TS<Int64>;
public:
- MEDLOADER_EXPORT MEDFileInt64Field1TS *shallowCpy() const { return new MEDFileInt64Field1TS(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64Field1TS"); }
+ MEDFileInt64Field1TS *shallowCpy() const { return new MEDFileInt64Field1TS(*this); }
+ std::string getClassName() const override { return std::string("MEDFileInt64Field1TS"); }
public:
- MEDLOADER_EXPORT static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt64 *f);
+ static MCAuto<MEDCouplingFieldDouble> ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt64 *f);
private:
med_field_type getMEDFileFieldType() const { return MED_INT64; }
private:
MEDFileInt64Field1TS(const MEDFileInt64Field1TSWithoutSDA& other, bool shallowCopyOfContent):MEDFileNDTemplateField1TS<Int64>(other,shallowCopyOfContent) { }
};
- class MEDFileFloatField1TS : public MEDFileNDTemplateField1TS<float>
+ class MEDLOADER_EXPORT MEDFileFloatField1TS : public MEDFileNDTemplateField1TS<float>
{
friend class MEDFileTemplateField1TS<float>;
private:
med_field_type getMEDFileFieldType() const { return MED_FLOAT32; }
- MEDLOADER_EXPORT MEDFileFloatField1TS *shallowCpy() const { return new MEDFileFloatField1TS(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatField1TS"); }
+ MEDFileFloatField1TS *shallowCpy() const { return new MEDFileFloatField1TS(*this); }
+ std::string getClassName() const override { return std::string("MEDFileFloatField1TS"); }
private:
~MEDFileFloatField1TS() { }
MEDFileFloatField1TS() { }
class MEDFileEntities;
- class MEDFileFieldLoc : public RefCountObject
+ class MEDLOADER_EXPORT MEDFileFieldLoc : public RefCountObject
{
public:
- MEDLOADER_EXPORT void simpleRepr(std::ostream& oss) const;
- MEDLOADER_EXPORT std::string getName() const { return _name; }
- MEDLOADER_EXPORT void setName(const std::string& name);
+ void simpleRepr(std::ostream& oss) const;
+ std::string getName() const { return _name; }
+ void setName(const std::string& name);
std::string getClassName() const override { return std::string("MEDFileFieldLoc"); }
static MEDFileFieldLoc *New(med_idt fid, const std::string& locName);
static MEDFileFieldLoc *New(med_idt fid, int i, const MEDFileEntities *entities);
MEDFileFieldLoc *deepCopy() const;
bool isOnStructureElement() const;
const MEDFileGTKeeper *getUndergroundGTKeeper() const { return _gt; }
- MEDLOADER_EXPORT int getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::string repr() const;
- MEDLOADER_EXPORT bool isName(const std::string& name) const { return _name==name; }
- MEDLOADER_EXPORT int getDimension() const { return _dim; }
- MEDLOADER_EXPORT int getNumberOfGaussPoints() const { return _nb_gauss_pt; }
- MEDLOADER_EXPORT int getNumberOfPointsInCells() const { return _nb_node_per_cell; }
- MEDLOADER_EXPORT const std::vector<double>& getRefCoords() const { return _ref_coo; }
- MEDLOADER_EXPORT const std::vector<double>& getGaussCoords() const { return _gs_coo; }
- MEDLOADER_EXPORT const std::vector<double>& getGaussWeights() const { return _w; }
- MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getGeoType() const { return _gt->getGeoType(); }
- MEDLOADER_EXPORT bool isEqual(const MEDFileFieldLoc& other, double eps) const;
+ int getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
+ void writeLL(med_idt fid) const;
+ std::string repr() const;
+ bool isName(const std::string& name) const { return _name==name; }
+ int getDimension() const { return _dim; }
+ int getNumberOfGaussPoints() const { return _nb_gauss_pt; }
+ int getNumberOfPointsInCells() const { return _nb_node_per_cell; }
+ const std::vector<double>& getRefCoords() const { return _ref_coo; }
+ const std::vector<double>& getGaussCoords() const { return _gs_coo; }
+ const std::vector<double>& getGaussWeights() const { return _w; }
+ INTERP_KERNEL::NormalizedCellType getGeoType() const { return _gt->getGeoType(); }
+ bool isEqual(const MEDFileFieldLoc& other, double eps) const;
private:
MEDFileFieldLoc(const MEDFileFieldLoc& other);
MEDFileFieldLoc(med_idt fid, const std::string& locName);
class MEDFileAnyTypeField1TS;
class MEDFileAnyTypeField1TSWithoutSDA;
- class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
+ class MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope
{
protected:
MEDFileAnyTypeFieldMultiTSWithoutSDA();
MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
MEDFileAnyTypeFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
public:
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeFieldMultiTSWithoutSDA"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCopy() const;
- MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const;
- MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const;
- MEDLOADER_EXPORT virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT virtual const char *getTypeStr() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0;
- MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0;
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
- MEDLOADER_EXPORT int getTimeStepPos(int iteration, int order) const;
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order);
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT void eraseEmptyTS();
- MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT bool onlyStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
- MEDLOADER_EXPORT void keepOnlyStructureElements();
- MEDLOADER_EXPORT void keepOnlyOnSE(const std::string& seName);
- MEDLOADER_EXPORT void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
- MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
- MEDLOADER_EXPORT void pushBackTimeStep(MCAuto<MEDFileAnyTypeField1TSWithoutSDA>& tse);
- MEDLOADER_EXPORT void synchronizeNameScope();
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
- MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller);
- MEDLOADER_EXPORT std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArray(int iteration, int order) const;
- MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
- MEDLOADER_EXPORT void accept(MEDFileFieldVisitor& visitor) const;
- MEDLOADER_EXPORT void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT void writeLL(med_idt fid, const MEDFileWritable& opts) const;
- MEDLOADER_EXPORT void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
- MEDLOADER_EXPORT void unloadArrays();
+ std::string getClassName() const override { return std::string("MEDFileAnyTypeFieldMultiTSWithoutSDA"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *deepCopy() const;
+ virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitComponents() const;
+ virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitDiscretizations() const;
+ virtual std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > splitMultiDiscrPerGeoTypes() const;
+ virtual const char *getTypeStr() const = 0;
+ virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const = 0;
+ virtual MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const = 0;
+ virtual MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const = 0;
+ virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const = 0;
+ const std::vector<std::string>& getInfo() const;
+ bool presenceOfMultiDiscPerGeoType() const;
+ void setInfo(const std::vector<std::string>& info);
+ int getTimeStepPos(int iteration, int order) const;
+ const MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order) const;
+ MEDFileAnyTypeField1TSWithoutSDA& getTimeStepEntry(int iteration, int order);
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ int getNumberOfTS() const;
+ void eraseEmptyTS();
+ void eraseTimeStepIds(const int *startIds, const int *endIds);
+ void eraseTimeStepIds2(int bg, int end, int step);
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds(const int *startIds, const int *endIds) const;
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *buildFromTimeStepIds2(int bg, int end, int step) const;
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *partOfThisNotLyingOnSpecifiedTimeSteps(const std::vector< std::pair<int,int> >& timeSteps) const;
+ bool presenceOfStructureElements() const;
+ bool onlyStructureElements() const;
+ void killStructureElements();
+ void keepOnlyStructureElements();
+ void keepOnlyOnSE(const std::string& seName);
+ void getMeshSENames(std::vector< std::pair<std::string,std::string> >& ps) const;
+ int getPosOfTimeStep(int iteration, int order) const;
+ int getPosGivenTime(double time, double eps=1e-8) const;
+ std::vector< std::pair<int,int> > getIterations() const;
+ std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
+ void pushBackTimeStep(MCAuto<MEDFileAnyTypeField1TSWithoutSDA>& tse);
+ void synchronizeNameScope();
+ void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
+ int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
+ void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal& glob);
+ void appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller);
+ std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
+ DataArray *getUndergroundDataArray(int iteration, int order) const;
+ DataArray *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ bool renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<mcIdType>& oldCode, const std::vector<mcIdType>& newCode, const DataArrayIdType *renumO2N, MEDFileFieldGlobsReal& glob);
+ void accept(MEDFileFieldVisitor& visitor) const;
+ void loadStructureOrStructureAndBigArraysRecursively(med_idt fid, int nbPdt, med_field_type fieldTyp, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ void writeLL(med_idt fid, const MEDFileWritable& opts) const;
+ void loadBigArraysRecursively(med_idt fid, const MEDFileFieldNameScope& nasc);
+ void loadBigArraysRecursivelyIfNecessary(med_idt fid, const MEDFileFieldNameScope& nasc);
+ void unloadArrays();
public:
- MEDLOADER_EXPORT const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos);
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed2() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti2() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti2() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void setIteration(int i, MCAuto<MEDFileAnyTypeField1TSWithoutSDA> ts);
+ const MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos) const;
+ MEDFileAnyTypeField1TSWithoutSDA *getTimeStepAtPos2(int pos);
+ std::vector<std::string> getPflsReallyUsed2() const;
+ std::vector<std::string> getLocsReallyUsed2() const;
+ std::vector<std::string> getPflsReallyUsedMulti2() const;
+ std::vector<std::string> getLocsReallyUsedMulti2() const;
+ void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void setIteration(int i, MCAuto<MEDFileAnyTypeField1TSWithoutSDA> ts);
protected:
virtual med_field_type getMEDFileFieldType() const = 0;
void copyTinyInfoFrom(const MEDCouplingFieldDouble *field, const DataArray *arr);
class MEDFileInt32FieldMultiTSWithoutSDA;
template<class T>
- class MEDFileTemplateFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
+ class MEDLOADER_EXPORT MEDFileTemplateFieldMultiTSWithoutSDA : public MEDFileAnyTypeFieldMultiTSWithoutSDA
{
public:
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSWSDAType *New(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT const char *getTypeStr() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileTemplateFieldMultiTSWithoutSDA"); }
+ static typename MLFieldTraits<T>::FMTSWSDAType *New(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
+ const char *getTypeStr() const;
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *createNew() const;
+ MEDFileAnyTypeField1TSWithoutSDA *createNew1TSWithoutSDAEmptyInstance() const;
+ std::string getClassName() const override { return std::string("MEDFileTemplateFieldMultiTSWithoutSDA"); }
protected:
MEDFileTemplateFieldMultiTSWithoutSDA() { }
MEDFileTemplateFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName):MEDFileAnyTypeFieldMultiTSWithoutSDA(fieldName,meshName) { }
void checkCoherencyOfType(const MEDFileAnyTypeField1TSWithoutSDA *f1ts) const;
};
- class MEDFileFieldMultiTSWithoutSDA : public MEDFileTemplateFieldMultiTSWithoutSDA<double>
+ class MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA : public MEDFileTemplateFieldMultiTSWithoutSDA<double>
{
friend class MEDFileTemplateFieldMultiTSWithoutSDA<double>;
public:
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileTemplateFieldMultiTSWithoutSDA<double>(fid,fieldId,loadAll,ms,entities) { }
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDFileInt32FieldMultiTSWithoutSDA *convertToInt() const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileFieldMultiTSWithoutSDA(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFieldMultiTSWithoutSDA"); }
+ MEDFileFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileTemplateFieldMultiTSWithoutSDA<double>(fid,fieldId,loadAll,ms,entities) { }
+ std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ MEDFileInt32FieldMultiTSWithoutSDA *convertToInt() const;
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileFieldMultiTSWithoutSDA(*this); }
+ std::string getClassName() const override { return std::string("MEDFileFieldMultiTSWithoutSDA"); }
protected:
MEDFileFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName):MEDFileTemplateFieldMultiTSWithoutSDA<double>(fieldName,meshName) { }
MEDFileFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileTemplateFieldMultiTSWithoutSDA<double>(fid,fieldName,meshName,fieldTyp,infos,nbOfStep,dtunit,loadAll,ms,entities) { }
med_field_type getMEDFileFieldType() const { return MED_FLOAT64; }
public:
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA() { }
+ MEDFileFieldMultiTSWithoutSDA() { }
};
template<class T>
- class MEDFileNDTemplateFieldMultiTSWithoutSDA : public MEDFileTemplateFieldMultiTSWithoutSDA<T>
+ class MEDLOADER_EXPORT MEDFileNDTemplateFieldMultiTSWithoutSDA : public MEDFileTemplateFieldMultiTSWithoutSDA<T>
{
public:
- MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutSDA *convertToDouble() const;
+ MEDFileFieldMultiTSWithoutSDA *convertToDouble() const;
protected:
MEDFileNDTemplateFieldMultiTSWithoutSDA() { }
MEDFileNDTemplateFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileTemplateFieldMultiTSWithoutSDA<T>(fid,fieldId,loadAll,ms,entities) { }
MEDFileNDTemplateFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileTemplateFieldMultiTSWithoutSDA<T>(fid,fieldName,meshName,fieldTyp,infos,nbOfStep,dtunit,loadAll,ms,entities) { }
};
- class MEDFileInt32FieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>
+ class MEDLOADER_EXPORT MEDFileInt32FieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>
{
friend class MEDFileTemplateFieldMultiTSWithoutSDA<Int32>;
public:
- MEDLOADER_EXPORT MEDFileInt32FieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>(fid,fieldId,loadAll,ms,entities) { }
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileInt32FieldMultiTSWithoutSDA(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32FieldMultiTSWithoutSDA"); }
+ MEDFileInt32FieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>(fid,fieldId,loadAll,ms,entities) { }
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileInt32FieldMultiTSWithoutSDA(*this); }
+ std::string getClassName() const override { return std::string("MEDFileInt32FieldMultiTSWithoutSDA"); }
protected:
MEDFileInt32FieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>(fieldName,meshName) { }
MEDFileInt32FieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int32>(fid,fieldName,meshName,fieldTyp,infos,nbOfStep,dtunit,loadAll,ms,entities) { }
med_field_type getMEDFileFieldType() const { return MED_INT32; }
public:
- MEDLOADER_EXPORT MEDFileInt32FieldMultiTSWithoutSDA() { }
+ MEDFileInt32FieldMultiTSWithoutSDA() { }
};
- class MEDFileInt64FieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>
+ class MEDLOADER_EXPORT MEDFileInt64FieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>
{
friend class MEDFileTemplateFieldMultiTSWithoutSDA<Int64>;
public:
- MEDLOADER_EXPORT MEDFileInt64FieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>(fid,fieldId,loadAll,ms,entities) { }
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileInt64FieldMultiTSWithoutSDA(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64FieldMultiTSWithoutSDA"); }
+ MEDFileInt64FieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>(fid,fieldId,loadAll,ms,entities) { }
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileInt64FieldMultiTSWithoutSDA(*this); }
+ std::string getClassName() const override { return std::string("MEDFileInt64FieldMultiTSWithoutSDA"); }
protected:
MEDFileInt64FieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>(fieldName,meshName) { }
MEDFileInt64FieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<Int64>(fid,fieldName,meshName,fieldTyp,infos,nbOfStep,dtunit,loadAll,ms,entities) { }
med_field_type getMEDFileFieldType() const { return MED_INT64; }
public:
- MEDLOADER_EXPORT MEDFileInt64FieldMultiTSWithoutSDA() { }
+ MEDFileInt64FieldMultiTSWithoutSDA() { }
};
- class MEDFileFloatFieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<float>
+ class MEDLOADER_EXPORT MEDFileFloatFieldMultiTSWithoutSDA : public MEDFileNDTemplateFieldMultiTSWithoutSDA<float>
{
friend class MEDFileTemplateFieldMultiTSWithoutSDA<float>;
public:
- MEDLOADER_EXPORT MEDFileFloatFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<float>(fid,fieldId,loadAll,ms,entities) { }
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileFloatFieldMultiTSWithoutSDA(*this); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatFieldMultiTSWithoutSDA"); }
+ MEDFileFloatFieldMultiTSWithoutSDA(med_idt fid, int fieldId, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<float>(fid,fieldId,loadAll,ms,entities) { }
+ MEDFileAnyTypeFieldMultiTSWithoutSDA *shallowCpy() const { return new MEDFileFloatFieldMultiTSWithoutSDA(*this); }
+ std::string getClassName() const override { return std::string("MEDFileFloatFieldMultiTSWithoutSDA"); }
protected:
MEDFileFloatFieldMultiTSWithoutSDA(const std::string& fieldName, const std::string& meshName):MEDFileNDTemplateFieldMultiTSWithoutSDA<float>(fieldName,meshName) { }
MEDFileFloatFieldMultiTSWithoutSDA(med_idt fid, const std::string& fieldName, const std::string& meshName, med_field_type fieldTyp, const std::vector<std::string>& infos, int nbOfStep, const std::string& dtunit, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities):MEDFileNDTemplateFieldMultiTSWithoutSDA<float>(fid,fieldName,meshName,fieldTyp,infos,nbOfStep,dtunit,loadAll,ms,entities) { }
med_field_type getMEDFileFieldType() const { return MED_FLOAT32; }
public:
- MEDLOADER_EXPORT MEDFileFloatFieldMultiTSWithoutSDA() { }
+ MEDFileFloatFieldMultiTSWithoutSDA() { }
};
class MEDFileAnyTypeFieldMultiTSIterator;
/*!
* User class.
*/
- class MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
+ class MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileFieldGlobsReal
{
protected:
MEDFileAnyTypeFieldMultiTS();
static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c, med_idt fid);
static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, bool loadAll, const MEDFileMeshes *ms);
static MEDFileAnyTypeFieldMultiTSWithoutSDA *BuildContentFrom(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileAnyTypeFieldMultiTS"); }
+ std::string getClassName() const override { return std::string("MEDFileAnyTypeFieldMultiTS"); }
public:
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c);
- MEDLOADER_EXPORT void loadArrays();
- MEDLOADER_EXPORT void loadArraysIfNecessary();
- MEDLOADER_EXPORT void unloadArrays();
- MEDLOADER_EXPORT void unloadArraysWithoutDataLoss();
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *deepCopy() const;
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitComponents() const;
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const;
- MEDLOADER_EXPORT std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitMultiDiscrPerGeoTypes() const;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const = 0;
+ static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, bool loadAll=true);
+ static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, bool loadAll=true);
+ static MEDFileAnyTypeFieldMultiTS *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ static MEDFileAnyTypeFieldMultiTS *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
+ static MEDFileAnyTypeFieldMultiTS *BuildNewInstanceFromContent(MEDFileAnyTypeFieldMultiTSWithoutSDA *c);
+ void loadArrays();
+ void loadArraysIfNecessary();
+ void unloadArrays();
+ void unloadArraysWithoutDataLoss();
+ void writeLL(med_idt fid) const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ virtual MEDFileAnyTypeFieldMultiTS *deepCopy() const;
+ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitComponents() const;
+ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitDiscretizations() const;
+ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > splitMultiDiscrPerGeoTypes() const;
+ virtual MEDFileAnyTypeFieldMultiTS *shallowCpy() const = 0;
+ virtual void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const = 0;
//
- MEDLOADER_EXPORT virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const = 0;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS);
- MEDLOADER_EXPORT static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupport(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MCAuto<MEDFileFastCellSupportComparator> >& fsc);
- MEDLOADER_EXPORT static int CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiTS *f0, MEDFileAnyTypeFieldMultiTS *f1, const MEDFileMesh *mesh, TypeOfField& tof0, TypeOfField& tof1);
+ virtual MEDFileAnyTypeField1TS *getTimeStepAtPos(int pos) const = 0;
+ MEDFileAnyTypeField1TS *getTimeStep(int iteration, int order) const;
+ MEDFileAnyTypeField1TS *getTimeStepGivenTime(double time, double eps=1e-8) const;
+ static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitIntoCommonTimeSeries(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS);
+ static std::vector< std::vector<MEDFileAnyTypeFieldMultiTS *> > SplitPerCommonSupport(const std::vector<MEDFileAnyTypeFieldMultiTS *>& vectFMTS, const MEDFileMesh *mesh, std::vector< MCAuto<MEDFileFastCellSupportComparator> >& fsc);
+ static int CheckSupportAcrossTime(MEDFileAnyTypeFieldMultiTS *f0, MEDFileAnyTypeFieldMultiTS *f1, const MEDFileMesh *mesh, TypeOfField& tof0, TypeOfField& tof1);
public:// direct forwarding to MEDFileField1TSWithoutSDA instance _content
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT void setName(const std::string& name);
- MEDLOADER_EXPORT std::string getDtUnit() const;
- MEDLOADER_EXPORT void setDtUnit(const std::string& dtUnit);
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT void setMeshName(const std::string& newMeshName);
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT void eraseEmptyTS();
- MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT void eraseTimeStepIds2(int bg, int end, int step);
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
- MEDLOADER_EXPORT void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts);
- MEDLOADER_EXPORT void pushBackTimeSteps(MEDFileAnyTypeFieldMultiTS *fmts);
- MEDLOADER_EXPORT void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts);
- MEDLOADER_EXPORT void synchronizeNameScope();
- MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator *iterator();
- MEDLOADER_EXPORT bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT const std::vector<std::string>& getInfo() const;
- MEDLOADER_EXPORT bool presenceOfMultiDiscPerGeoType() const;
- MEDLOADER_EXPORT void setInfo(const std::vector<std::string>& info);
- MEDLOADER_EXPORT int getNumberOfComponents() const;
- MEDLOADER_EXPORT int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
- MEDLOADER_EXPORT std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
- MEDLOADER_EXPORT std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
+ std::string getName() const;
+ void setName(const std::string& name);
+ std::string getDtUnit() const;
+ void setDtUnit(const std::string& dtUnit);
+ std::string getMeshName() const;
+ void setMeshName(const std::string& newMeshName);
+ std::string simpleRepr() const;
+ void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
+ int getNumberOfTS() const;
+ void eraseEmptyTS();
+ void eraseTimeStepIds(const int *startIds, const int *endIds);
+ void eraseTimeStepIds2(int bg, int end, int step);
+ MEDFileAnyTypeFieldMultiTS *buildSubPart(const int *startIds, const int *endIds) const;
+ MEDFileAnyTypeFieldMultiTS *buildSubPartSlice(int bg, int end, int step) const;
+ std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
+ std::vector< std::pair<int,int> > getIterations() const;
+ void pushBackTimeSteps(const std::vector<MEDFileAnyTypeField1TS *>& f1ts);
+ void pushBackTimeSteps(MEDFileAnyTypeFieldMultiTS *fmts);
+ void pushBackTimeStep(MEDFileAnyTypeField1TS *f1ts);
+ void synchronizeNameScope();
+ int getPosOfTimeStep(int iteration, int order) const;
+ int getPosGivenTime(double time, double eps=1e-8) const;
+ MEDFileAnyTypeFieldMultiTSIterator *iterator();
+ bool changeMeshNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ const std::vector<std::string>& getInfo() const;
+ bool presenceOfMultiDiscPerGeoType() const;
+ void setInfo(const std::vector<std::string>& info);
+ int getNumberOfComponents() const;
+ int getNonEmptyLevels(int iteration, int order, const std::string& mname, std::vector<int>& levs) const;
+ std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const;
+ std::vector< std::vector< std::pair<mcIdType,mcIdType> > > getFieldSplitedByType(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> getContent();
public:
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const = 0;
- MEDLOADER_EXPORT virtual MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
- MEDLOADER_EXPORT static MCAuto<MEDFileAnyTypeFieldMultiTS> Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
+ virtual MEDFileAnyTypeFieldMultiTS *buildNewEmpty() const = 0;
+ virtual MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const = 0;
+ static MCAuto<MEDFileAnyTypeFieldMultiTS> Aggregate(const std::vector<const MEDFileAnyTypeFieldMultiTS *>& fmtss, const std::vector< std::vector< std::pair<int,mcIdType> > >& dts);
public:
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsed() const;
- MEDLOADER_EXPORT std::vector<std::string> getPflsReallyUsedMulti() const;
- MEDLOADER_EXPORT std::vector<std::string> getLocsReallyUsedMulti() const;
- MEDLOADER_EXPORT void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
- MEDLOADER_EXPORT void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ std::vector<std::string> getPflsReallyUsed() const;
+ std::vector<std::string> getLocsReallyUsed() const;
+ std::vector<std::string> getPflsReallyUsedMulti() const;
+ std::vector<std::string> getLocsReallyUsedMulti() const;
+ void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
+ void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif);
protected:
MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase();
const MEDFileAnyTypeFieldMultiTSWithoutSDA *contentNotNullBase() const;
};
template<class T>
- class MEDFileTemplateFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
+ class MEDLOADER_EXPORT MEDFileTemplateFieldMultiTS : public MEDFileAnyTypeFieldMultiTS
{
public:
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New();
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(const std::string& fileName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(med_idt fid, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::FMTSType>(db); }
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *New(const typename MLFieldTraits<T>::FMTSWSDAType& other, bool shallowCopyOfContent);
- MEDLOADER_EXPORT static typename MLFieldTraits<T>::FMTSType *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
- MEDLOADER_EXPORT typename MLFieldTraits<T>::FMTSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
+ static typename MLFieldTraits<T>::FMTSType *New();
+ static typename MLFieldTraits<T>::FMTSType *New(const std::string& fileName, bool loadAll=true);
+ static typename MLFieldTraits<T>::FMTSType *New(med_idt fid, bool loadAll=true);
+ static typename MLFieldTraits<T>::FMTSType *New(DataArrayByte *db) { return BuildFromMemoryChunk<typename MLFieldTraits<T>::FMTSType>(db); }
+ static typename MLFieldTraits<T>::FMTSType *New(const std::string& fileName, const std::string& fieldName, bool loadAll=true);
+ static typename MLFieldTraits<T>::FMTSType *New(med_idt fid, const std::string& fieldName, bool loadAll=true);
+ static typename MLFieldTraits<T>::FMTSType *New(const typename MLFieldTraits<T>::FMTSWSDAType& other, bool shallowCopyOfContent);
+ static typename MLFieldTraits<T>::FMTSType *LoadSpecificEntities(const std::string& fileName, const std::string& fieldName, const std::vector< std::pair<TypeOfField,INTERP_KERNEL::NormalizedCellType> >& entities, bool loadAll=true);
+ typename MLFieldTraits<T>::FMTSType *extractPartImpl(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const;
+ MEDFileAnyTypeFieldMultiTS *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef, MEDFileMesh *mm) const { return this->extractPartImpl(extractDef,mm); }
//
- MEDLOADER_EXPORT typename Traits<T>::FieldType *field(int iteration, int order, const MEDFileMesh *mesh) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
+ typename Traits<T>::FieldType *field(int iteration, int order, const MEDFileMesh *mesh) const;
+ typename Traits<T>::FieldType *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const;
+ typename Traits<T>::FieldType *getFieldAtLevelOld(TypeOfField type, int iteration, int order, const std::string& mname, int meshDimRelToMax, int renumPol=0) const;
+ typename Traits<T>::ArrayType *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayIdType *&pfl) const;
//
- MEDLOADER_EXPORT void appendFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
- MEDLOADER_EXPORT void appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
- MEDLOADER_EXPORT void appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+ void appendFieldNoProfileSBT(const typename Traits<T>::FieldType *field);
+ void appendFieldProfile(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
+ void appendFieldProfileFlatly(const typename Traits<T>::FieldType *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayIdType *profile);
//
- MEDLOADER_EXPORT typename MLFieldTraits<T>::F1TSType *getTimeStepAtPos(int pos) const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArray(int iteration, int order) const;
- MEDLOADER_EXPORT typename Traits<T>::ArrayType *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
- MEDLOADER_EXPORT typename MLFieldTraits<T>::FMTSType *buildNewEmptyImpl() const;
- MEDLOADER_EXPORT void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
+ typename MLFieldTraits<T>::F1TSType *getTimeStepAtPos(int pos) const;
+ typename Traits<T>::ArrayType *getUndergroundDataArray(int iteration, int order) const;
+ typename Traits<T>::ArrayType *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<mcIdType,mcIdType> > >& entries) const;
+ typename MLFieldTraits<T>::FMTSType *buildNewEmptyImpl() const;
+ void checkCoherencyOfType(const MEDFileAnyTypeField1TS *f1ts) const;
protected:
const typename MLFieldTraits<T>::FMTSWSDAType *contentNotNull() const;
typename MLFieldTraits<T>::FMTSWSDAType *contentNotNull();
/*!
* User class.
*/
- class MEDFileFieldMultiTS : public MEDFileTemplateFieldMultiTS<double>
+ class MEDLOADER_EXPORT MEDFileFieldMultiTS : public MEDFileTemplateFieldMultiTS<double>
{
friend class MEDFileTemplateFieldMultiTS<double>;
public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
- MEDLOADER_EXPORT MEDFileInt32FieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFieldMultiTS"); }
+ MEDFileAnyTypeFieldMultiTS *shallowCpy() const;
+ MEDFileInt32FieldMultiTS *convertToInt(bool isDeepCpyGlobs=true) const;
+ std::string getClassName() const override { return std::string("MEDFileFieldMultiTS"); }
//
- MEDLOADER_EXPORT std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
- MEDLOADER_EXPORT MEDFileFieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
+ std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const std::string& mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const;
+ MEDFileFieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
public:
private:
~MEDFileFieldMultiTS() { }
};
template<class T>
- class MEDFileNDTemplateFieldMultiTS : public MEDFileTemplateFieldMultiTS<T>
+ class MEDLOADER_EXPORT MEDFileNDTemplateFieldMultiTS : public MEDFileTemplateFieldMultiTS<T>
{
public:
- MEDLOADER_EXPORT MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
+ MEDFileFieldMultiTS *convertToDouble(bool isDeepCpyGlobs=true) const;
protected:
~MEDFileNDTemplateFieldMultiTS() { }
MEDFileNDTemplateFieldMultiTS() { }
/*!
* User class.
*/
- class MEDFileInt32FieldMultiTS : public MEDFileNDTemplateFieldMultiTS<Int32>
+ class MEDLOADER_EXPORT MEDFileInt32FieldMultiTS : public MEDFileNDTemplateFieldMultiTS<Int32>
{
friend class MEDFileTemplateFieldMultiTS<Int32>;
public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileInt32FieldMultiTS(*this); }
- MEDLOADER_EXPORT MEDFileInt32FieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt32FieldMultiTS"); }
+ MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileInt32FieldMultiTS(*this); }
+ MEDFileInt32FieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
+ std::string getClassName() const override { return std::string("MEDFileInt32FieldMultiTS"); }
private:
~MEDFileInt32FieldMultiTS() { }
MEDFileInt32FieldMultiTS() { }
/*!
* User class.
*/
- class MEDFileInt64FieldMultiTS : public MEDFileNDTemplateFieldMultiTS<Int64>
+ class MEDLOADER_EXPORT MEDFileInt64FieldMultiTS : public MEDFileNDTemplateFieldMultiTS<Int64>
{
friend class MEDFileTemplateFieldMultiTS<Int64>;
public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileInt64FieldMultiTS(*this); }
- MEDLOADER_EXPORT MEDFileInt64FieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileInt64FieldMultiTS"); }
+ MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileInt64FieldMultiTS(*this); }
+ MEDFileInt64FieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
+ std::string getClassName() const override { return std::string("MEDFileInt64FieldMultiTS"); }
private:
~MEDFileInt64FieldMultiTS() { }
MEDFileInt64FieldMultiTS() { }
/*!
* User class.
*/
- class MEDFileFloatFieldMultiTS : public MEDFileNDTemplateFieldMultiTS<float>
+ class MEDLOADER_EXPORT MEDFileFloatFieldMultiTS : public MEDFileNDTemplateFieldMultiTS<float>
{
friend class MEDFileTemplateFieldMultiTS<float>;
public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileFloatFieldMultiTS(*this); }
- MEDLOADER_EXPORT MEDFileFloatFieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFloatFieldMultiTS"); }
+ MEDFileAnyTypeFieldMultiTS *shallowCpy() const { return new MEDFileFloatFieldMultiTS(*this); }
+ MEDFileFloatFieldMultiTS *buildNewEmpty() const { return buildNewEmptyImpl(); }
+ std::string getClassName() const override { return std::string("MEDFileFloatFieldMultiTS"); }
private:
~MEDFileFloatFieldMultiTS() { }
MEDFileFloatFieldMultiTS() { }
MEDFileFloatFieldMultiTS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms, const MEDFileEntities *entities=0):MEDFileNDTemplateFieldMultiTS<float>(fid,fieldName,loadAll,ms,entities) { }
};
- class MEDFileAnyTypeFieldMultiTSIterator
+ class MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator
{
public:
- MEDLOADER_EXPORT MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
- MEDLOADER_EXPORT ~MEDFileAnyTypeFieldMultiTSIterator();
- MEDLOADER_EXPORT MEDFileAnyTypeField1TS *nextt();
+ MEDFileAnyTypeFieldMultiTSIterator(MEDFileAnyTypeFieldMultiTS *fmts);
+ ~MEDFileAnyTypeFieldMultiTSIterator();
+ MEDFileAnyTypeField1TS *nextt();
private:
MCAuto<MEDFileAnyTypeFieldMultiTS> _fmts;
int _iter_id;
mcIdType _nb_of_entity;
};
- class MEDFileField1TSStructItem : public BigMemoryObject
+ class MEDLOADER_EXPORT MEDFileField1TSStructItem : public BigMemoryObject
{
public:
MEDFileField1TSStructItem():_computed(false),_type(ON_CELLS) { }
void checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
bool operator==(const MEDFileField1TSStructItem& other) const;
std::string getClassName() const override { return std::string("MEDFileField1TSStructItem"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
bool isEntityCell() const;
bool isComputed() const { return _computed; }
TypeOfField getType() const { return _type; }
bool isCompatibleWithNodesDiscr(const MEDFileField1TSStructItem& other, const MEDFileMeshStruct *meshSt, const MEDFileFieldGlobsReal *globs) const;
bool isFullyOnOneLev(const MEDFileMeshStruct *meshSt, int& theFirstLevFull) const;
std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypes(const MEDFileMesh *m) const;
- MEDLOADER_EXPORT MEDMeshMultiLev *buildFromScratchDataSetSupportOnCells(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) const;
- MEDLOADER_EXPORT static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt);
+ MEDMeshMultiLev *buildFromScratchDataSetSupportOnCells(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) const;
+ static MEDFileField1TSStructItem BuildItemFrom(const MEDFileAnyTypeField1TS *ref, const MEDFileMeshStruct *meshSt);
private:
bool _computed;
TypeOfField _type;
std::vector< MEDFileField1TSStructItem2 > _items;
};
- class MEDFileField1TSStruct : public RefCountObject
+ class MEDLOADER_EXPORT MEDFileField1TSStruct : public RefCountObject
{
public:
static MEDFileField1TSStruct *New(const MEDFileAnyTypeField1TS *ref, MEDFileMeshStruct *mst);
bool isEqualConsideringThePast(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *mst) const;
bool isSupportSameAs(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt);
bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt);
- MEDLOADER_EXPORT MEDMeshMultiLev *buildFromScratchDataSetSupport(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) const;
+ MEDMeshMultiLev *buildFromScratchDataSetSupport(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs) const;
bool isDataSetSupportFastlyEqualTo(const MEDFileField1TSStruct& other, const MEDFileFieldGlobsReal *globs) const;
std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypes(const MEDFileMesh *m) const;
private:
std::vector<MEDFileField1TSStructItem> _already_checked;
};
- class MEDFileFastCellSupportComparator : public RefCountObject
+ class MEDLOADER_EXPORT MEDFileFastCellSupportComparator : public RefCountObject
{
public:
- MEDLOADER_EXPORT static MEDFileFastCellSupportComparator *New(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileFastCellSupportComparator"); }
- MEDLOADER_EXPORT MEDMeshMultiLev *buildFromScratchDataSetSupport(int timeStepId, const MEDFileFieldGlobsReal *globs) const;
- MEDLOADER_EXPORT bool isDataSetSupportEqualToThePreviousOne(int timeStepId, const MEDFileFieldGlobsReal *globs) const;
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAt(int timeStepId, const MEDFileMesh *m) const;
+ static MEDFileFastCellSupportComparator *New(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref);
+ std::string getClassName() const override { return std::string("MEDFileFastCellSupportComparator"); }
+ MEDMeshMultiLev *buildFromScratchDataSetSupport(int timeStepId, const MEDFileFieldGlobsReal *globs) const;
+ bool isDataSetSupportEqualToThePreviousOne(int timeStepId, const MEDFileFieldGlobsReal *globs) const;
+ int getNumberOfTS() const;
+ std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAt(int timeStepId, const MEDFileMesh *m) const;
bool isEqual(const MEDFileAnyTypeFieldMultiTS *other);
bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeFieldMultiTS *other);
std::size_t getHeapMemorySizeWithoutChildren() const;
* Correspondence of nodes is constructed when you specify no cell type,
* else Correspondence of cells is constructed.
*/
-class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
+class MEDLOADER_EXPORT MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
{
public:
- MEDLOADER_EXPORT static MEDFileJointCorrespondence *New();
- MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence); // nodes
- MEDLOADER_EXPORT static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence, // cells
+ static MEDFileJointCorrespondence *New();
+ static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence); // nodes
+ static MEDFileJointCorrespondence *New(DataArrayIdType* correspondence, // cells
INTERP_KERNEL::NormalizedCellType loc_geo_type,
INTERP_KERNEL::NormalizedCellType rem_geo_type);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJointCorrespondence"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileJointCorrespondence *deepCopy() const;
- MEDLOADER_EXPORT MEDFileJointCorrespondence *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileJointCorrespondence *other) const;
- MEDLOADER_EXPORT void setIsNodal(bool isNodal) { _is_nodal = isNodal; }
- MEDLOADER_EXPORT bool getIsNodal() const { return _is_nodal; }
- MEDLOADER_EXPORT void setLocalGeometryType(INTERP_KERNEL::NormalizedCellType type) { _loc_geo_type=type; }
- MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const { return _loc_geo_type; }
- MEDLOADER_EXPORT void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type) { _rem_geo_type=type; }
- MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const { return _rem_geo_type; }
- MEDLOADER_EXPORT void setCorrespondence(DataArrayIdType *corr);
- MEDLOADER_EXPORT const DataArrayIdType *getCorrespondence() const { return _correspondence; }
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
+ std::string getClassName() const override { return std::string("MEDFileJointCorrespondence"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileJointCorrespondence *deepCopy() const;
+ MEDFileJointCorrespondence *shallowCpy() const;
+ bool isEqual(const MEDFileJointCorrespondence *other) const;
+ void setIsNodal(bool isNodal) { _is_nodal = isNodal; }
+ bool getIsNodal() const { return _is_nodal; }
+ void setLocalGeometryType(INTERP_KERNEL::NormalizedCellType type) { _loc_geo_type=type; }
+ INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const { return _loc_geo_type; }
+ void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type) { _rem_geo_type=type; }
+ INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const { return _rem_geo_type; }
+ void setCorrespondence(DataArrayIdType *corr);
+ const DataArrayIdType *getCorrespondence() const { return _correspondence; }
+ void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
+ std::string simpleRepr() const;
+ void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const;
private:
MEDFileJointCorrespondence();
MEDFileJointCorrespondence(DataArrayIdType* correspondence,
/*!
* \brief Joint of one iteration holds correspondences of entities of all types
*/
-class MEDFileJointOneStep : public RefCountObject, public MEDFileWritable
+class MEDLOADER_EXPORT MEDFileJointOneStep : public RefCountObject, public MEDFileWritable
{
public:
- MEDLOADER_EXPORT static MEDFileJointOneStep *New(int dt=-1, int it=-1);
- MEDLOADER_EXPORT static MEDFileJointOneStep *New(const std::string& fileName, const std::string& mName, const std::string& jointName, int number=1);
- MEDLOADER_EXPORT static MEDFileJointOneStep *New(med_idt fid, const std::string& mName, const std::string& jointName, int number=1);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJointOneStep"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileJointOneStep *deepCopy() const;
- MEDLOADER_EXPORT MEDFileJointOneStep *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileJointOneStep *other) const;
- MEDLOADER_EXPORT void setOrder(int order) { _order=order; }
- MEDLOADER_EXPORT int getOrder() const { return _order; }
- MEDLOADER_EXPORT void setIteration(int it) { _iteration=it; }
- MEDLOADER_EXPORT int getIteration() const { return _iteration; }
- MEDLOADER_EXPORT void pushCorrespondence(MEDFileJointCorrespondence* correspondence);
- MEDLOADER_EXPORT int getNumberOfCorrespondences() const;
- MEDLOADER_EXPORT MEDFileJointCorrespondence *getCorrespondenceAtPos(int i) const;
+ static MEDFileJointOneStep *New(int dt=-1, int it=-1);
+ static MEDFileJointOneStep *New(const std::string& fileName, const std::string& mName, const std::string& jointName, int number=1);
+ static MEDFileJointOneStep *New(med_idt fid, const std::string& mName, const std::string& jointName, int number=1);
+ std::string getClassName() const override { return std::string("MEDFileJointOneStep"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileJointOneStep *deepCopy() const;
+ MEDFileJointOneStep *shallowCpy() const;
+ bool isEqual(const MEDFileJointOneStep *other) const;
+ void setOrder(int order) { _order=order; }
+ int getOrder() const { return _order; }
+ void setIteration(int it) { _iteration=it; }
+ int getIteration() const { return _iteration; }
+ void pushCorrespondence(MEDFileJointCorrespondence* correspondence);
+ int getNumberOfCorrespondences() const;
+ MEDFileJointCorrespondence *getCorrespondenceAtPos(int i) const;
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName) const;
+ void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName) const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName) const;
+ std::string simpleRepr() const;
+ void writeLL(med_idt fid, const std::string& localMeshName, const std::string& jointName) const;
private:
MEDFileJointOneStep();
MEDFileJointOneStep(med_idt fid, const std::string& mName, const std::string& jointName, int number);
- MEDLOADER_EXPORT INTERP_KERNEL::NormalizedCellType convertGeometryType(med_geometry_type geotype);
+ INTERP_KERNEL::NormalizedCellType convertGeometryType(med_geometry_type geotype);
protected:
int _order;
int _iteration;
* \brief Joint holds a sequence of joints of different iterations relating to
* a pair of mesh domains: a local one and a distant one
*/
-class MEDFileJoint : public RefCountObject, public MEDFileWritableStandAlone
+class MEDLOADER_EXPORT MEDFileJoint : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileJoint *New();
- MEDLOADER_EXPORT static MEDFileJoint *New(const std::string& fileName, const std::string& mName, int num);
- MEDLOADER_EXPORT static MEDFileJoint *New(med_idt fid, const std::string& mName, int num);
- MEDLOADER_EXPORT static MEDFileJoint *New(const std::string& jointName, const std::string& locMeshName, const std::string& remoteMeshName, int remoteMeshNum );
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJoint"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileJoint *deepCopy() const;
- MEDLOADER_EXPORT MEDFileJoint *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileJoint *other) const;
- MEDLOADER_EXPORT void setLocalMeshName(const std::string& name) { _loc_mesh_name=name; }
- MEDLOADER_EXPORT std::string getLocalMeshName() const { return _loc_mesh_name; }
- MEDLOADER_EXPORT void setRemoteMeshName(const std::string& name) { _rem_mesh_name=name; }
- MEDLOADER_EXPORT std::string getRemoteMeshName() const { return _rem_mesh_name; }
- MEDLOADER_EXPORT void setDescription(const std::string& name) { _desc_name=name; }
- MEDLOADER_EXPORT std::string getDescription() const { return _desc_name; }
- MEDLOADER_EXPORT void setJointName(const std::string& name) { _joint_name=name; }
- MEDLOADER_EXPORT std::string getJointName() const { return _joint_name; }
- MEDLOADER_EXPORT bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT void setDomainNumber(const int& number) { _domain_number=number; }
- MEDLOADER_EXPORT int getDomainNumber() const { return _domain_number; }
- MEDLOADER_EXPORT void pushStep(MEDFileJointOneStep* step);
- MEDLOADER_EXPORT int getNumberOfSteps() const;
- MEDLOADER_EXPORT MEDFileJointOneStep *getStepAtPos(int i) const;
+ static MEDFileJoint *New();
+ static MEDFileJoint *New(const std::string& fileName, const std::string& mName, int num);
+ static MEDFileJoint *New(med_idt fid, const std::string& mName, int num);
+ static MEDFileJoint *New(const std::string& jointName, const std::string& locMeshName, const std::string& remoteMeshName, int remoteMeshNum );
+ std::string getClassName() const override { return std::string("MEDFileJoint"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileJoint *deepCopy() const;
+ MEDFileJoint *shallowCpy() const;
+ bool isEqual(const MEDFileJoint *other) const;
+ void setLocalMeshName(const std::string& name) { _loc_mesh_name=name; }
+ std::string getLocalMeshName() const { return _loc_mesh_name; }
+ void setRemoteMeshName(const std::string& name) { _rem_mesh_name=name; }
+ std::string getRemoteMeshName() const { return _rem_mesh_name; }
+ void setDescription(const std::string& name) { _desc_name=name; }
+ std::string getDescription() const { return _desc_name; }
+ void setJointName(const std::string& name) { _joint_name=name; }
+ std::string getJointName() const { return _joint_name; }
+ bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ void setDomainNumber(const int& number) { _domain_number=number; }
+ int getDomainNumber() const { return _domain_number; }
+ void pushStep(MEDFileJointOneStep* step);
+ int getNumberOfSteps() const;
+ MEDFileJointOneStep *getStepAtPos(int i) const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
+ void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
+ std::string simpleRepr() const;
private:
MEDFileJoint();
MEDFileJoint(med_idt fid, const std::string& mName, int num);
/*!
* \brief Joints of a mesh domain relating to all other mesh domains
*/
- class MEDFileJoints : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileJoints : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileJoints *New();
- MEDLOADER_EXPORT static MEDFileJoints *New(const std::string& fileName, const std::string& meshName);
- MEDLOADER_EXPORT static MEDFileJoints *New(med_idt fid, const std::string& meshName);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileJoints"); }
- MEDLOADER_EXPORT MEDFileJoints *deepCopy() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleReprWithoutHeader(std::ostream& oss) const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT int getNumberOfJoints() const;
- MEDLOADER_EXPORT MEDFileJoint *getJointAtPos(int i) const;
- MEDLOADER_EXPORT MEDFileJoint *getJointWithName(const std::string& jname) const;
- MEDLOADER_EXPORT std::vector<std::string> getJointsNames() const;
- MEDLOADER_EXPORT bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ static MEDFileJoints *New();
+ static MEDFileJoints *New(const std::string& fileName, const std::string& meshName);
+ static MEDFileJoints *New(med_idt fid, const std::string& meshName);
+ std::string getClassName() const override { return std::string("MEDFileJoints"); }
+ MEDFileJoints *deepCopy() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::string simpleRepr() const;
+ void simpleReprWithoutHeader(std::ostream& oss) const;
+ void writeLL(med_idt fid) const;
+ std::string getMeshName() const;
+ int getNumberOfJoints() const;
+ MEDFileJoint *getJointAtPos(int i) const;
+ MEDFileJoint *getJointWithName(const std::string& jname) const;
+ std::vector<std::string> getJointsNames() const;
+ bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
//
- MEDLOADER_EXPORT void resize(int newSize);
- MEDLOADER_EXPORT void pushJoint(MEDFileJoint *joint);
- MEDLOADER_EXPORT void setJointAtPos(int i, MEDFileJoint *joint);
- MEDLOADER_EXPORT void destroyJointAtPos(int i);
+ void resize(int newSize);
+ void pushJoint(MEDFileJoint *joint);
+ void setJointAtPos(int i, MEDFileJoint *joint);
+ void destroyJointAtPos(int i);
private:
~MEDFileJoints() { }
MEDFileJoints();
class MEDFileFieldGlobsReal;
class MEDFileField1TSStructItem;
- class MEDFileMesh : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileMesh : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMesh>(db); }
- MEDLOADER_EXPORT static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
- MEDLOADER_EXPORT static MEDFileMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT virtual MEDFileMesh *createNewEmpty() const = 0;
- MEDLOADER_EXPORT virtual MEDFileMesh *deepCopy() const = 0;
- MEDLOADER_EXPORT virtual MEDFileMesh *shallowCpy() const = 0;
- MEDLOADER_EXPORT virtual bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT virtual void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT virtual void setName(const std::string& name);
- MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT std::string getName() const { return _name; }
- MEDLOADER_EXPORT std::string getUnivName() const { return _univ_name; }
- MEDLOADER_EXPORT bool getUnivNameWrStatus() const { return _univ_wr_status; }
- MEDLOADER_EXPORT void setUnivNameWrStatus(bool newStatus) { _univ_wr_status=newStatus; }
- MEDLOADER_EXPORT void setDescription(const std::string& name) { _desc_name=name; }
- MEDLOADER_EXPORT std::string getDescription() const { return _desc_name; }
- MEDLOADER_EXPORT void setOrder(int order) { _order=order; }
- MEDLOADER_EXPORT int getOrder() const { return _order; }
- MEDLOADER_EXPORT void setIteration(int it) { _iteration=it; }
- MEDLOADER_EXPORT int getIteration() const { return _iteration; }
- MEDLOADER_EXPORT void setTimeValue(double time) { _time=time; }
- MEDLOADER_EXPORT void setTime(int dt, int it, double time) { _time=time; _iteration=dt; _order=it; }
- MEDLOADER_EXPORT double getTime(int& dt, int& it) const { dt=_iteration; it=_order; return _time; }
- MEDLOADER_EXPORT double getTimeValue() const { return _time; }
- MEDLOADER_EXPORT void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
- MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; }
- MEDLOADER_EXPORT void setAxisType(MEDCouplingAxisType at) { _axis_type=at; }
- MEDLOADER_EXPORT MEDCouplingAxisType getAxisType() const { return _axis_type; }
- MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
- MEDLOADER_EXPORT virtual mcIdType getNumberOfNodes() const = 0;
- MEDLOADER_EXPORT virtual mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual bool hasImplicitPart() const = 0;
- MEDLOADER_EXPORT virtual mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
- MEDLOADER_EXPORT virtual void releaseImplicitPartIfAny() const = 0;
- MEDLOADER_EXPORT virtual std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const = 0;
- MEDLOADER_EXPORT virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const = 0;
- MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevels() const = 0;
- MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevelsExt() const = 0;
- MEDLOADER_EXPORT virtual std::vector<int> getFamArrNonEmptyLevelsExt() const = 0;
- MEDLOADER_EXPORT virtual std::vector<int> getNumArrNonEmptyLevelsExt() const = 0;
- MEDLOADER_EXPORT virtual std::vector<int> getNameArrNonEmptyLevelsExt() const = 0;
- MEDLOADER_EXPORT virtual mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0;
- MEDLOADER_EXPORT virtual std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
- MEDLOADER_EXPORT virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const = 0;
- MEDLOADER_EXPORT virtual MEDFileMesh *cartesianize() const = 0;
- MEDLOADER_EXPORT virtual bool presenceOfStructureElements() const = 0;
- MEDLOADER_EXPORT virtual void killStructureElements() { }
+ static MEDFileMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMesh>(db); }
+ static MEDFileMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
+ static MEDFileMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0, MEDFileJoints* joints=0);
+ void writeLL(med_idt fid) const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ virtual MEDFileMesh *createNewEmpty() const = 0;
+ virtual MEDFileMesh *deepCopy() const = 0;
+ virtual MEDFileMesh *shallowCpy() const = 0;
+ virtual bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ virtual void clearNonDiscrAttributes() const;
+ virtual void setName(const std::string& name);
+ bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ std::string getName() const { return _name; }
+ std::string getUnivName() const { return _univ_name; }
+ bool getUnivNameWrStatus() const { return _univ_wr_status; }
+ void setUnivNameWrStatus(bool newStatus) { _univ_wr_status=newStatus; }
+ void setDescription(const std::string& name) { _desc_name=name; }
+ std::string getDescription() const { return _desc_name; }
+ void setOrder(int order) { _order=order; }
+ int getOrder() const { return _order; }
+ void setIteration(int it) { _iteration=it; }
+ int getIteration() const { return _iteration; }
+ void setTimeValue(double time) { _time=time; }
+ void setTime(int dt, int it, double time) { _time=time; _iteration=dt; _order=it; }
+ double getTime(int& dt, int& it) const { dt=_iteration; it=_order; return _time; }
+ double getTimeValue() const { return _time; }
+ void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
+ std::string getTimeUnit() const { return _dt_unit; }
+ void setAxisType(MEDCouplingAxisType at) { _axis_type=at; }
+ MEDCouplingAxisType getAxisType() const { return _axis_type; }
+ std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
+ virtual mcIdType getNumberOfNodes() const = 0;
+ virtual mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual bool hasImplicitPart() const = 0;
+ virtual mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
+ virtual void releaseImplicitPartIfAny() const = 0;
+ virtual std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const = 0;
+ virtual mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const = 0;
+ virtual std::vector<int> getNonEmptyLevels() const = 0;
+ virtual std::vector<int> getNonEmptyLevelsExt() const = 0;
+ virtual std::vector<int> getFamArrNonEmptyLevelsExt() const = 0;
+ virtual std::vector<int> getNumArrNonEmptyLevelsExt() const = 0;
+ virtual std::vector<int> getNameArrNonEmptyLevelsExt() const = 0;
+ virtual mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const = 0;
+ virtual std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
+ virtual void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const = 0;
+ virtual MEDFileMesh *cartesianize() const = 0;
+ virtual bool presenceOfStructureElements() const = 0;
+ virtual void killStructureElements() { }
//
- MEDLOADER_EXPORT bool areFamsEqual(const MEDFileMesh *other, std::string& what) const;
- MEDLOADER_EXPORT bool areGrpsEqual(const MEDFileMesh *other, std::string& what) const;
- MEDLOADER_EXPORT bool existsGroup(const std::string& groupName) const;
- MEDLOADER_EXPORT bool existsFamily(mcIdType famId) const;
- MEDLOADER_EXPORT bool existsFamily(const std::string& familyName) const;
- MEDLOADER_EXPORT void setFamilyId(const std::string& familyName, mcIdType id);
- MEDLOADER_EXPORT void setFamilyIdUnique(const std::string& familyName, mcIdType id);
- MEDLOADER_EXPORT virtual void addFamily(const std::string& familyName, mcIdType id);
- MEDLOADER_EXPORT virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName);
- MEDLOADER_EXPORT virtual bool keepFamIdsOnlyOnLevs(const std::vector<mcIdType>& famIds, const std::vector<int>& levs);
- MEDLOADER_EXPORT void addFamilyOnGrp(const std::string& grpName, const std::string& famName);
- MEDLOADER_EXPORT std::string findOrCreateAndGiveFamilyWithId(mcIdType id, bool& created);
- MEDLOADER_EXPORT void setFamilyInfo(const std::map<std::string,mcIdType>& info);
- MEDLOADER_EXPORT void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
- MEDLOADER_EXPORT void copyFamGrpMapsFrom(const MEDFileMesh& other);
- MEDLOADER_EXPORT void clearGrpMap();
- MEDLOADER_EXPORT void clearFamMap();
- MEDLOADER_EXPORT void clearFamGrpMaps();
- MEDLOADER_EXPORT const std::map<std::string,mcIdType>& getFamilyInfo() const { return _families; }
- MEDLOADER_EXPORT const std::map<std::string, std::vector<std::string> >& getGroupInfo() const { return _groups; }
- MEDLOADER_EXPORT std::vector<std::string> getFamiliesOnGroup(const std::string& name) const;
- MEDLOADER_EXPORT std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamiliesIdsOnGroup(const std::string& name) const;
- MEDLOADER_EXPORT void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams);
- MEDLOADER_EXPORT void setFamiliesIdsOnGroup(const std::string& name, const std::vector<mcIdType>& famIds);
- MEDLOADER_EXPORT std::vector<std::string> getGroupsOnFamily(const std::string& name) const;
- MEDLOADER_EXPORT void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps);
- MEDLOADER_EXPORT std::vector<std::string> getGroupsNames() const;
- MEDLOADER_EXPORT std::vector<std::string> getFamiliesNames() const;
- MEDLOADER_EXPORT std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getGrpNonEmptyLevelsExt(const std::string& grp) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getGrpNonEmptyLevels(const std::string& grp) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
- MEDLOADER_EXPORT virtual std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const = 0;
- MEDLOADER_EXPORT virtual std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const = 0;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamNonEmptyLevels(const std::string& fam) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamNonEmptyLevelsExt(const std::string& fam) const;
- MEDLOADER_EXPORT std::vector<std::string> getFamiliesNamesWithFilePointOfView() const;
- MEDLOADER_EXPORT static std::string GetMagicFamilyStr();
- MEDLOADER_EXPORT void assignFamilyNameWithGroupName();
- MEDLOADER_EXPORT std::vector<std::string> removeEmptyGroups();
- MEDLOADER_EXPORT void removeGroupAtLevel(int meshDimRelToMaxExt, const std::string& name);
- MEDLOADER_EXPORT void removeGroup(const std::string& name);
- MEDLOADER_EXPORT void removeFamily(const std::string& name);
- MEDLOADER_EXPORT std::vector<std::string> removeOrphanGroups();
- MEDLOADER_EXPORT std::vector<std::string> removeOrphanFamilies();
- MEDLOADER_EXPORT void removeFamiliesReferedByNoGroups();
- MEDLOADER_EXPORT void rearrangeFamilies();
- MEDLOADER_EXPORT void zipFamilies();
- MEDLOADER_EXPORT void checkOrphanFamilyZero() const;
- MEDLOADER_EXPORT void changeGroupName(const std::string& oldName, const std::string& newName);
- MEDLOADER_EXPORT void changeFamilyName(const std::string& oldName, const std::string& newName);
- MEDLOADER_EXPORT void changeFamilyId(mcIdType oldId, mcIdType newId);
- MEDLOADER_EXPORT void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
- MEDLOADER_EXPORT mcIdType getFamilyId(const std::string& name) const;
- MEDLOADER_EXPORT mcIdType getMaxAbsFamilyId() const;
- MEDLOADER_EXPORT mcIdType getMaxFamilyId() const;
- MEDLOADER_EXPORT mcIdType getMinFamilyId() const;
- MEDLOADER_EXPORT mcIdType getTheMaxAbsFamilyId() const;
- MEDLOADER_EXPORT mcIdType getTheMaxFamilyId() const;
- MEDLOADER_EXPORT mcIdType getTheMinFamilyId() const;
- MEDLOADER_EXPORT virtual mcIdType getMaxAbsFamilyIdInArrays() const = 0;
- MEDLOADER_EXPORT virtual mcIdType getMaxFamilyIdInArrays() const = 0;
- MEDLOADER_EXPORT virtual mcIdType getMinFamilyIdInArrays() const = 0;
- MEDLOADER_EXPORT DataArrayIdType *getAllFamiliesIdsReferenced() const;
- MEDLOADER_EXPORT DataArrayIdType *computeAllFamilyIdsInUse() const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamiliesIds(const std::vector<std::string>& famNames) const;
- MEDLOADER_EXPORT std::string getFamilyNameGivenId(mcIdType id) const;
- MEDLOADER_EXPORT bool ensureDifferentFamIdsPerLevel();
- MEDLOADER_EXPORT void normalizeFamIdsTrio();
- MEDLOADER_EXPORT void normalizeFamIdsMEDFile();
- MEDLOADER_EXPORT virtual int getMeshDimension() const = 0;
- MEDLOADER_EXPORT virtual int getSpaceDimension() const = 0;
- MEDLOADER_EXPORT virtual std::string simpleRepr() const;
- MEDLOADER_EXPORT virtual std::string advancedRepr() const = 0;
+ bool areFamsEqual(const MEDFileMesh *other, std::string& what) const;
+ bool areGrpsEqual(const MEDFileMesh *other, std::string& what) const;
+ bool existsGroup(const std::string& groupName) const;
+ bool existsFamily(mcIdType famId) const;
+ bool existsFamily(const std::string& familyName) const;
+ void setFamilyId(const std::string& familyName, mcIdType id);
+ void setFamilyIdUnique(const std::string& familyName, mcIdType id);
+ virtual void addFamily(const std::string& familyName, mcIdType id);
+ virtual void createGroupOnAll(int meshDimRelToMaxExt, const std::string& groupName);
+ virtual bool keepFamIdsOnlyOnLevs(const std::vector<mcIdType>& famIds, const std::vector<int>& levs);
+ void addFamilyOnGrp(const std::string& grpName, const std::string& famName);
+ std::string findOrCreateAndGiveFamilyWithId(mcIdType id, bool& created);
+ void setFamilyInfo(const std::map<std::string,mcIdType>& info);
+ void setGroupInfo(const std::map<std::string, std::vector<std::string> >&info);
+ void copyFamGrpMapsFrom(const MEDFileMesh& other);
+ void clearGrpMap();
+ void clearFamMap();
+ void clearFamGrpMaps();
+ const std::map<std::string,mcIdType>& getFamilyInfo() const { return _families; }
+ const std::map<std::string, std::vector<std::string> >& getGroupInfo() const { return _groups; }
+ std::vector<std::string> getFamiliesOnGroup(const std::string& name) const;
+ std::vector<std::string> getFamiliesOnGroups(const std::vector<std::string>& grps) const;
+ std::vector<mcIdType> getFamiliesIdsOnGroup(const std::string& name) const;
+ void setFamiliesOnGroup(const std::string& name, const std::vector<std::string>& fams);
+ void setFamiliesIdsOnGroup(const std::string& name, const std::vector<mcIdType>& famIds);
+ std::vector<std::string> getGroupsOnFamily(const std::string& name) const;
+ void setGroupsOnFamily(const std::string& famName, const std::vector<std::string>& grps);
+ std::vector<std::string> getGroupsNames() const;
+ std::vector<std::string> getFamiliesNames() const;
+ std::vector<std::string> getGroupsOnSpecifiedLev(int meshDimRelToMaxExt) const;
+ std::vector<mcIdType> getGrpNonEmptyLevelsExt(const std::string& grp) const;
+ std::vector<mcIdType> getGrpNonEmptyLevels(const std::string& grp) const;
+ std::vector<mcIdType> getGrpsNonEmptyLevels(const std::vector<std::string>& grps) const;
+ std::vector<mcIdType> getGrpsNonEmptyLevelsExt(const std::vector<std::string>& grps) const;
+ virtual std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const = 0;
+ virtual std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const = 0;
+ std::vector<mcIdType> getFamNonEmptyLevels(const std::string& fam) const;
+ std::vector<mcIdType> getFamNonEmptyLevelsExt(const std::string& fam) const;
+ std::vector<std::string> getFamiliesNamesWithFilePointOfView() const;
+ static std::string GetMagicFamilyStr();
+ void assignFamilyNameWithGroupName();
+ std::vector<std::string> removeEmptyGroups();
+ void removeGroupAtLevel(int meshDimRelToMaxExt, const std::string& name);
+ void removeGroup(const std::string& name);
+ void removeFamily(const std::string& name);
+ std::vector<std::string> removeOrphanGroups();
+ std::vector<std::string> removeOrphanFamilies();
+ void removeFamiliesReferedByNoGroups();
+ void rearrangeFamilies();
+ void zipFamilies();
+ void checkOrphanFamilyZero() const;
+ void changeGroupName(const std::string& oldName, const std::string& newName);
+ void changeFamilyName(const std::string& oldName, const std::string& newName);
+ void changeFamilyId(mcIdType oldId, mcIdType newId);
+ void changeAllGroupsContainingFamily(const std::string& familyNameToChange, const std::vector<std::string>& newFamiliesNames);
+ mcIdType getFamilyId(const std::string& name) const;
+ mcIdType getMaxAbsFamilyId() const;
+ mcIdType getMaxFamilyId() const;
+ mcIdType getMinFamilyId() const;
+ mcIdType getTheMaxAbsFamilyId() const;
+ mcIdType getTheMaxFamilyId() const;
+ mcIdType getTheMinFamilyId() const;
+ virtual mcIdType getMaxAbsFamilyIdInArrays() const = 0;
+ virtual mcIdType getMaxFamilyIdInArrays() const = 0;
+ virtual mcIdType getMinFamilyIdInArrays() const = 0;
+ DataArrayIdType *getAllFamiliesIdsReferenced() const;
+ DataArrayIdType *computeAllFamilyIdsInUse() const;
+ std::vector<mcIdType> getFamiliesIds(const std::vector<std::string>& famNames) const;
+ std::string getFamilyNameGivenId(mcIdType id) const;
+ bool ensureDifferentFamIdsPerLevel();
+ void normalizeFamIdsTrio();
+ void normalizeFamIdsMEDFile();
+ virtual int getMeshDimension() const = 0;
+ virtual int getSpaceDimension() const = 0;
+ virtual std::string simpleRepr() const;
+ virtual std::string advancedRepr() const = 0;
//
- MEDLOADER_EXPORT virtual void setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayIdType *>& grps, bool renum=false);
- MEDLOADER_EXPORT virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr) = 0;
- MEDLOADER_EXPORT virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr) = 0;
- MEDLOADER_EXPORT virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) = 0;
- MEDLOADER_EXPORT virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr) = 0;
- MEDLOADER_EXPORT virtual void addNodeGroup(const DataArrayIdType *ids) = 0;
- MEDLOADER_EXPORT virtual void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids) = 0;
- MEDLOADER_EXPORT virtual const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) = 0;
- MEDLOADER_EXPORT DataArrayIdType *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt);
- MEDLOADER_EXPORT virtual const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const = 0;
- MEDLOADER_EXPORT virtual DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const = 0;
- MEDLOADER_EXPORT virtual DataArrayIdType *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getNodeGroupArr(const std::string& grp, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
- MEDLOADER_EXPORT virtual DataArrayIdType *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
+ virtual void setGroupsAtLevel(int meshDimRelToMaxExt, const std::vector<const DataArrayIdType *>& grps, bool renum=false);
+ virtual void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr) = 0;
+ virtual void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr) = 0;
+ virtual void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr) = 0;
+ virtual void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr) = 0;
+ virtual void addNodeGroup(const DataArrayIdType *ids) = 0;
+ virtual void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids) = 0;
+ virtual const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) = 0;
+ DataArrayIdType *getOrCreateAndGetFamilyFieldAtLevel(int meshDimRelToMaxExt);
+ virtual const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const = 0;
+ virtual DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const = 0;
+ virtual DataArrayIdType *getGroupsArr(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
+ virtual DataArrayIdType *getGroupArr(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
+ virtual DataArrayIdType *getFamilyArr(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
+ virtual DataArrayIdType *getNodeGroupArr(const std::string& grp, bool renum=false) const;
+ virtual DataArrayIdType *getNodeGroupsArr(const std::vector<std::string>& grps, bool renum=false) const;
+ virtual DataArrayIdType *getNodeFamilyArr(const std::string& fam, bool renum=false) const;
+ virtual DataArrayIdType *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const;
// tools
- MEDLOADER_EXPORT virtual bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell) = 0;
- MEDLOADER_EXPORT int getNumberOfJoints() const;
- MEDLOADER_EXPORT MEDFileJoints *getJoints() const;
- MEDLOADER_EXPORT void setJoints( MEDFileJoints* joints );
+ virtual bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell) = 0;
+ int getNumberOfJoints() const;
+ MEDFileJoints *getJoints() const;
+ void setJoints( MEDFileJoints* joints );
MEDFileEquivalences *getEquivalences() { return _equiv; }
const MEDFileEquivalences *getEquivalences() const { return _equiv; }
void killEquivalences() { _equiv=(MEDFileEquivalences *)0; }
void initializeEquivalences() { _equiv=MEDFileEquivalences::New(this); }
- MEDLOADER_EXPORT static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(med_geometry_type geoType);
+ static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(med_geometry_type geoType);
static TypeOfField ConvertFromMEDFileEntity(med_entity_type etype);
protected:
MEDFileMesh();
std::map<std::string, std::vector<std::string> > _groups;
std::map<std::string,mcIdType> _families;
public:
- MEDLOADER_EXPORT static const char DFT_FAM_NAME[];
+ static const char DFT_FAM_NAME[];
};
class MEDCouplingMappedExtrudedMesh;
- class MEDFileUMesh : public MEDFileMesh
+ class MEDLOADER_EXPORT MEDFileUMesh : public MEDFileMesh
{
friend class MEDFileMesh;
public:
- MEDLOADER_EXPORT static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileUMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileUMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileUMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileUMesh>(db); }
- MEDLOADER_EXPORT static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem);
- MEDLOADER_EXPORT static MEDFileUMesh *New();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileUMesh"); }
- MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static void LoadPartCoords(const std::string& fileName, const std::string& mName, int dt, int it, const std::vector<std::string>& infosOnComp, mcIdType startNodeId, mcIdType stopNodeId,
+ static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileUMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileUMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileUMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileUMesh>(db); }
+ static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem);
+ static MEDFileUMesh *New();
+ std::string getClassName() const override { return std::string("MEDFileUMesh"); }
+ static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileUMesh *LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static void LoadPartCoords(const std::string& fileName, const std::string& mName, int dt, int it, const std::vector<std::string>& infosOnComp, mcIdType startNodeId, mcIdType stopNodeId,
MCAuto<DataArrayDouble>& coords, MCAuto<PartDefinition>& partCoords, MCAuto<DataArrayIdType>& famCoords, MCAuto<DataArrayIdType>& numCoords, MCAuto<DataArrayAsciiChar>& nameCoords);
- MEDLOADER_EXPORT static const char *GetSpeStr4ExtMesh() { return SPE_FAM_STR_EXTRUDED_MESH; }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileUMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileUMesh *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT void checkConsistency() const;
- MEDLOADER_EXPORT void checkSMESHConsistency() const;
- MEDLOADER_EXPORT void clearNodeAndCellNumbers();
- MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT void setName(const std::string& name);
- MEDLOADER_EXPORT const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& getAccessOfUndergroundEltStrs() const { return _elt_str; }
+ static const char *GetSpeStr4ExtMesh() { return SPE_FAM_STR_EXTRUDED_MESH; }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileMesh *createNewEmpty() const;
+ MEDFileUMesh *deepCopy() const;
+ MEDFileUMesh *shallowCpy() const;
+ bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ void checkConsistency() const;
+ void checkSMESHConsistency() const;
+ void clearNodeAndCellNumbers();
+ void clearNonDiscrAttributes() const;
+ void setName(const std::string& name);
+ const std::vector< MCAuto<MEDFileEltStruct4Mesh> >& getAccessOfUndergroundEltStrs() const { return _elt_str; }
//
- MEDLOADER_EXPORT mcIdType getMaxAbsFamilyIdInArrays() const;
- MEDLOADER_EXPORT mcIdType getMaxFamilyIdInArrays() const;
- MEDLOADER_EXPORT mcIdType getMinFamilyIdInArrays() const;
- MEDLOADER_EXPORT int getMeshDimension() const;
- MEDLOADER_EXPORT int getSpaceDimension() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT std::string advancedRepr() const;
- MEDLOADER_EXPORT mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
- MEDLOADER_EXPORT const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const PartDefinition *getPartDefAtLevel(int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const;
- MEDLOADER_EXPORT mcIdType getNumberOfNodes() const;
- MEDLOADER_EXPORT mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT bool hasImplicitPart() const;
- MEDLOADER_EXPORT mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
- MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
- MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
- MEDLOADER_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
- MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
- MEDLOADER_EXPORT MEDFileMesh *cartesianize() const;
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
- MEDLOADER_EXPORT std::vector<int> getNonEmptyLevels() const;
- MEDLOADER_EXPORT std::vector<int> getNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getFamArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getNumArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getNameArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
- MEDLOADER_EXPORT DataArrayDouble *getCoords() const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
- MEDLOADER_EXPORT DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
- MEDLOADER_EXPORT std::vector< std::pair<int,mcIdType> > getAllDistributionOfTypes() const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
- MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const;
- MEDLOADER_EXPORT void forceComputationOfParts() const;
- MEDLOADER_EXPORT void computeRevNum() const;
- MEDLOADER_EXPORT std::vector<MEDCoupling1GTUMesh *> getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const;
- MEDLOADER_EXPORT MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const;
- MEDLOADER_EXPORT DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
- MEDLOADER_EXPORT DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
- MEDLOADER_EXPORT int getRelativeLevOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+ mcIdType getMaxAbsFamilyIdInArrays() const;
+ mcIdType getMaxFamilyIdInArrays() const;
+ mcIdType getMinFamilyIdInArrays() const;
+ int getMeshDimension() const;
+ int getSpaceDimension() const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
+ const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+ DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
+ const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+ const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+ const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
+ MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
+ const PartDefinition *getPartDefAtLevel(int meshDimRelToMaxExt, INTERP_KERNEL::NormalizedCellType gt=INTERP_KERNEL::NORM_ERROR) const;
+ mcIdType getNumberOfNodes() const;
+ mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
+ bool hasImplicitPart() const;
+ mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ void releaseImplicitPartIfAny() const;
+ std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+ void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
+ MEDFileMesh *cartesianize() const;
+ bool presenceOfStructureElements() const;
+ void killStructureElements();
+ std::vector<int> getNonEmptyLevels() const;
+ std::vector<int> getNonEmptyLevelsExt() const;
+ std::vector<int> getFamArrNonEmptyLevelsExt() const;
+ std::vector<int> getNumArrNonEmptyLevelsExt() const;
+ std::vector<int> getNameArrNonEmptyLevelsExt() const;
+ std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
+ std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
+ DataArrayDouble *getCoords() const;
+ MEDCouplingUMesh *getGroup(int meshDimRelToMaxExt, const std::string& grp, bool renum=false) const;
+ MEDCouplingUMesh *getGroups(int meshDimRelToMaxExt, const std::vector<std::string>& grps, bool renum=false) const;
+ MEDCouplingUMesh *getFamily(int meshDimRelToMaxExt, const std::string& fam, bool renum=false) const;
+ MEDCouplingUMesh *getFamilies(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+ DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+ MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
+ std::vector<mcIdType> getDistributionOfTypes(int meshDimRelToMax) const;
+ std::vector< std::pair<int,mcIdType> > getAllDistributionOfTypes() const;
+ MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
+ MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
+ MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
+ MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const;
+ void forceComputationOfParts() const;
+ void computeRevNum() const;
+ std::vector<MEDCoupling1GTUMesh *> getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const;
+ MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const;
+ DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+ DataArrayIdType *extractNumberFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
+ int getRelativeLevOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
//
- MEDLOADER_EXPORT void setFamilyNameAttachedOnId(mcIdType id, const std::string& newFamName);
- MEDLOADER_EXPORT void setCoords(DataArrayDouble *coords);
- MEDLOADER_EXPORT void setCoordsForced(DataArrayDouble *coords);
- MEDLOADER_EXPORT void eraseGroupsAtLevel(int meshDimRelToMaxExt);
- MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
- MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
- MEDLOADER_EXPORT void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
- MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
- MEDLOADER_EXPORT void addNodeGroup(const DataArrayIdType *ids);
- MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
- MEDLOADER_EXPORT void removeMeshAtLevel(int meshDimRelToMax);
- MEDLOADER_EXPORT void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m);
- MEDLOADER_EXPORT void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false);
- MEDLOADER_EXPORT void setMeshes(const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
- MEDLOADER_EXPORT void setGroupsFromScratch(int meshDimRelToMax, const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
- MEDLOADER_EXPORT void setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
- MEDLOADER_EXPORT void optimizeFamilies();
+ void setFamilyNameAttachedOnId(mcIdType id, const std::string& newFamName);
+ void setCoords(DataArrayDouble *coords);
+ void setCoordsForced(DataArrayDouble *coords);
+ void eraseGroupsAtLevel(int meshDimRelToMaxExt);
+ void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
+ void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
+ void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
+ void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
+ void addNodeGroup(const DataArrayIdType *ids);
+ void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
+ void removeMeshAtLevel(int meshDimRelToMax);
+ void setMeshAtLevel(int meshDimRelToMax, MEDCoupling1GTUMesh *m);
+ void setMeshAtLevel(int meshDimRelToMax, MEDCouplingUMesh *m, bool newOrOld=false);
+ void setMeshes(const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
+ void setGroupsFromScratch(int meshDimRelToMax, const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
+ void setGroupsOnSetMesh(int meshDimRelToMax, const std::vector<const MEDCouplingUMesh *>& ms, bool renum=false);
+ void optimizeFamilies();
// tools
- MEDLOADER_EXPORT void buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayIdType *&nodesDuplicated, DataArrayIdType *&cellsModified, DataArrayIdType *&cellsNotModified);
- MEDLOADER_EXPORT bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
- MEDLOADER_EXPORT DataArrayIdType *zipCoords();
- MEDLOADER_EXPORT DataArrayIdType *computeFetchedNodeIds() const;
- MEDLOADER_EXPORT DataArrayIdType *deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
- MEDLOADER_EXPORT MEDFileUMesh *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
- MEDLOADER_EXPORT MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const;
- MEDLOADER_EXPORT MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const;
- MEDLOADER_EXPORT MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
- MEDLOADER_EXPORT MCAuto<MEDFileUMesh> symmetry3DPlane(const double point[3], const double normalVector[3]) const;
- MEDLOADER_EXPORT static MCAuto<MEDFileUMesh> Aggregate(const std::vector<const MEDFileUMesh *>& meshes);
- MEDLOADER_EXPORT MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const;
+ void buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayIdType *&nodesDuplicated, DataArrayIdType *&cellsModified, DataArrayIdType *&cellsNotModified);
+ bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
+ DataArrayIdType *zipCoords();
+ DataArrayIdType *computeFetchedNodeIds() const;
+ DataArrayIdType *deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
+ MEDFileUMesh *extractPart(const std::map<int, MCAuto<DataArrayIdType> >& extractDef) const;
+ MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const;
+ MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const;
+ MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
+ MCAuto<MEDFileUMesh> symmetry3DPlane(const double point[3], const double normalVector[3]) const;
+ static MCAuto<MEDFileUMesh> Aggregate(const std::vector<const MEDFileUMesh *>& meshes);
+ MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const;
// serialization
- MEDLOADER_EXPORT void serialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
+ void serialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
- MEDLOADER_EXPORT void unserialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
+ void unserialize(std::vector<double>& tinyDouble, std::vector<mcIdType>& tinyInt, std::vector<std::string>& tinyStr,
std::vector< MCAuto<DataArrayIdType> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
private:
- MEDLOADER_EXPORT ~MEDFileUMesh();
+ ~MEDFileUMesh();
void writeMeshLL(med_idt fid) const;
MEDFileUMesh();
MEDFileUMesh(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
std::vector< MCAuto<MEDFileEltStruct4Mesh> > _elt_str;
};
- class MEDFileStructuredMesh : public MEDFileMesh
+ class MEDLOADER_EXPORT MEDFileStructuredMesh : public MEDFileMesh
{
friend class MEDFileMesh;
public:
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT mcIdType getMaxAbsFamilyIdInArrays() const;
- MEDLOADER_EXPORT mcIdType getMaxFamilyIdInArrays() const;
- MEDLOADER_EXPORT mcIdType getMinFamilyIdInArrays() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
- MEDLOADER_EXPORT const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
- MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
- MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
- MEDLOADER_EXPORT void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
- MEDLOADER_EXPORT void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
- MEDLOADER_EXPORT void addNodeGroup(const DataArrayIdType *ids);
- MEDLOADER_EXPORT void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
- MEDLOADER_EXPORT const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT std::vector<int> getNonEmptyLevels() const;
- MEDLOADER_EXPORT std::vector<int> getNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getFamArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getNumArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT std::vector<int> getNameArrNonEmptyLevelsExt() const;
- MEDLOADER_EXPORT MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
- MEDLOADER_EXPORT std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
- MEDLOADER_EXPORT mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT mcIdType getNumberOfNodes() const;
- MEDLOADER_EXPORT mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
- MEDLOADER_EXPORT bool hasImplicitPart() const;
- MEDLOADER_EXPORT mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
- MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
- MEDLOADER_EXPORT MEDCoupling1SGTUMesh *getImplicitFaceMesh() const;
- MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
- MEDLOADER_EXPORT mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
- MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
- MEDLOADER_EXPORT bool presenceOfStructureElements() const { return false; }
- MEDLOADER_EXPORT virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ mcIdType getMaxAbsFamilyIdInArrays() const;
+ mcIdType getMaxFamilyIdInArrays() const;
+ mcIdType getMinFamilyIdInArrays() const;
+ bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ void clearNonDiscrAttributes() const;
+ DataArrayIdType *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
+ const DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt) const;
+ DataArrayIdType *getFamilyFieldAtLevel(int meshDimRelToMaxExt);
+ void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayIdType *famArr);
+ void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayIdType *renumArr);
+ void setNameFieldAtLevel(int meshDimRelToMaxExt, DataArrayAsciiChar *nameArr);
+ void setGlobalNumFieldAtLevel(int meshDimRelToMaxExt, DataArrayIdType *globalNumArr);
+ void addNodeGroup(const DataArrayIdType *ids);
+ void addGroup(int meshDimRelToMaxExt, const DataArrayIdType *ids);
+ const DataArrayIdType *getNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+ const DataArrayIdType *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
+ const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
+ MCAuto<DataArrayIdType> getGlobalNumFieldAtLevel(int meshDimRelToMaxExt) const;
+ std::vector<int> getNonEmptyLevels() const;
+ std::vector<int> getNonEmptyLevelsExt() const;
+ std::vector<int> getFamArrNonEmptyLevelsExt() const;
+ std::vector<int> getNumArrNonEmptyLevelsExt() const;
+ std::vector<int> getNameArrNonEmptyLevelsExt() const;
+ MEDCouplingMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
+ std::vector<mcIdType> getFamsNonEmptyLevels(const std::vector<std::string>& fams) const;
+ std::vector<mcIdType> getFamsNonEmptyLevelsExt(const std::vector<std::string>& fams) const;
+ mcIdType getSizeAtLevel(int meshDimRelToMaxExt) const;
+ mcIdType getNumberOfNodes() const;
+ mcIdType getNumberOfCellsAtLevel(int meshDimRelToMaxExt) const;
+ bool hasImplicitPart() const;
+ mcIdType buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ void releaseImplicitPartIfAny() const;
+ MEDCoupling1SGTUMesh *getImplicitFaceMesh() const;
+ std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
+ mcIdType getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType ct) const;
+ void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
+ bool presenceOfStructureElements() const { return false; }
+ virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
// tools
- MEDLOADER_EXPORT bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
+ bool unPolyze(std::vector<mcIdType>& oldCode, std::vector<mcIdType>& newCode, DataArrayIdType *& o2nRenumCell);
protected:
~MEDFileStructuredMesh() { }
void changeFamilyIdArr(mcIdType oldId, mcIdType newId);
mutable MCAuto<MEDCoupling1SGTUMesh> _faces_if_necessary;
};
- class MEDFileCMesh : public MEDFileStructuredMesh
+ class MEDLOADER_EXPORT MEDFileCMesh : public MEDFileStructuredMesh
{
friend class MEDFileMesh;
public:
- MEDLOADER_EXPORT static MEDFileCMesh *New();
- MEDLOADER_EXPORT static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCMesh>(db); }
- MEDLOADER_EXPORT static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileCMesh"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileCMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileCMesh *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT int getMeshDimension() const;
- MEDLOADER_EXPORT int getSpaceDimension() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT std::string advancedRepr() const;
- MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT const MEDCouplingCMesh *getMesh() const;
- MEDLOADER_EXPORT void setMesh(MEDCouplingCMesh *m);
- MEDLOADER_EXPORT MEDFileMesh *cartesianize() const;
+ static MEDFileCMesh *New();
+ static MEDFileCMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCMesh>(db); }
+ static MEDFileCMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ std::string getClassName() const override { return std::string("MEDFileCMesh"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileMesh *createNewEmpty() const;
+ MEDFileCMesh *deepCopy() const;
+ MEDFileCMesh *shallowCpy() const;
+ bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ int getMeshDimension() const;
+ int getSpaceDimension() const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ void clearNonDiscrAttributes() const;
+ const MEDCouplingCMesh *getMesh() const;
+ void setMesh(MEDCouplingCMesh *m);
+ MEDFileMesh *cartesianize() const;
private:
~MEDFileCMesh() { }
const MEDCouplingStructuredMesh *getStructuredMesh() const;
MCAuto<MEDCouplingCMesh> _cmesh;
};
- class MEDFileCurveLinearMesh : public MEDFileStructuredMesh
+ class MEDLOADER_EXPORT MEDFileCurveLinearMesh : public MEDFileStructuredMesh
{
friend class MEDFileMesh;
public:
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New();
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCurveLinearMesh>(db); }
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT static MEDFileCurveLinearMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileCurveLinearMesh"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileCurveLinearMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileCurveLinearMesh *shallowCpy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT int getMeshDimension() const;
- MEDLOADER_EXPORT int getSpaceDimension() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT std::string advancedRepr() const;
- MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT const MEDCouplingCurveLinearMesh *getMesh() const;
- MEDLOADER_EXPORT void setMesh(MEDCouplingCurveLinearMesh *m);
- MEDLOADER_EXPORT MEDFileMesh *cartesianize() const;
+ static MEDFileCurveLinearMesh *New();
+ static MEDFileCurveLinearMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCurveLinearMesh *New(med_idt fid, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCurveLinearMesh *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileCurveLinearMesh>(db); }
+ static MEDFileCurveLinearMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ static MEDFileCurveLinearMesh *New(med_idt fid, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ std::string getClassName() const override { return std::string("MEDFileCurveLinearMesh"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileMesh *createNewEmpty() const;
+ MEDFileCurveLinearMesh *deepCopy() const;
+ MEDFileCurveLinearMesh *shallowCpy() const;
+ bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ int getMeshDimension() const;
+ int getSpaceDimension() const;
+ std::string simpleRepr() const;
+ std::string advancedRepr() const;
+ void clearNonDiscrAttributes() const;
+ const MEDCouplingCurveLinearMesh *getMesh() const;
+ void setMesh(MEDCouplingCurveLinearMesh *m);
+ MEDFileMesh *cartesianize() const;
private:
~MEDFileCurveLinearMesh() { }
MEDFileCurveLinearMesh();
MCAuto<MEDCouplingCurveLinearMesh> _clmesh;
};
- class MEDFileMeshMultiTS : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileMeshMultiTS : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileMeshMultiTS *New();
- MEDLOADER_EXPORT static MEDFileMeshMultiTS *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileMeshMultiTS *New(const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileMeshMultiTS *New(med_idt fid, const std::string& mName);
- MEDLOADER_EXPORT static MEDFileMeshMultiTS *New(const std::string& fileName, const std::string& mName);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileMeshMultiTS"); }
- MEDLOADER_EXPORT MEDFileMeshMultiTS *deepCopy() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT void setName(const std::string& newMeshName);
- MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT void cartesianizeMe();
- MEDLOADER_EXPORT MEDFileMesh *getOneTimeStep() const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT void setOneTimeStep(MEDFileMesh *mesh1TimeStep);
- MEDLOADER_EXPORT MEDFileJoints *getJoints() const;
- MEDLOADER_EXPORT void setJoints(MEDFileJoints* joints);
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
+ static MEDFileMeshMultiTS *New();
+ static MEDFileMeshMultiTS *New(med_idt fid);
+ static MEDFileMeshMultiTS *New(const std::string& fileName);
+ static MEDFileMeshMultiTS *New(med_idt fid, const std::string& mName);
+ static MEDFileMeshMultiTS *New(const std::string& fileName, const std::string& mName);
+ std::string getClassName() const override { return std::string("MEDFileMeshMultiTS"); }
+ MEDFileMeshMultiTS *deepCopy() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::string getName() const;
+ void setName(const std::string& newMeshName);
+ bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ void cartesianizeMe();
+ MEDFileMesh *getOneTimeStep() const;
+ void writeLL(med_idt fid) const;
+ void setOneTimeStep(MEDFileMesh *mesh1TimeStep);
+ MEDFileJoints *getJoints() const;
+ void setJoints(MEDFileJoints* joints);
+ bool presenceOfStructureElements() const;
+ void killStructureElements();
private:
~MEDFileMeshMultiTS() { }
void loadFromFile(med_idt fid, const std::string& mName);
class MEDFileMeshesIterator;
- class MEDFileMeshes : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileMeshes : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileMeshes *New();
- MEDLOADER_EXPORT static MEDFileMeshes *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileMeshes *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMeshes>(db); }
- MEDLOADER_EXPORT static MEDFileMeshes *New(const std::string& fileName);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileMeshes"); }
- MEDLOADER_EXPORT MEDFileMeshes *deepCopy() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleReprWithoutHeader(std::ostream& oss) const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT int getNumberOfMeshes() const;
- MEDLOADER_EXPORT MEDFileMeshesIterator *iterator();
- MEDLOADER_EXPORT MEDFileMesh *getMeshAtPos(int i) const;
- MEDLOADER_EXPORT MEDFileMesh *getMeshWithName(const std::string& mname) const;
- MEDLOADER_EXPORT std::vector<std::string> getMeshesNames() const;
- MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
- MEDLOADER_EXPORT void cartesianizeMe();
+ static MEDFileMeshes *New();
+ static MEDFileMeshes *New(med_idt fid);
+ static MEDFileMeshes *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileMeshes>(db); }
+ static MEDFileMeshes *New(const std::string& fileName);
+ std::string getClassName() const override { return std::string("MEDFileMeshes"); }
+ MEDFileMeshes *deepCopy() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::string simpleRepr() const;
+ void simpleReprWithoutHeader(std::ostream& oss) const;
+ void writeLL(med_idt fid) const;
+ int getNumberOfMeshes() const;
+ MEDFileMeshesIterator *iterator();
+ MEDFileMesh *getMeshAtPos(int i) const;
+ MEDFileMesh *getMeshWithName(const std::string& mname) const;
+ std::vector<std::string> getMeshesNames() const;
+ bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
+ void cartesianizeMe();
//
- MEDLOADER_EXPORT void resize(int newSize);
- MEDLOADER_EXPORT void pushMesh(MEDFileMesh *mesh);
- MEDLOADER_EXPORT void setMeshAtPos(int i, MEDFileMesh *mesh);
- MEDLOADER_EXPORT void destroyMeshAtPos(int i);
- MEDLOADER_EXPORT bool presenceOfStructureElements() const;
- MEDLOADER_EXPORT void killStructureElements();
+ void resize(int newSize);
+ void pushMesh(MEDFileMesh *mesh);
+ void setMeshAtPos(int i, MEDFileMesh *mesh);
+ void destroyMeshAtPos(int i);
+ bool presenceOfStructureElements() const;
+ void killStructureElements();
private:
~MEDFileMeshes() { }
void checkConsistencyLight() const;
std::vector< MCAuto<MEDFileMeshMultiTS> > _meshes;
};
- class MEDFileMeshesIterator
+ class MEDLOADER_EXPORT MEDFileMeshesIterator
{
public:
- MEDLOADER_EXPORT MEDFileMeshesIterator(MEDFileMeshes *ms);
- MEDLOADER_EXPORT ~MEDFileMeshesIterator();
- MEDLOADER_EXPORT MEDFileMesh *nextt();
+ MEDFileMeshesIterator(MEDFileMeshes *ms);
+ ~MEDFileMeshesIterator();
+ MEDFileMesh *nextt();
private:
MCAuto<MEDFileMeshes> _ms;
int _iter_id;
namespace MEDCoupling
{
- class MEDFileMeshSupports : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileMeshSupports : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileMeshSupports *New(const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileMeshSupports *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileMeshSupports *New();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileMeshSupports"); }
+ static MEDFileMeshSupports *New(const std::string& fileName);
+ static MEDFileMeshSupports *New(med_idt fid);
+ static MEDFileMeshSupports *New();
+ std::string getClassName() const override { return std::string("MEDFileMeshSupports"); }
public:
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::vector<std::string> getSupMeshNames() const;
- MEDLOADER_EXPORT const MEDFileUMesh *getSupMeshWithName(const std::string& name) const;
- MEDLOADER_EXPORT mcIdType getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ void writeLL(med_idt fid) const;
+ std::vector<std::string> getSupMeshNames() const;
+ const MEDFileUMesh *getSupMeshWithName(const std::string& name) const;
+ mcIdType getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const;
private:
MEDFileMeshSupports(med_idt fid);
MEDFileMeshSupports();
namespace MEDCoupling
{
- class MEDFileParameter1TS : public RefCountObject
+ class MEDLOADER_EXPORT MEDFileParameter1TS : public RefCountObject
{
public:
- MEDLOADER_EXPORT virtual MEDFileParameter1TS *deepCopy() const = 0;
- MEDLOADER_EXPORT virtual bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT virtual void simpleRepr2(int bkOffset, std::ostream& oss) const = 0;
- MEDLOADER_EXPORT virtual void readValue(med_idt fid, const std::string& name) = 0;
- MEDLOADER_EXPORT virtual void writeAdvanced(med_idt fid, const std::string& name, const MEDFileWritable& mw) const = 0;
+ virtual MEDFileParameter1TS *deepCopy() const = 0;
+ virtual bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
+ virtual void simpleRepr2(int bkOffset, std::ostream& oss) const = 0;
+ virtual void readValue(med_idt fid, const std::string& name) = 0;
+ virtual void writeAdvanced(med_idt fid, const std::string& name, const MEDFileWritable& mw) const = 0;
public:
- MEDLOADER_EXPORT void setIteration(int it) { _iteration=it; }
- MEDLOADER_EXPORT int getIteration() const { return _iteration; }
- MEDLOADER_EXPORT void setOrder(int order) { _order=order; }
- MEDLOADER_EXPORT int getOrder() const { return _order; }
- MEDLOADER_EXPORT void setTimeValue(double time) { _time=time; }
- MEDLOADER_EXPORT void setTime(int dt, int it, double time) { _time=time; _iteration=dt; _order=it; }
- MEDLOADER_EXPORT double getTime(int& dt, int& it) { dt=_iteration; it=_order; return _time; }
- MEDLOADER_EXPORT double getTimeValue() const { return _time; }
+ void setIteration(int it) { _iteration=it; }
+ int getIteration() const { return _iteration; }
+ void setOrder(int order) { _order=order; }
+ int getOrder() const { return _order; }
+ void setTimeValue(double time) { _time=time; }
+ void setTime(int dt, int it, double time) { _time=time; _iteration=dt; _order=it; }
+ double getTime(int& dt, int& it) { dt=_iteration; it=_order; return _time; }
+ double getTimeValue() const { return _time; }
protected:
MEDFileParameter1TS(int iteration, int order, double time);
MEDFileParameter1TS();
double _time;
};
- class MEDFileParameterDouble1TSWTI : public MEDFileParameter1TS
+ class MEDLOADER_EXPORT MEDFileParameterDouble1TSWTI : public MEDFileParameter1TS
{
public:
- MEDLOADER_EXPORT static MEDFileParameterDouble1TSWTI *New(int iteration, int order, double time);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileParameterDouble1TSWTI"); }
- MEDLOADER_EXPORT MEDFileParameter1TS *deepCopy() const;
- MEDLOADER_EXPORT void setValue(double val) { _arr=val; }
- MEDLOADER_EXPORT double getValue() const { return _arr; }
- MEDLOADER_EXPORT bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT void readValue(med_idt fid, const std::string& name);
- MEDLOADER_EXPORT std::string simpleRepr() const;
+ static MEDFileParameterDouble1TSWTI *New(int iteration, int order, double time);
+ std::string getClassName() const override { return std::string("MEDFileParameterDouble1TSWTI"); }
+ MEDFileParameter1TS *deepCopy() const;
+ void setValue(double val) { _arr=val; }
+ double getValue() const { return _arr; }
+ bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void readValue(med_idt fid, const std::string& name);
+ std::string simpleRepr() const;
protected:
MEDFileParameterDouble1TSWTI();
MEDFileParameterDouble1TSWTI(int iteration, int order, double time);
double _arr;
};
- class MEDFileParameterTinyInfo : public MEDFileWritable
+ class MEDLOADER_EXPORT MEDFileParameterTinyInfo : public MEDFileWritable
{
public:
- MEDLOADER_EXPORT void setDescription(const std::string& name) { _desc_name=name; }
- MEDLOADER_EXPORT std::string getDescription() const { return _desc_name; }
- MEDLOADER_EXPORT void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
- MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; }
- MEDLOADER_EXPORT std::size_t getHeapMemSizeOfStrings() const;
- MEDLOADER_EXPORT bool isEqualStrings(const MEDFileParameterTinyInfo& other, std::string& what) const;
+ void setDescription(const std::string& name) { _desc_name=name; }
+ std::string getDescription() const { return _desc_name; }
+ void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
+ std::string getTimeUnit() const { return _dt_unit; }
+ std::size_t getHeapMemSizeOfStrings() const;
+ bool isEqualStrings(const MEDFileParameterTinyInfo& other, std::string& what) const;
protected:
void writeLLHeader(med_idt fid, med_parameter_type typ) const;
void mainRepr(int bkOffset, std::ostream& oss) const;
std::string _desc_name;
};
- class MEDFileParameterDouble1TS : public MEDFileParameterDouble1TSWTI, public MEDFileParameterTinyInfo
+ class MEDLOADER_EXPORT MEDFileParameterDouble1TS : public MEDFileParameterDouble1TSWTI, public MEDFileParameterTinyInfo
{
public:
- MEDLOADER_EXPORT static MEDFileParameterDouble1TS *New();
- MEDLOADER_EXPORT static MEDFileParameterDouble1TS *New(const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName);
- MEDLOADER_EXPORT static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName, int dt, int it);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileParameterDouble1TS"); }
- MEDLOADER_EXPORT virtual MEDFileParameter1TS *deepCopy() const;
- MEDLOADER_EXPORT virtual bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT virtual std::string simpleRepr() const;
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT void setName(const std::string& name) { _name=name; }
- MEDLOADER_EXPORT std::string getName() const { return _name; }
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
+ static MEDFileParameterDouble1TS *New();
+ static MEDFileParameterDouble1TS *New(const std::string& fileName);
+ static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName);
+ static MEDFileParameterDouble1TS *New(const std::string& fileName, const std::string& paramName, int dt, int it);
+ std::string getClassName() const override { return std::string("MEDFileParameterDouble1TS"); }
+ virtual MEDFileParameter1TS *deepCopy() const;
+ virtual bool isEqual(const MEDFileParameter1TS *other, double eps, std::string& what) const;
+ virtual std::string simpleRepr() const;
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ void setName(const std::string& name) { _name=name; }
+ std::string getName() const { return _name; }
+ void write(const std::string& fileName, int mode) const;
private:
MEDFileParameterDouble1TS();
MEDFileParameterDouble1TS(const std::string& fileName);
MEDFileParameterDouble1TS(const std::string& fileName, const std::string& paramName, int dt, int it);
};
- class MEDFileParameterMultiTS : public RefCountObject, public MEDFileParameterTinyInfo
+ class MEDLOADER_EXPORT MEDFileParameterMultiTS : public RefCountObject, public MEDFileParameterTinyInfo
{
public:
- MEDLOADER_EXPORT static MEDFileParameterMultiTS *New();
- MEDLOADER_EXPORT static MEDFileParameterMultiTS *New(const std::string& fileName);
- MEDLOADER_EXPORT static MEDFileParameterMultiTS *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileParameterMultiTS *New(const std::string& fileName, const std::string& paramName);
- MEDLOADER_EXPORT static MEDFileParameterMultiTS *New(med_idt fid, const std::string& paramName);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileParameterMultiTS"); }
- MEDLOADER_EXPORT std::string getName() const { return _name; }
- MEDLOADER_EXPORT void setName(const std::string& name) { _name=name; }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileParameterMultiTS *deepCopy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileParameterMultiTS *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT void write(const std::string& fileName, int mode) const;
- MEDLOADER_EXPORT void writeAdvanced(med_idt fid, const MEDFileWritable& mw) const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void appendValue(int dt, int it, double time, double val);
- MEDLOADER_EXPORT double getDoubleValue(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosOfTimeStep(int iteration, int order) const;
- MEDLOADER_EXPORT int getPosGivenTime(double time, double eps=1e-8) const;
- MEDLOADER_EXPORT MEDFileParameter1TS *getTimeStepAtPos(int posId) const;
- MEDLOADER_EXPORT void eraseTimeStepIds(const int *startIds, const int *endIds);
- MEDLOADER_EXPORT int getNumberOfTS() const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getIterations() const;
- MEDLOADER_EXPORT std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
- MEDLOADER_EXPORT void simpleRepr2(int bkOffset, std::ostream& oss) const;
+ static MEDFileParameterMultiTS *New();
+ static MEDFileParameterMultiTS *New(const std::string& fileName);
+ static MEDFileParameterMultiTS *New(med_idt fid);
+ static MEDFileParameterMultiTS *New(const std::string& fileName, const std::string& paramName);
+ static MEDFileParameterMultiTS *New(med_idt fid, const std::string& paramName);
+ std::string getClassName() const override { return std::string("MEDFileParameterMultiTS"); }
+ std::string getName() const { return _name; }
+ void setName(const std::string& name) { _name=name; }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileParameterMultiTS *deepCopy() const;
+ bool isEqual(const MEDFileParameterMultiTS *other, double eps, std::string& what) const;
+ void write(const std::string& fileName, int mode) const;
+ void writeAdvanced(med_idt fid, const MEDFileWritable& mw) const;
+ std::string simpleRepr() const;
+ void appendValue(int dt, int it, double time, double val);
+ double getDoubleValue(int iteration, int order) const;
+ int getPosOfTimeStep(int iteration, int order) const;
+ int getPosGivenTime(double time, double eps=1e-8) const;
+ MEDFileParameter1TS *getTimeStepAtPos(int posId) const;
+ void eraseTimeStepIds(const int *startIds, const int *endIds);
+ int getNumberOfTS() const;
+ std::vector< std::pair<int,int> > getIterations() const;
+ std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const;
+ void simpleRepr2(int bkOffset, std::ostream& oss) const;
protected:
MEDFileParameterMultiTS();
MEDFileParameterMultiTS(const MEDFileParameterMultiTS& other, bool deepCopy);
std::vector< MCAuto<MEDFileParameter1TS> > _param_per_ts;
};
- class MEDFileParameters : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileParameters : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileParameters *New();
- MEDLOADER_EXPORT static MEDFileParameters *New(med_idt fid);
- MEDLOADER_EXPORT static MEDFileParameters *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileParameters>(db); }
- MEDLOADER_EXPORT static MEDFileParameters *New(const std::string& fileName);
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileParameters"); }
- MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
- MEDLOADER_EXPORT MEDFileParameters *deepCopy() const;
- MEDLOADER_EXPORT bool isEqual(const MEDFileParameters *other, double eps, std::string& what) const;
- MEDLOADER_EXPORT void writeLL(med_idt fid) const;
- MEDLOADER_EXPORT std::vector<std::string> getParamsNames() const;
- MEDLOADER_EXPORT std::string simpleRepr() const;
- MEDLOADER_EXPORT void simpleReprWithoutHeader(std::ostream& oss) const;
- MEDLOADER_EXPORT void resize(int newSize);
- MEDLOADER_EXPORT void pushParam(MEDFileParameterMultiTS *param);
- MEDLOADER_EXPORT void setParamAtPos(int i, MEDFileParameterMultiTS *param);
- MEDLOADER_EXPORT MEDFileParameterMultiTS *getParamAtPos(int i) const;
- MEDLOADER_EXPORT MEDFileParameterMultiTS *getParamWithName(const std::string& paramName) const;
- MEDLOADER_EXPORT void destroyParamAtPos(int i);
- MEDLOADER_EXPORT int getPosFromParamName(const std::string& paramName) const;
- MEDLOADER_EXPORT int getNumberOfParams() const;
+ static MEDFileParameters *New();
+ static MEDFileParameters *New(med_idt fid);
+ static MEDFileParameters *New(DataArrayByte *db) { return BuildFromMemoryChunk<MEDFileParameters>(db); }
+ static MEDFileParameters *New(const std::string& fileName);
+ std::string getClassName() const override { return std::string("MEDFileParameters"); }
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileParameters *deepCopy() const;
+ bool isEqual(const MEDFileParameters *other, double eps, std::string& what) const;
+ void writeLL(med_idt fid) const;
+ std::vector<std::string> getParamsNames() const;
+ std::string simpleRepr() const;
+ void simpleReprWithoutHeader(std::ostream& oss) const;
+ void resize(int newSize);
+ void pushParam(MEDFileParameterMultiTS *param);
+ void setParamAtPos(int i, MEDFileParameterMultiTS *param);
+ MEDFileParameterMultiTS *getParamAtPos(int i) const;
+ MEDFileParameterMultiTS *getParamWithName(const std::string& paramName) const;
+ void destroyParamAtPos(int i);
+ int getPosFromParamName(const std::string& paramName) const;
+ int getNumberOfParams() const;
protected:
void simpleRepr2(int bkOffset, std::ostream& oss) const;
MEDFileParameters(med_idt fid);
class MEDFileMeshSupports;
class MEDFileUMesh;
- class MEDFileSEHolder
+ class MEDLOADER_EXPORT MEDFileSEHolder
{
public:
std::string getModelName() const;
std::string _name;
};
-class MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileSEHolder
+class MEDLOADER_EXPORT MEDFileSEConstAtt : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileSEHolder
{
public:
static MEDFileSEConstAtt *New(med_idt fid, MEDFileStructureElement *father, int idCstAtt, const MEDFileUMesh *mesh);
MCAuto<DataArray> _val;
};
- class MEDFileSEVarAtt : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileSEHolder
+ class MEDLOADER_EXPORT MEDFileSEVarAtt : public RefCountObject, public MEDFileWritableStandAlone, public MEDFileSEHolder
{
public:
static MEDFileSEVarAtt *New(med_idt fid, MEDFileStructureElement *father, int idVarAtt);
MCAuto<DataArray> _gen;
};
- class MEDFileStructureElement : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileStructureElement : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileStructureElement *New(med_idt fid, int idSE, const MEDFileMeshSupports *ms);
- MEDLOADER_EXPORT std::string getName() const;
- MEDLOADER_EXPORT int getDynGT() const;
- MEDLOADER_EXPORT TypeOfField getEntity() const;
- MEDLOADER_EXPORT std::string getMeshName() const;
- MEDLOADER_EXPORT std::vector<std::string> getVarAtts() const;
- MEDLOADER_EXPORT const MEDFileSEVarAtt *getVarAtt(const std::string& varName) const;
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileStructureElement"); }
+ static MEDFileStructureElement *New(med_idt fid, int idSE, const MEDFileMeshSupports *ms);
+ std::string getName() const;
+ int getDynGT() const;
+ TypeOfField getEntity() const;
+ std::string getMeshName() const;
+ std::vector<std::string> getVarAtts() const;
+ const MEDFileSEVarAtt *getVarAtt(const std::string& varName) const;
+ std::string getClassName() const override { return std::string("MEDFileStructureElement"); }
public:
std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
std::size_t getHeapMemorySizeWithoutChildren() const;
std::vector< MCAuto<MEDFileSEVarAtt> > _var_att;
};
- class MEDFileStructureElements : public RefCountObject, public MEDFileWritableStandAlone
+ class MEDLOADER_EXPORT MEDFileStructureElements : public RefCountObject, public MEDFileWritableStandAlone
{
public:
- MEDLOADER_EXPORT static MEDFileStructureElements *New(const std::string& fileName, const MEDFileMeshSupports *ms);
- MEDLOADER_EXPORT static MEDFileStructureElements *New(med_idt fid, const MEDFileMeshSupports *ms);
- MEDLOADER_EXPORT static MEDFileStructureElements *New();
- MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileStructureElements"); }
- MEDLOADER_EXPORT int getNumberOf() const;
- MEDLOADER_EXPORT std::vector<int> getDynGTAvail() const;
- MEDLOADER_EXPORT const MEDFileStructureElement *getWithGT(int idGT) const;
- MEDLOADER_EXPORT mcIdType getNumberOfNodesPerSE(const std::string& seName) const;
- MEDLOADER_EXPORT const MEDFileStructureElement *getSEWithName(const std::string& seName) const;
- MEDLOADER_EXPORT std::vector<std::string> getVarAttsOf(const std::string& seName) const;
- MEDLOADER_EXPORT const MEDFileSEVarAtt *getVarAttOf(const std::string &seName, const std::string& varName) const;
- MEDLOADER_EXPORT const MEDFileUMesh *getSupMeshWithName(const std::string& name) const;
+ static MEDFileStructureElements *New(const std::string& fileName, const MEDFileMeshSupports *ms);
+ static MEDFileStructureElements *New(med_idt fid, const MEDFileMeshSupports *ms);
+ static MEDFileStructureElements *New();
+ std::string getClassName() const override { return std::string("MEDFileStructureElements"); }
+ int getNumberOf() const;
+ std::vector<int> getDynGTAvail() const;
+ const MEDFileStructureElement *getWithGT(int idGT) const;
+ mcIdType getNumberOfNodesPerSE(const std::string& seName) const;
+ const MEDFileStructureElement *getSEWithName(const std::string& seName) const;
+ std::vector<std::string> getVarAttsOf(const std::string& seName) const;
+ const MEDFileSEVarAtt *getVarAttOf(const std::string &seName, const std::string& varName) const;
+ const MEDFileUMesh *getSupMeshWithName(const std::string& name) const;
public:
std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
std::size_t getHeapMemorySizeWithoutChildren() const;