Back to index

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

#include <LinearTimeInterpolator.hxx>

Inheritance diagram for ParaMEDMEM::LinearTimeInterpolator:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::LinearTimeInterpolator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LinearTimeInterpolator (double InterpPrecision=0, int nStepBefore=1, int nStepAfter=1)
virtual ~LinearTimeInterpolator ()
void doInterp (double time0, double time1, double time, int recvcount, int nbuff0, int nbuff1, int **recvbuff0, int **recvbuff1, int *result)
void doInterp (double time0, double time1, double time, int recvcount, int nbuff0, int nbuff1, double **recvbuff0, double **recvbuff1, double *result)
void setInterpParams (double InterpPrecision, int nStepBefore=1, int nStepAfter=1)
void steps (int &nStepBefore, int &nStepAfter)

Protected Attributes

double _interp_precision
int _n_step_before
int _n_step_after

Detailed Description

Definition at line 32 of file LinearTimeInterpolator.hxx.


Constructor & Destructor Documentation

ParaMEDMEM::LinearTimeInterpolator::LinearTimeInterpolator ( double  InterpPrecision = 0,
int  nStepBefore = 1,
int  nStepAfter = 1 
)

Definition at line 27 of file LinearTimeInterpolator.cxx.

                                                                  :
    TimeInterpolator( InterpPrecision, nStepBefore, nStepAfter )
  {
  }

Definition at line 33 of file LinearTimeInterpolator.cxx.

  {
  } 

Member Function Documentation

void ParaMEDMEM::LinearTimeInterpolator::doInterp ( double  time0,
double  time1,
double  time,
int  recvcount,
int  nbuff0,
int  nbuff1,
int **  recvbuff0,
int **  recvbuff1,
int *  result 
) [virtual]

Implements ParaMEDMEM::TimeInterpolator.

Definition at line 37 of file LinearTimeInterpolator.cxx.

  {
    for(int i = 0 ; i < recvcount ; i++ )
        result[i] = (int) ((recvbuff0[0][i]*(time1 - time) + recvbuff1[0][i]*(time - time0))/(time1 - time0) + _interp_precision);
  }
void ParaMEDMEM::LinearTimeInterpolator::doInterp ( double  time0,
double  time1,
double  time,
int  recvcount,
int  nbuff0,
int  nbuff1,
double **  recvbuff0,
double **  recvbuff1,
double *  result 
) [virtual]

Implements ParaMEDMEM::TimeInterpolator.

Definition at line 45 of file LinearTimeInterpolator.cxx.

  {
    for(int i = 0 ; i < recvcount ; i++ )
      result[i] = (recvbuff0[0][i]*(time1 - time) + recvbuff1[0][i]*(time - time0))/(time1 - time0);
  }
void ParaMEDMEM::TimeInterpolator::setInterpParams ( double  InterpPrecision,
int  nStepBefore = 1,
int  nStepAfter = 1 
) [inline, inherited]

Definition at line 36 of file TimeInterpolator.hxx.

{ _interp_precision=InterpPrecision; _n_step_before=nStepBefore; _n_step_after=nStepAfter; }
void ParaMEDMEM::TimeInterpolator::steps ( int &  nStepBefore,
int &  nStepAfter 
) [inline, inherited]

Definition at line 37 of file TimeInterpolator.hxx.

{ nStepBefore=_n_step_before; nStepAfter=_n_step_after ; }

Member Data Documentation

double ParaMEDMEM::TimeInterpolator::_interp_precision [protected, inherited]

Definition at line 45 of file TimeInterpolator.hxx.

int ParaMEDMEM::TimeInterpolator::_n_step_after [protected, inherited]

Definition at line 47 of file TimeInterpolator.hxx.

Definition at line 46 of file TimeInterpolator.hxx.


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