Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[EDF27988] : Implementation of MEDCouplingUMesh.explodeMeshTo for MEDFileUMesh.reduce...
[tools/medcoupling.git]
/
src
/
MEDCoupling
/
MEDCouplingDefinitionTime.cxx
diff --git
a/src/MEDCoupling/MEDCouplingDefinitionTime.cxx
b/src/MEDCoupling/MEDCouplingDefinitionTime.cxx
index c3f5f5cfbe193872935136cea4464480cbdb50e3..1a490f65647447c60a8fa15dd58a42b82a391431 100644
(file)
--- a/
src/MEDCoupling/MEDCouplingDefinitionTime.cxx
+++ b/
src/MEDCoupling/MEDCouplingDefinitionTime.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
14 CEA/DEN, EDF R&D
+// Copyright (C) 2007-20
23 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
@@
-23,7
+23,7
@@
#include <cmath>
#include <cmath>
-using namespace
ParaMEDMEM
;
+using namespace
MEDCoupling
;
const double MEDCouplingDefinitionTime::EPS_DFT=1e-15;
const double MEDCouplingDefinitionTime::EPS_DFT=1e-15;
@@
-33,7
+33,7
@@
MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(const MEDCou
if(!f)
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : empty field !");
switch(f->getTimeDiscretization())
if(!f)
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : empty field !");
switch(f->getTimeDiscretization())
-
{
+ {
case ONE_TIME:
{
if(arrId.size()!=1)
case ONE_TIME:
{
if(arrId.size()!=1)
@@
-53,16
+53,16
@@
MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(const MEDCou
return new MEDCouplingDefinitionTimeSliceLT(f,meshId,arrId[0],arrId[1],fieldId);
}
case NO_TIME:
return new MEDCouplingDefinitionTimeSliceLT(f,meshId,arrId[0],arrId[1],fieldId);
}
case NO_TIME:
- throw INTERP_KERNEL::Exception("Invalid
e
time discretization ! NO_TIME ! Impossible to build a definition time slice !");
+ throw INTERP_KERNEL::Exception("Invalid time discretization ! NO_TIME ! Impossible to build a definition time slice !");
default:
default:
- throw INTERP_KERNEL::Exception("Invalid
e
time discretization : Not recognized !");
-
}
+ throw INTERP_KERNEL::Exception("Invalid time discretization : Not recognized !");
+ }
}
MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(TypeOfTimeDiscretization type, const std::vector<int>& tiI, const std::vector<double>& tiD)
{
switch(type)
}
MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(TypeOfTimeDiscretization type, const std::vector<int>& tiI, const std::vector<double>& tiD)
{
switch(type)
-
{
+ {
case ONE_TIME:
return MEDCouplingDefinitionTimeSliceInst::New(tiI,tiD);
case CONST_ON_TIME_INTERVAL:
case ONE_TIME:
return MEDCouplingDefinitionTimeSliceInst::New(tiI,tiD);
case CONST_ON_TIME_INTERVAL:
@@
-71,7
+71,7
@@
MEDCouplingDefinitionTimeSlice *MEDCouplingDefinitionTimeSlice::New(TypeOfTimeDi
return MEDCouplingDefinitionTimeSliceLT::New(tiI,tiD);
default:
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : unrecognized time discretization type !");
return MEDCouplingDefinitionTimeSliceLT::New(tiI,tiD);
default:
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSlice::New : unrecognized time discretization type !");
-
}
+ }
}
bool MEDCouplingDefinitionTimeSlice::isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const
}
bool MEDCouplingDefinitionTimeSlice::isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const
@@
-114,7
+114,7
@@
std::size_t MEDCouplingDefinitionTimeSlice::getHeapMemorySizeWithoutChildren() c
return 0;
}
return 0;
}
-std::vector<const BigMemoryObject *> MEDCouplingDefinitionTimeSlice::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingDefinitionTimeSlice::getDirectChildren
WithNull
() const
{
return std::vector<const BigMemoryObject *>();
}
{
return std::vector<const BigMemoryObject *>();
}
@@
-446,11
+446,11
@@
MEDCouplingDefinitionTime::MEDCouplingDefinitionTime(const std::vector<const MED
if(sz!=arrRefs.size())
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : internal error ! should never happen !");
_slices.resize(sz);
if(sz!=arrRefs.size())
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : internal error ! should never happen !");
_slices.resize(sz);
- for(
std::size_t i=0;i<sz
;i++)
+ for(
int i=0;i<ToIdType(sz)
;i++)
{
if(arrRefs.empty())
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : A field is null in list impossible to build a time definition !");
{
if(arrRefs.empty())
throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTime constructor : A field is null in list impossible to build a time definition !");
- _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],
(int)
i);
+ _slices[i]=MEDCouplingDefinitionTimeSlice::New(fs[i],meshRefs[i],arrRefs[i],i);
}
if(sz<=1)
return ;
}
if(sz<=1)
return ;
@@
-474,7
+474,7
@@
std::size_t MEDCouplingDefinitionTime::getHeapMemorySizeWithoutChildren() const
return _slices.capacity()*(sizeof(MEDCouplingDefinitionTimeSlice)+sizeof(int));
}
return _slices.capacity()*(sizeof(MEDCouplingDefinitionTimeSlice)+sizeof(int));
}
-std::vector<const BigMemoryObject *> MEDCouplingDefinitionTime::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDCouplingDefinitionTime::getDirectChildren
WithNull
() const
{
return std::vector<const BigMemoryObject *>();
}
{
return std::vector<const BigMemoryObject *>();
}
@@
-528,7
+528,7
@@
void MEDCouplingDefinitionTime::getIdsOnTime(double tm, std::vector<int>& meshId
{
std::vector<int> ids;
int id=0;
{
std::vector<int> ids;
int id=0;
- for(std::vector< M
EDCouplingAutoRefCountObjectPtr
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++,id++)
+ for(std::vector< M
CAuto
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++,id++)
if((*it)->isContaining(tm,_eps))
ids.push_back(id);
if(ids.empty())
if((*it)->isContaining(tm,_eps))
ids.push_back(id);
if(ids.empty())
@@
-548,7
+548,7
@@
void MEDCouplingDefinitionTime::getIdsOnTime(double tm, std::vector<int>& meshId
std::vector<double> MEDCouplingDefinitionTime::getHotSpotsTime() const
{
std::vector<double> ret;
std::vector<double> MEDCouplingDefinitionTime::getHotSpotsTime() const
{
std::vector<double> ret;
- for(std::vector< M
EDCouplingAutoRefCountObjectPtr
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++)
+ for(std::vector< M
CAuto
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++)
{
std::vector<double> tmp;
(*it)->getHotSpotsTime(tmp);
{
std::vector<double> tmp;
(*it)->getHotSpotsTime(tmp);
@@
-568,7
+568,7
@@
std::vector<double> MEDCouplingDefinitionTime::getHotSpotsTime() const
void MEDCouplingDefinitionTime::appendRepr(std::ostream& stream) const
{
stream << "Time definition :\n";
void MEDCouplingDefinitionTime::appendRepr(std::ostream& stream) const
{
stream << "Time definition :\n";
- for(std::vector< M
EDCouplingAutoRefCountObjectPtr
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++)
+ for(std::vector< M
CAuto
<MEDCouplingDefinitionTimeSlice> >::const_iterator it=_slices.begin();it!=_slices.end();it++)
{
stream << " - ";
(*it)->appendRepr(stream);
{
stream << " - ";
(*it)->appendRepr(stream);