From: Anthony Geay Date: Tue, 16 May 2017 12:37:10 +0000 (+0200) Subject: Biking along the template road X-Git-Tag: V8_4_0a1~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=980233770ec27e291c61679635f150b8861b6ef4;p=tools%2Fmedcoupling.git Biking along the template road --- diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 22aefdc4a..93338b0f6 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -5721,32 +5721,6 @@ MEDFileIntField1TSWithoutSDA *MEDFileField1TSWithoutSDA::convertToInt() const return ret.retn(); } -/*! - * Returns a pointer to the underground DataArrayDouble instance and a - * sequence describing parameters of a support of each part of \a this field. The - * caller should not decrRef() the returned DataArrayDouble. This method allows for a - * direct access to the field values. This method is intended for the field lying on one - * mesh only. - * \param [in,out] entries - the sequence describing parameters of a support of each - * part of \a this field. Each item of this sequence consists of two parts. The - * first part describes a type of mesh entity and an id of discretization of a - * current field part. The second part describes a range of values [begin,end) - * within the returned array relating to the current field part. - * \return DataArrayDouble * - the pointer to the field values array. - * \throw If the number of underlying meshes is not equal to 1. - * \throw If no field values are available. - * \sa getUndergroundDataArray() - */ -DataArrayDouble *MEDFileField1TSWithoutSDA::getUndergroundDataArrayDoubleExt(std::vector< std::pair,std::pair > >& entries) const -{ - if(_field_per_mesh.size()!=1) - throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : field lies on several meshes, this method has no sense !"); - if(_field_per_mesh[0]==0) - throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : no field specified !"); - _field_per_mesh[0]->getUndergroundDataArrayExt(entries); - return getUndergroundDataArrayTemplate(); -} - /*! * Returns a pointer to the underground DataArrayDouble instance and a * sequence describing parameters of a support of each part of \a this field. The @@ -5765,7 +5739,7 @@ DataArrayDouble *MEDFileField1TSWithoutSDA::getUndergroundDataArrayDoubleExt(std */ DataArray *MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const { - return getUndergroundDataArrayDoubleExt(entries); + return getUndergroundDataArrayTemplateExt(entries); } MEDFileField1TSWithoutSDA::MEDFileField1TSWithoutSDA(const std::string& fieldName, const std::string& meshName, int csit, int iteration, int order, const std::vector& infos):MEDFileField1TSTemplateWithoutSDA(fieldName,meshName,csit,iteration,order) @@ -6865,17 +6839,6 @@ void MEDFileField1TS::SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MCAut f->setArray(arrOutC); } -DataArrayDouble *MEDFileField1TS::ReturnSafelyDataArrayDouble(MCAuto& arr) -{ - if(arr.isNull()) - throw INTERP_KERNEL::Exception("MEDFileField1TS::ReturnSafelyDataArrayDouble : no array !"); - DataArrayDouble *arrOutC(dynamic_cast((DataArray*)arr)); - if(!arrOutC) - throw INTERP_KERNEL::Exception("MEDFileField1TS::ReturnSafelyDataArrayDouble : mismatch between dataArrays type and MEDFileField1TS ! Expected double !"); - arrOutC->incrRef(); - return arrOutC; -} - /*! * Return an extraction of \a this using \a extractDef map to specify the extraction. * The keys of \a extractDef is level relative to max ext of \a mm mesh. @@ -7137,28 +7100,6 @@ MEDCouplingFieldDouble *MEDFileField1TS::getFieldAtLevelOld(TypeOfField type, co return ret.retn(); } -/*! - * Returns values and a profile of the field of a given type lying on a given support. - * For more info, see \ref AdvMEDLoaderAPIFieldRW - * \param [in] type - a spatial discretization of the field. - * \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities. - * \param [in] mesh - the supporting mesh. - * \param [out] pfl - a new instance of DataArrayInt holding ids of mesh entities the - * field of interest lies on. If the field lies on all entities of the given - * dimension, all ids in \a pfl are zero. The caller is to delete this array - * using decrRef() as it is no more needed. - * \return DataArrayDouble * - a new instance of DataArrayDouble holding values of the - * field. The caller is to delete this array using decrRef() as it is no more needed. - * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a mesh. - * \throw If no field of \a this is lying on \a mesh. - * \throw If no field values of the given \a type or given \a meshDimRelToMax are available. - */ -DataArrayDouble *MEDFileField1TS::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const -{ - MCAuto ret=contentNotNull()->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNull()); - return MEDFileField1TS::ReturnSafelyDataArrayDouble(ret); -} - /*! * Adds a MEDCouplingFieldDouble to \a this. The underlying mesh of the given field is * checked if its elements are sorted suitable for writing to MED file ("STB" stands for @@ -7211,16 +7152,6 @@ MEDFileField1TS *MEDFileField1TS::shallowCpy() const return new MEDFileField1TS(*this); } -DataArrayDouble *MEDFileField1TS::getUndergroundDataArray() const -{ - return contentNotNull()->getUndergroundDataArrayTemplate(); -} - -DataArrayDouble *MEDFileField1TS::getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const -{ - return contentNotNull()->getUndergroundDataArrayDoubleExt(entries); -} - std::vector< std::vector > MEDFileField1TS::getFieldSplitedByType2(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const { @@ -7343,17 +7274,6 @@ void MEDFileIntField1TS::setFieldProfile(const MEDCouplingFieldInt *field, const contentNotNull()->setFieldProfile(field2,field->getArray(),mesh,meshDimRelToMax,profile,*this,*contentNotNull()); } -DataArrayInt *MEDFileIntField1TS::ReturnSafelyDataArrayInt(MCAuto& arr) -{ - if(arr.isNull()) - throw INTERP_KERNEL::Exception("MEDFileIntField1TS::ReturnSafelyDataArrayInt : input DataArray is NULL !"); - DataArrayInt *arrC(dynamic_cast((DataArray *)arr)); - if(!arrC) - throw INTERP_KERNEL::Exception("MEDFileIntField1TS::ReturnSafelyDataArrayInt : input DataArray is not of type INT32 !"); - arrC->incrRef(); - return arrC; -} - MEDCouplingFieldInt *MEDFileIntField1TS::getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol) const { if(getFileName().empty()) @@ -7534,32 +7454,30 @@ MEDCouplingFieldInt *MEDFileIntField1TS::getFieldAtLevelOld(TypeOfField type, co return ret2.retn(); } -/*! - * Returns values and a profile of the field of a given type lying on a given support. - * For more info, see \ref AdvMEDLoaderAPIFieldRW - * \param [in] type - a spatial discretization of the field. - * \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities. - * \param [in] mesh - the supporting mesh. - * \param [out] pfl - a new instance of DataArrayInt holding ids of mesh entities the - * field of interest lies on. If the field lies on all entities of the given - * dimension, all ids in \a pfl are zero. The caller is to delete this array - * using decrRef() as it is no more needed. - * \return DataArrayInt * - a new instance of DataArrayInt holding values of the - * field. The caller is to delete this array using decrRef() as it is no more needed. - * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a mesh. - * \throw If no field of \a this is lying on \a mesh. - * \throw If no field values of the given \a type or given \a meshDimRelToMax are available. - */ -DataArrayInt *MEDFileIntField1TS::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const +//= MEDFileFloatField1TS + +MEDFileFloatField1TS::MEDFileFloatField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileTemplateField1TS(fid,loadAll,ms) { - MCAuto arr=contentNotNull()->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNull()); - return MEDFileIntField1TS::ReturnSafelyDataArrayInt(arr); } +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + +MEDFileFloatField1TS::MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileTemplateField1TS(fid,fieldName,loadAll,ms) +{ +} +catch(INTERP_KERNEL::Exception& e) +{ throw e; } -DataArrayInt *MEDFileIntField1TS::getUndergroundDataArray() const +MEDFileFloatField1TS::MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms) +try:MEDFileTemplateField1TS(fid,fieldName,iteration,order,loadAll,ms) { - return contentNotNull()->getUndergroundDataArrayTemplate(); } +catch(INTERP_KERNEL::Exception& e) +{ throw e; } + +//= MEDFileFloatField1TS //= MEDFileAnyTypeFieldMultiTSWithoutSDA @@ -10024,7 +9942,7 @@ DataArrayDouble *MEDFileFieldMultiTS::getFieldWithProfile(TypeOfField type, int if(!myF1TSC) throw INTERP_KERNEL::Exception("MEDFileFieldMultiTS::getFieldWithProfile : mismatch of type of field !"); MCAuto ret=myF1TSC->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNullBase()); - return MEDFileField1TS::ReturnSafelyDataArrayDouble(ret); + return MEDFileField1TS::ReturnSafelyTypedDataArray(ret); } const MEDFileFieldMultiTSWithoutSDA *MEDFileFieldMultiTS::contentNotNull() const @@ -10495,7 +10413,7 @@ DataArrayInt *MEDFileIntFieldMultiTS::getFieldWithProfile(TypeOfField type, int if(!myF1TSC) throw INTERP_KERNEL::Exception("MEDFileIntFieldMultiTS::getFieldWithProfile : mismatch of type of field ! INT32 expected !"); MCAuto ret=myF1TSC->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNullBase()); - return MEDFileIntField1TS::ReturnSafelyDataArrayInt(ret); + return MEDFileIntField1TS::ReturnSafelyTypedDataArray(ret); } /*! diff --git a/src/MEDLoader/MEDFileField.hxx b/src/MEDLoader/MEDFileField.hxx index 81136577f..40c0ecc4f 100644 --- a/src/MEDLoader/MEDFileField.hxx +++ b/src/MEDLoader/MEDFileField.hxx @@ -695,6 +695,7 @@ namespace MEDCoupling MEDLOADER_EXPORT typename Traits::ArrayType *getOrCreateAndGetArrayTemplate(); MEDLOADER_EXPORT typename Traits::ArrayType const *getOrCreateAndGetArrayTemplate() const; MEDLOADER_EXPORT typename Traits::ArrayType *getUndergroundDataArrayTemplate() const; + MEDLOADER_EXPORT typename Traits::ArrayType *getUndergroundDataArrayTemplateExt(std::vector< std::pair,std::pair > >& entries) const; MEDLOADER_EXPORT DataArray *getOrCreateAndGetArray(); MEDLOADER_EXPORT const DataArray *getOrCreateAndGetArray() const; MEDLOADER_EXPORT DataArray *getUndergroundDataArray() const; @@ -711,7 +712,6 @@ namespace MEDCoupling public: MEDLOADER_EXPORT const char *getTypeStr() const; MEDLOADER_EXPORT DataArray *getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const; - MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayDoubleExt(std::vector< std::pair,std::pair > >& entries) const; MEDLOADER_EXPORT std::vector< std::vector > getFieldSplitedByType2(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const; MEDLOADER_EXPORT static void CheckMeshDimRel(int meshDimRelToMax); MEDLOADER_EXPORT static std::vector CheckSBTMesh(const MEDCouplingMesh *mesh); @@ -878,6 +878,11 @@ namespace MEDCoupling MEDLOADER_EXPORT static typename MLFieldTraits::F1TSType *New(const std::string& fileName, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDLOADER_EXPORT static typename MLFieldTraits::F1TSType *New(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll=true); MEDLOADER_EXPORT static typename MLFieldTraits::F1TSType *New(const typename MLFieldTraits::F1TSWSDAType& other, bool shallowCopyOfContent); + public: + MEDLOADER_EXPORT static typename Traits::ArrayType *ReturnSafelyTypedDataArray(MCAuto& arr); + MEDLOADER_EXPORT typename Traits::ArrayType *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const; + MEDLOADER_EXPORT typename Traits::ArrayType *getUndergroundDataArray() const; + MEDLOADER_EXPORT typename Traits::ArrayType *getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const; protected: ~MEDFileTemplateField1TS() { } MEDFileTemplateField1TS(); @@ -904,21 +909,17 @@ namespace MEDCoupling MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const; MEDLOADER_EXPORT MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; - MEDLOADER_EXPORT DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const; // MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field); MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile); // direct forwarding to MEDFileField1TSWithoutSDA instance _content public: MEDLOADER_EXPORT MEDFileField1TS *shallowCpy() const; - MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArray() const; - MEDLOADER_EXPORT DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const; MEDLOADER_EXPORT std::vector< std::vector > getFieldSplitedByType2(const std::string& mname, std::vector& types, std::vector< std::vector >& typesF, std::vector< std::vector >& pfls, std::vector< std::vector >& locs) const; public: MEDLOADER_EXPORT static void SetDataArrayDoubleInField(MEDCouplingFieldDouble *f, MCAuto& arr); - MEDLOADER_EXPORT static DataArrayDouble *ReturnSafelyDataArrayDouble(MCAuto& arr); public: MEDLOADER_EXPORT MEDFileField1TS *extractPart(const std::map >& extractDef, MEDFileMesh *mm) const; private: @@ -945,13 +946,10 @@ namespace MEDCoupling MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const; MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const; MEDLOADER_EXPORT MEDCouplingFieldInt *getFieldAtLevelOld(TypeOfField type, const std::string& mname, int meshDimRelToMax, int renumPol=0) const; - MEDLOADER_EXPORT DataArrayInt *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const; // MEDLOADER_EXPORT void setFieldNoProfileSBT(const MEDCouplingFieldInt *field); MEDLOADER_EXPORT void setFieldProfile(const MEDCouplingFieldInt *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile); - MEDLOADER_EXPORT DataArrayInt *getUndergroundDataArray() const; public: - MEDLOADER_EXPORT static DataArrayInt *ReturnSafelyDataArrayInt(MCAuto& arr); MEDLOADER_EXPORT static MCAuto SetDataArrayDoubleInIntField(MEDCouplingFieldDouble *f, MCAuto& arr); MEDLOADER_EXPORT static MCAuto ConvertFieldIntToFieldDouble(const MEDCouplingFieldInt *f); public: @@ -967,6 +965,18 @@ namespace MEDCoupling MEDFileIntField1TS(const MEDFileIntField1TSWithoutSDA& other, bool shallowCopyOfContent); }; + class MEDFileFloatField1TS : public MEDFileTemplateField1TS + { + friend class MEDFileTemplateField1TS; + private: + ~MEDFileFloatField1TS() { } + MEDFileFloatField1TS() { } + MEDFileFloatField1TS(med_idt fid, bool loadAll, const MEDFileMeshes *ms); + MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, bool loadAll, const MEDFileMeshes *ms); + MEDFileFloatField1TS(med_idt fid, const std::string& fieldName, int iteration, int order, bool loadAll, const MEDFileMeshes *ms); + MEDFileFloatField1TS(const MEDFileFloatField1TSWithoutSDA& other, bool shallowCopyOfContent); + }; + class MEDFileAnyTypeFieldMultiTSWithoutSDA : public RefCountObject, public MEDFileFieldNameScope { protected: diff --git a/src/MEDLoader/MEDFileField.txx b/src/MEDLoader/MEDFileField.txx index 639bc1ab9..aaf738328 100644 --- a/src/MEDLoader/MEDFileField.txx +++ b/src/MEDLoader/MEDFileField.txx @@ -106,6 +106,33 @@ namespace MEDCoupling return 0; } + /*! + * Returns a pointer to the underground DataArrayDouble instance and a + * sequence describing parameters of a support of each part of \a this field. The + * caller should not decrRef() the returned DataArrayDouble. This method allows for a + * direct access to the field values. This method is intended for the field lying on one + * mesh only. + * \param [in,out] entries - the sequence describing parameters of a support of each + * part of \a this field. Each item of this sequence consists of two parts. The + * first part describes a type of mesh entity and an id of discretization of a + * current field part. The second part describes a range of values [begin,end) + * within the returned array relating to the current field part. + * \return DataArrayDouble * - the pointer to the field values array. + * \throw If the number of underlying meshes is not equal to 1. + * \throw If no field values are available. + * \sa getUndergroundDataArrayTemplate() + */ + template + typename Traits::ArrayType *MEDFileField1TSTemplateWithoutSDA::getUndergroundDataArrayTemplateExt(std::vector< std::pair,std::pair > >& entries) const + { + if(this->_field_per_mesh.size()!=1) + throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : field lies on several meshes, this method has no sense !"); + if(this->_field_per_mesh[0]==0) + throw INTERP_KERNEL::Exception("MEDFileField1TSWithoutSDA::getUndergroundDataArrayExt : no field specified !"); + this->_field_per_mesh[0]->getUndergroundDataArrayExt(entries); + return getUndergroundDataArrayTemplate(); + } + /*! * Returns a pointer to the underground DataArrayDouble instance. So the * caller should not decrRef() it. This method allows for a direct access to the field @@ -291,7 +318,10 @@ namespace MEDCoupling throw INTERP_KERNEL::Exception("MEDFileTemplateField1TS::contentNotNull : the content pointer is null !"); const typename MLFieldTraits::F1TSWSDAType *ret(dynamic_cast::F1TSWSDAType *>(pt)); if(!ret) - throw INTERP_KERNEL::Exception("MEDFileTemplateField1TS::contentNotNull : the content pointer is not null but it is not of type double ! Reason is maybe that the read field has not the type FLOAT64 !"); + { + std::ostringstream oss; oss << "MEDFileTemplateField1TS::contentNotNull : the content pointer is not null but it is not of type double ! Reason is maybe that the read field has not the type " << MLFieldTraits::F1TSWSDAType::TYPE_STR; + throw INTERP_KERNEL::Exception(oss.str()); + } return ret; } @@ -303,9 +333,59 @@ namespace MEDCoupling throw INTERP_KERNEL::Exception("MEDFileTemplateField1TS::contentNotNull : the non const content pointer is null !"); typename MLFieldTraits::F1TSWSDAType *ret(dynamic_cast::F1TSWSDAType *>(pt)); if(!ret) - throw INTERP_KERNEL::Exception("MEDFileTemplateField1TS::contentNotNull : the non const content pointer is not null but it is not of type double ! Reason is maybe that the read field has not the type FLOAT64 !"); + { + std::ostringstream oss; oss << "MEDFileTemplateField1TS::contentNotNull : the non const content pointer is not null but it is not of type double ! Reason is maybe that the read field has not the type " << MLFieldTraits::F1TSWSDAType::TYPE_STR; + throw INTERP_KERNEL::Exception(oss.str()); + } return ret; } + + template + typename Traits::ArrayType *MEDFileTemplateField1TS::ReturnSafelyTypedDataArray(MCAuto& arr) + { + if(arr.isNull()) + throw INTERP_KERNEL::Exception("MEDFileField1TS::ReturnSafelyTypedDataArray : no array !"); + typename Traits::ArrayType *arrOutC(dynamic_cast::ArrayType *>((DataArray*)arr)); + if(!arrOutC) + throw INTERP_KERNEL::Exception("MEDFileField1TS::ReturnSafelyTypedDataArray : mismatch between dataArrays type and MEDFileField1TS ! Expected double !"); + arrOutC->incrRef(); + return arrOutC; + } + + /*! + * Returns values and a profile of the field of a given type lying on a given support. + * For more info, see \ref AdvMEDLoaderAPIFieldRW + * \param [in] type - a spatial discretization of the field. + * \param [in] meshDimRelToMax - a relative dimension of the supporting mesh entities. + * \param [in] mesh - the supporting mesh. + * \param [out] pfl - a new instance of DataArrayInt holding ids of mesh entities the + * field of interest lies on. If the field lies on all entities of the given + * dimension, all ids in \a pfl are zero. The caller is to delete this array + * using decrRef() as it is no more needed. + * \return DataArrayInt * - a new instance of DataArrayInt holding values of the + * field. The caller is to delete this array using decrRef() as it is no more needed. + * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a mesh. + * \throw If no field of \a this is lying on \a mesh. + * \throw If no field values of the given \a type or given \a meshDimRelToMax are available. + */ + template + typename Traits::ArrayType *MEDFileTemplateField1TS::getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const + { + MCAuto arr(contentNotNull()->getFieldWithProfile(type,meshDimRelToMax,mesh,pfl,this,*contentNotNull())); + return ReturnSafelyTypedDataArray(arr); + } + + template + typename Traits::ArrayType *MEDFileTemplateField1TS::getUndergroundDataArray() const + { + return contentNotNull()->getUndergroundDataArrayTemplate(); + } + + template + typename Traits::ArrayType *MEDFileTemplateField1TS::getUndergroundDataArrayExt(std::vector< std::pair,std::pair > >& entries) const + { + return contentNotNull()->getUndergroundDataArrayTemplateExt(entries); + } } #endif diff --git a/src/MEDLoader/MEDLoaderTraits.hxx b/src/MEDLoader/MEDLoaderTraits.hxx index 73f6a4e3f..60617cd47 100644 --- a/src/MEDLoader/MEDLoaderTraits.hxx +++ b/src/MEDLoader/MEDLoaderTraits.hxx @@ -35,6 +35,7 @@ namespace MEDCoupling class MEDFileField1TS; class MEDFileIntFieldMultiTS; class MEDFileIntField1TS; + class MEDFileFloatField1TS; class MEDFileField1TSWithoutSDA; class MEDFileIntField1TSWithoutSDA; class MEDFileFloatField1TSWithoutSDA; @@ -51,7 +52,7 @@ namespace MEDCoupling struct MEDLOADER_EXPORT MLFieldTraits { //typedef MEDFileFloatFieldMultiTS FMTSType; - //typedef MEDFileFloatField1TS F1TSType; + typedef MEDFileFloatField1TS F1TSType; typedef MEDFileFloatField1TSWithoutSDA F1TSWSDAType; };