Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
ParaMEDMEM::MEDCouplingDefinitionTimeSliceCstOnTI 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
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
 MEDCouplingDefinitionTimeSliceCstOnTI (const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId) throw (INTERP_KERNEL::Exception)

Static Public Member Functions

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

Protected Member Functions

 MEDCouplingDefinitionTimeSliceCstOnTI ()

Protected Attributes

double _start
double _end

Detailed Description

Definition at line 89 of file MEDCouplingDefinitionTime.hxx.


Constructor & Destructor Documentation

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

Definition at line 310 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 107 of file MEDCouplingDefinitionTime.hxx.

{ }

Here is the caller graph for this function:


Member Function Documentation

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

Definition at line 275 of file MEDCouplingDefinitionTime.cxx.

{
  stream << "Constant on time interval [" << _start << "," << _end << "]";
  MEDCouplingDefinitionTimeSlice::appendRepr(stream);
}
MEDCouplingDefinitionTimeSlice * MEDCouplingDefinitionTimeSliceCstOnTI::copy ( ) const

Definition at line 239 of file MEDCouplingDefinitionTime.cxx.

Here is the call graph for this function:

Definition at line 286 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 256 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 262 of file MEDCouplingDefinitionTime.cxx.

{
  meshId=_mesh_id;
  arrId=_array_id;
  arrIdInField=0;
  fieldId=_field_id;
}

Definition at line 281 of file MEDCouplingDefinitionTime.cxx.

{
  return _start;
}

Definition at line 305 of file MEDCouplingDefinitionTime.cxx.

void MEDCouplingDefinitionTimeSliceCstOnTI::getTinySerializationInformation ( std::vector< int > &  tiI,
std::vector< double > &  tiD 
) const

Definition at line 291 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 270 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 244 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 232 of file MEDCouplingDefinitionTime.cxx.

Here is the call graph for this function:

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

Definition at line 299 of file MEDCouplingDefinitionTime.cxx.

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

Here is the caller graph for this function:


Member Data Documentation

Definition at line 110 of file MEDCouplingDefinitionTime.hxx.

Definition at line 109 of file MEDCouplingDefinitionTime.hxx.


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