Back to index

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

Static Public Member Functions

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

Protected Member Functions

 MEDCouplingDefinitionTimeSliceInst ()

Protected Attributes

double _instant

Detailed Description

Definition at line 66 of file MEDCouplingDefinitionTime.hxx.


Constructor & Destructor Documentation

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

Definition at line 221 of file MEDCouplingDefinitionTime.cxx.

                                                                                                                                                                       :MEDCouplingDefinitionTimeSlice(f,meshId,arrId,fieldId)
{
  int tmp1,tmp2;
  double t1=f->getStartTime(tmp1,tmp2);
  double t2=f->getEndTime(tmp1,tmp2);
  double eps=f->getTimeTolerance();
  if(fabs(t1-t2)>eps)
    throw INTERP_KERNEL::Exception("MEDCouplingDefinitionTimeSliceInst : times differs in this");
  _instant=t1;
}

Definition at line 84 of file MEDCouplingDefinitionTime.hxx.

{ }

Here is the caller graph for this function:


Member Function Documentation

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

Definition at line 205 of file MEDCouplingDefinitionTime.cxx.

{
  stream << "single point " << _instant;
  MEDCouplingDefinitionTimeSlice::appendRepr(stream);
}
MEDCouplingDefinitionTimeSlice * MEDCouplingDefinitionTimeSliceInst::copy ( ) const

Definition at line 171 of file MEDCouplingDefinitionTime.cxx.

{
  return new MEDCouplingDefinitionTimeSliceInst(*this);
}

Here is the call graph for this function:

Definition at line 216 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 186 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 192 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 211 of file MEDCouplingDefinitionTime.cxx.

{
  return _instant;
}

Definition at line 166 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 152 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 200 of file MEDCouplingDefinitionTime.cxx.

{
  return fabs(tmp-_instant)<eps;
}
bool MEDCouplingDefinitionTimeSliceInst::isEqual ( const MEDCouplingDefinitionTimeSlice &  other,
double  eps 
) const

Definition at line 176 of file MEDCouplingDefinitionTime.cxx.

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

Definition at line 145 of file MEDCouplingDefinitionTime.cxx.

Here is the call graph for this function:

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

Definition at line 160 of file MEDCouplingDefinitionTime.cxx.

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

Here is the caller graph for this function:


Member Data Documentation

Definition at line 86 of file MEDCouplingDefinitionTime.hxx.


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