X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileFieldMultiTS.cxx;h=26bdcb1be1ed9246c0211f8f11c41c35c905b3f0;hb=88916ccf9c681624b682d10a62c1ee376324c946;hp=391980a0efcf91185a42c1c679775c885f14aa44;hpb=a3441fbd891eaf503e6888496246b01760b41fd7;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileFieldMultiTS.cxx b/src/MEDLoader/MEDFileFieldMultiTS.cxx index 391980a0e..26bdcb1be 100644 --- a/src/MEDLoader/MEDFileFieldMultiTS.cxx +++ b/src/MEDLoader/MEDFileFieldMultiTS.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2017 CEA/DEN, EDF R&D +// Copyright (C) 2017-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -702,9 +702,9 @@ std::vector< std::pair > MEDFileAnyTypeFieldMultiTSWithoutSDA::getItera * * If 'this' is empty this method will throw an INTERP_KERNEL::Exception. * If there is \b only node fields defined in 'this' -1 is returned and 'levs' output parameter will be empty. In this - * case the caller has to know the underlying mesh it refers to. By defaut it is the level 0 of the corresponding mesh. + * case the caller has to know the underlying mesh it refers to. By default it is the level 0 of the corresponding mesh. * - * This method is usefull to make the link between meshDimension of the underlying mesh in 'this' and the levels on 'this'. + * This method is useful to make the link between meshDimension of the underlying mesh in 'this' and the levels on 'this'. * It is possible (even if it is not common) that the highest level in 'this' were not equal to the meshDimension of the underlying mesh in 'this'. * * Let's consider the typical following case : @@ -885,7 +885,7 @@ std::vector< MCAuto > MEDFileAnyTypeFieldM /*! * This method splits into discretization each time steps in \a this. - * ** WARNING ** the returned instances are not compulsary defined on the same time steps series ! + * ** WARNING ** the returned instances are not compulsory defined on the same time steps series ! */ std::vector< MCAuto > MEDFileAnyTypeFieldMultiTSWithoutSDA::splitDiscretizations() const { @@ -1040,30 +1040,28 @@ void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldNoProfileSBT(const MEDCoup throw INTERP_KERNEL::Exception("MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldNoProfileSBT : input field is NULL !"); if(!_time_steps.empty()) checkCoherencyOfTinyInfo(field,arr); - MEDFileAnyTypeField1TSWithoutSDA *objC(createNew1TSWithoutSDAEmptyInstance()); - MCAuto obj(objC); + MCAuto obj(createNew1TSWithoutSDAEmptyInstance()); { MCAuto ft(MEDCouplingFieldTemplate::New(*field)); - objC->setFieldNoProfileSBT(field->timeDiscrSafe(),ft,arr,glob,*this); + obj->setFieldNoProfileSBT(field->timeDiscrSafe(),ft,arr,glob,*this); } copyTinyInfoFrom(field,arr); _time_steps.push_back(obj); } -void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob) +void MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldProfile(const MEDCouplingFieldDouble *field, const DataArray *arr, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal& glob, bool smartPflKiller) { if(!field) throw INTERP_KERNEL::Exception("MEDFileIntFieldMultiTSWithoutSDA::appendFieldNoProfileSBT : input field is NULL !"); if(!_time_steps.empty()) checkCoherencyOfTinyInfo(field,arr); - MEDFileAnyTypeField1TSWithoutSDA *objC=createNew1TSWithoutSDAEmptyInstance(); - MCAuto obj(objC); + MCAuto obj(createNew1TSWithoutSDAEmptyInstance()); { MCAuto ft(MEDCouplingFieldTemplate::NewWithoutCheck(*field)); - objC->setFieldProfile(field->timeDiscrSafe(),ft,arr,mesh,meshDimRelToMax,profile,glob,*this); + obj->setFieldProfile(field->timeDiscrSafe(),ft,arr,mesh,meshDimRelToMax,profile,glob,*this,smartPflKiller); } copyTinyInfoFrom(field,arr); - setMeshName(objC->getMeshName()); + setMeshName(obj->getMeshName()); _time_steps.push_back(obj); } @@ -1608,7 +1606,7 @@ void MEDFileAnyTypeFieldMultiTS::unloadArrays() /*! * This method potentially releases big data arrays if \a this is coming from a file. If \a this has been built from scratch this method will have no effect. - * This method is the symetrical method of MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary. + * This method is the symmetrical method of MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary. * This method is useful to reduce \b safely amount of heap memory necessary for \a this by using MED file as database. * * \sa MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary @@ -1641,8 +1639,8 @@ std::vector MEDFileAnyTypeFieldMultiTS::getDirectChildr /*! * This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of components in \a this. - * The returned instances are deep copy of \a this except that for globals that are share with those contained in \a this. - * ** WARNING ** do no forget to rename the ouput instances to avoid to write n-times in the same MED file field ! + * The returned instances are deep copy of \a this except that for globals that are shared with those contained in \a this. + * ** WARNING ** do no forget to rename the output instances to avoid to write n-times in the same MED file field ! */ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitComponents() const { @@ -1662,7 +1660,7 @@ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS:: /*! * This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of discretizations over time steps in \a this. - * The returned instances are shallow copied of \a this included globals that are share with those contained in \a this. + * The returned instances are shallow copied of \a this included globals that are shared with those contained in \a this. */ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitDiscretizations() const { @@ -1682,7 +1680,7 @@ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS:: /*! * This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of sub-discretizations over time steps in \a this. - * The returned instances are shallow copied of \a this included globals that are share with those contained in \a this. + * The returned instances are shallow copied of \a this included globals that are shared with those contained in \a this. */ std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitMultiDiscrPerGeoTypes() const {