Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
ParaMEDMEM::MEDCouplingDefinitionTimeSliceLT Class Reference

#include <MEDCouplingDefinitionTime.hxx>

List of all members.

Public Member Functions

MEDCouplingDefinitionTimeSlice * copy () const
bool isEqual (const MEDCouplingDefinitionTimeSlice &other, double eps) const
void getHotSpotsTime (std::vector< double > &ret) const
void getIdsOnTime (double tm, double eps, int &meshId, int &arrId, int &arrIdInField, int &fieldId) const throw (INTERP_KERNEL::Exception)
bool isContaining (double tmp, double eps) const
void appendRepr (std::ostream &stream) const
double getStartTime () const
double getEndTime () const
int getEndId () const
void getTinySerializationInformation (std::vector< int > &tiI, std::vector< double > &tiD) const
void unserialize (const std::vector< int > &tiI, const std::vector< double > &tiD)
TypeOfTimeDiscretization getTimeType () const
 MEDCouplingDefinitionTimeSliceLT (const MEDCouplingFieldDouble *f, int meshId, int arrId, int arr2Id, int fieldId) throw (INTERP_KERNEL::Exception)

Static Public Member Functions

static
MEDCouplingDefinitionTimeSliceLT
New (const std::vector< int > &tiI, const std::vector< double > &tiD)

Protected Member Functions

 MEDCouplingDefinitionTimeSliceLT ()

Protected Attributes

int _array_id_end
double _start
double _end

Detailed Description

Definition at line 113 of file MEDCouplingDefinitionTime.hxx.


Constructor & Destructor Documentation

MEDCouplingDefinitionTimeSliceLT::MEDCouplingDefinitionTimeSliceLT ( const MEDCouplingFieldDouble f,
int  meshId,
int  arrId,
int  arr2Id,
int  fieldId 
) throw (INTERP_KERNEL::Exception)

Definition at line 419 of file MEDCouplingDefinitionTime.cxx.

                                                                                                                                                                               :MEDCouplingDefinitionTimeSlice(f,meshId,arrId,fieldId),_array_id_end(arr2Id)
{
  int tmp1,tmp2;
  double t1=f->getStartTime(tmp1,tmp2);
  double t2=f->getEndTime(tmp1,tmp2);
  _start=t1;
  _end=t2;
}

Definition at line 132 of file MEDCouplingDefinitionTime.hxx.

{ }

Here is the caller graph for this function:


Member Function Documentation

void MEDCouplingDefinitionTimeSliceLT::appendRepr ( std::ostream &  stream) const

Definition at line 378 of file MEDCouplingDefinitionTime.cxx.

{
  stream << "Linear on time interval [" << _start << "," << _end << "]";
  MEDCouplingDefinitionTimeSlice::appendRepr(stream);
  stream << " EndArrayId : " << _array_id_end;
}
MEDCouplingDefinitionTimeSlice * MEDCouplingDefinitionTimeSliceLT::copy ( ) const

Definition at line 326 of file MEDCouplingDefinitionTime.cxx.

{
  return new MEDCouplingDefinitionTimeSliceLT(*this);
}

Here is the call graph for this function:

Definition at line 395 of file MEDCouplingDefinitionTime.cxx.

{
  return _array_id_end;
}

Definition at line 390 of file MEDCouplingDefinitionTime.cxx.

{
  return _end;
}
void MEDCouplingDefinitionTimeSliceLT::getHotSpotsTime ( std::vector< double > &  ret) const

Definition at line 345 of file MEDCouplingDefinitionTime.cxx.

{
  ret.resize(2);
  ret[0]=_start;
  ret[1]=_end;
}
void MEDCouplingDefinitionTimeSliceLT::getIdsOnTime ( double  tm,
double  eps,
int &  meshId,
int &  arrId,
int &  arrIdInField,
int &  fieldId 
) const throw (INTERP_KERNEL::Exception)

Definition at line 352 of file MEDCouplingDefinitionTime.cxx.

{
  if(fabs(tm-_start)<eps)
    {
      meshId=_mesh_id;
      arrId=_array_id;
      arrIdInField=0;
      fieldId=_field_id;
      return ;
    }
  if(fabs(tm-_end)<eps)
    {
      meshId=_mesh_id;
      arrId=_array_id_end;
      arrIdInField=1;
      fieldId=_field_id;
      return ;
    }
  throw INTERP_KERNEL::Exception("LinearTime request not in boundary of this ! use hot spots !");
}

Definition at line 385 of file MEDCouplingDefinitionTime.cxx.

{
  return _start;
}

Definition at line 414 of file MEDCouplingDefinitionTime.cxx.

{
  return LINEAR_TIME;
}
void MEDCouplingDefinitionTimeSliceLT::getTinySerializationInformation ( std::vector< int > &  tiI,
std::vector< double > &  tiD 
) const

Definition at line 400 of file MEDCouplingDefinitionTime.cxx.

{
  tiI.resize(4);
  tiI[0]=_mesh_id; tiI[1]=_array_id; tiI[2]=_field_id; tiI[3]=_array_id_end;
  tiD.resize(2);
  tiD[0]=_start; tiD[1]=_end;
}
bool MEDCouplingDefinitionTimeSliceLT::isContaining ( double  tmp,
double  eps 
) const

Definition at line 373 of file MEDCouplingDefinitionTime.cxx.

{
  return _start-eps<tmp && _end+eps>tmp;
}
bool MEDCouplingDefinitionTimeSliceLT::isEqual ( const MEDCouplingDefinitionTimeSlice &  other,
double  eps 
) const

Definition at line 331 of file MEDCouplingDefinitionTime.cxx.

{
  if(!MEDCouplingDefinitionTimeSlice::isEqual(other,eps))
    return false;
  const MEDCouplingDefinitionTimeSliceLT *otherC=dynamic_cast<const MEDCouplingDefinitionTimeSliceLT *>(&other);
  if(!otherC)
    return false;
  if(_array_id_end!=otherC->_array_id_end)
    return false;
  if(fabs(otherC->_start-_start)>eps)
    return false;
  return fabs(otherC->_end-_end)<eps;
}
MEDCouplingDefinitionTimeSliceLT * MEDCouplingDefinitionTimeSliceLT::New ( const std::vector< int > &  tiI,
const std::vector< double > &  tiD 
) [static]

Definition at line 319 of file MEDCouplingDefinitionTime.cxx.

Here is the call graph for this function:

void MEDCouplingDefinitionTimeSliceLT::unserialize ( const std::vector< int > &  tiI,
const std::vector< double > &  tiD 
)

Definition at line 408 of file MEDCouplingDefinitionTime.cxx.

{
  _mesh_id=tiI[0]; _array_id=tiI[1]; _field_id=tiI[2]; _array_id_end=tiI[3];
  _start=tiD[0]; _end=tiD[1];
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 134 of file MEDCouplingDefinitionTime.hxx.

Definition at line 136 of file MEDCouplingDefinitionTime.hxx.

Definition at line 135 of file MEDCouplingDefinitionTime.hxx.


The documentation for this class was generated from the following files: