openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Macros | Enumerations | Functions | Variables
IGBops.cc File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <iostream>
#include "IGBheader.h"
#include <assert.h>
#include "ops_cmdline.h"
#include <vector>
#include "muParser.h"
Include dependency graph for IGBops.cc:

Go to the source code of this file.

Classes

class  Interp
 Interpolate class. More...
 

Macros

#define data_t   float
 

Enumerations

enum  Data_file_t {
  NONE =0 , SPACE_TIME =5 , SPACE =4 , PT_TIME =3 ,
  PT =2 , TIME =1
}
 

Functions

void output_scratch (data_t *s, FILE *out, int n, bool bin)
 
void output_scratch (vector< data_t > &s, FILE *out, bool bin)
 
bool overlap (IGBheader *first, IGBheader *second)
 
void joinXY (IGBheader *h1, IGBheader *h2, IGBheader *hout)
 
void join_space (data_t *x, int nx, data_t *y, int ny, FILE *out)
 
void eval_expr (data_t *x, int n, char *expr, FILE *out, data_t *result)
 
template<class T >
void eval_expr (data_t *x0, T *x1, int n, char *expr, FILE *out, int nc=0)
 
void center_diff (data_t *x, int slsz, vector< data_t > &odat, int t, float dt, FILE *out)
 
void forward_diff (data_t *x, int slsz, vector< data_t > &old, int t, float dt, FILE *out)
 
void aXPLUS_bY (data_t *x, data_t *y, data_t a, data_t b, int slsz, int nc, FILE *out)
 
template<class T >
void aXPLUS_bY (data_t *x, T *y, data_t a, data_t b, int slsz, FILE *out)
 
void avgXt (data_t *x, int slsz, int nc, float t, FILE *out)
 
void avgXi (data_t *x, vector< data_t > &sum, const data_t fac)
 
void varXi (data_t *x, data_t *mean, vector< data_t > &sum, const data_t fac)
 
void aXPLUS_b (data_t *x, data_t a, data_t b, int slsz, FILE *out)
 
void XdivY (data_t *x, data_t *y, int slsz, FILE *out)
 
void XdivY (data_t *x, data_t *y, int slsz, int nc, FILE *out)
 
void XmulY (data_t *x, data_t *y, int slsz, FILE *out)
 
void XmulY (data_t *x, data_t *y, int slsz, int nc, FILE *out)
 
void minXt (data_t *x, int slsz, int nc, float t, FILE *out)
 
void t_maxX (data_t *x, data_t *mx, data_t *tm, size_t n, float t)
 
void maxXi (data_t *x, data_t *mx, size_t n)
 
void minXi (data_t *x, data_t *mn, size_t n)
 
void i_maxX (data_t *x, int slsz, int nc, float t, FILE *out)
 
void maxXt (data_t *x, int slsz, int nc, float t, FILE *out)
 
void XPLUS_a (data_t *x, data_t a, int slsz, FILE *out)
 
void Xbox (data_t *dat, int x, int y, FILE *out, int d, int nc)
 
void sclip_ab (data_t *dat, int sz, data_t upper, data_t lower, vector< data_t > &scr, int t, int tfinal, FILE *out)
 
void magnitude (data_t *x, int n, int nc, FILE *out)
 determine magnitude at each point More...
 
void dot (data_t *x, data_t *y, int n, int nc, FILE *out, bool pt)
 perform dot product More...
 
template<class T >
void simp38 (T *x, int n, int t, data_t *runInt, float dt)
 Simpson's 3/8 rule. More...
 
template<class T >
void midpt (T *x, int n, bool end, data_t *reduce, float dt)
 
void interpolate (data_t *dat, vector< int * > &idx, vector< float * > &w, int n, FILE *out)
 interpolate within points More...
 
template<class T >
void normalize (IGBheader *h, FILE *out, T *min, T *max)
 normalize pixels over all time More...
 
void maxP2P (data_t *dat, data_t *big, data_t *maxpp, int sz, int t)
 find the maximum peak-to-peak value at each point More...
 
void ravgX_ta (data_t *dat1, int sz, int t, int a, vector< data_t > &tmp, FILE *out)
 
void read_vector (vector< data_t > &y, gzFile in, int nc)
 
std::string cmdline_str (int n, char *w[])
 
int main (int argc, char *argv[])
 

Variables

const int MAX_NC =4
 
int Tbit =1
 
int IGB_DATA_T [5] = { 0, IGB_FLOAT, IGB_COMPLEX, IGB_VEC3_f, IGB_VEC4_f }
 

Macro Definition Documentation

◆ data_t

#define data_t   float

Definition at line 123 of file IGBops.cc.

Enumeration Type Documentation

◆ Data_file_t

Enumerator
NONE 
SPACE_TIME 
SPACE 
PT_TIME 
PT 
TIME 

Definition at line 72 of file IGBops.cc.

Function Documentation

◆ avgXi()

void avgXi ( data_t *  x,
vector< data_t > &  sum,
const data_t  fac 
)

Definition at line 310 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avgXt()

void avgXt ( data_t *  x,
int  slsz,
int  nc,
float  t,
FILE *  out 
)

Definition at line 295 of file IGBops.cc.

Here is the caller graph for this function:

◆ aXPLUS_b()

void aXPLUS_b ( data_t *  x,
data_t  a,
data_t  b,
int  slsz,
FILE *  out 
)

Definition at line 327 of file IGBops.cc.

Here is the caller graph for this function:

◆ aXPLUS_bY() [1/2]

void aXPLUS_bY ( data_t *  x,
data_t *  y,
data_t  a,
data_t  b,
int  slsz,
int  nc,
FILE *  out 
)

Definition at line 276 of file IGBops.cc.

Here is the caller graph for this function:

◆ aXPLUS_bY() [2/2]

template<class T >
void aXPLUS_bY ( data_t *  x,
T *  y,
data_t  a,
data_t  b,
int  slsz,
FILE *  out 
)

Definition at line 286 of file IGBops.cc.

◆ center_diff()

void center_diff ( data_t *  x,
int  slsz,
vector< data_t > &  odat,
int  t,
float  dt,
FILE *  out 
)

Definition at line 241 of file IGBops.cc.

Here is the caller graph for this function:

◆ cmdline_str()

std::string cmdline_str ( int  n,
char *  w[] 
)

return the command line

Parameters
nargc
wargv

Definition at line 780 of file IGBops.cc.

Here is the caller graph for this function:

◆ dot()

void dot ( data_t *  x,
data_t *  y,
int  n,
int  nc,
FILE *  out,
bool  pt 
)

perform dot product

Parameters
xdata
ydata
ntotal number of data
ncnumber of components at each point
pttrue if Y is a single point

Definition at line 571 of file IGBops.cc.

Here is the caller graph for this function:

◆ eval_expr() [1/2]

void eval_expr ( data_t *  x,
int  n,
char *  expr,
FILE *  out,
data_t *  result 
)

Definition at line 174 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eval_expr() [2/2]

template<class T >
void eval_expr ( data_t *  x0,
T *  x1,
int  n,
char *  expr,
FILE *  out,
int  nc = 0 
)
Parameters
x0data 0
x1data 1
nnumber of data points (slice size*num_comp)
exprexpression to evaluate
outoutput file
ncnumber of components

Definition at line 211 of file IGBops.cc.

Here is the call graph for this function:

◆ forward_diff()

void forward_diff ( data_t *  x,
int  slsz,
vector< data_t > &  old,
int  t,
float  dt,
FILE *  out 
)

Definition at line 263 of file IGBops.cc.

Here is the caller graph for this function:

◆ i_maxX()

void i_maxX ( data_t *  x,
int  slsz,
int  nc,
float  t,
FILE *  out 
)

Definition at line 447 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpolate()

void interpolate ( data_t *  dat,
vector< int * > &  idx,
vector< float * > &  w,
int  n,
FILE *  out 
)

interpolate within points

Parameters
datdata to interpolate
idxlist of lists of nodes
wweights for the above nodes
nnumber of indices/weights
outoutput file

Definition at line 637 of file IGBops.cc.

Here is the caller graph for this function:

◆ join_space()

void join_space ( data_t *  x,
int  nx,
data_t *  y,
int  ny,
FILE *  out 
)

Definition at line 166 of file IGBops.cc.

Here is the caller graph for this function:

◆ joinXY()

void joinXY ( IGBheader *  h1,
IGBheader *  h2,
IGBheader *  hout 
)

Definition at line 137 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ magnitude()

void magnitude ( data_t *  x,
int  n,
int  nc,
FILE *  out 
)

determine magnitude at each point

Parameters
xdata
ntotal number of data
ncnumber of components at each point

Definition at line 550 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 792 of file IGBops.cc.

Here is the call graph for this function:

◆ maxP2P()

void maxP2P ( data_t *  dat,
data_t *  big,
data_t *  maxpp,
int  sz,
int  t 
)

find the maximum peak-to-peak value at each point

The peak-to-peak amplitude of each montonically increasing or decreasing segment is compared. The big scratch array is divided into 3 sections: the value at the previous time, whether the value was increasing or decreasing, and the value of the last extremum. Extremum are detected when the direction of change reverses. Repeated values are ignored.

Parameters
datcurrent data frame
bigscratch data [previous val;direction;extremum]
maxppcurrent maximum peak-to-peak
szslice size

Definition at line 689 of file IGBops.cc.

Here is the caller graph for this function:

◆ maxXi()

void maxXi ( data_t *  x,
data_t *  mx,
size_t  n 
)

Definition at line 425 of file IGBops.cc.

Here is the caller graph for this function:

◆ maxXt()

void maxXt ( data_t *  x,
int  slsz,
int  nc,
float  t,
FILE *  out 
)

Definition at line 466 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ midpt()

template<class T >
void midpt ( T *  x,
int  n,
bool  end,
data_t *  reduce,
float  dt 
)

Midpoint rule

Definition at line 615 of file IGBops.cc.

Here is the caller graph for this function:

◆ minXi()

void minXi ( data_t *  x,
data_t *  mn,
size_t  n 
)

Definition at line 436 of file IGBops.cc.

Here is the caller graph for this function:

◆ minXt()

void minXt ( data_t *  x,
int  slsz,
int  nc,
float  t,
FILE *  out 
)

Definition at line 399 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize()

template<class T >
void normalize ( IGBheader *  h,
FILE *  out,
T *  min,
T *  max 
)

normalize pixels over all time

Parameters
hinput IGB file
outoutput FILE
mincomputed pixel minimum
maxcomputed pixel maximum

Definition at line 658 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ output_scratch() [1/2]

void output_scratch ( data_t *  s,
FILE *  out,
int  n,
bool  bin 
)

Definition at line 715 of file IGBops.cc.

Here is the caller graph for this function:

◆ output_scratch() [2/2]

void output_scratch ( vector< data_t > &  s,
FILE *  out,
bool  bin = false 
)

Definition at line 726 of file IGBops.cc.

◆ overlap()

bool overlap ( IGBheader *  first,
IGBheader *  second 
)

Definition at line 130 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ravgX_ta()

void ravgX_ta ( data_t *  dat1,
int  sz,
int  t,
int  a,
vector< data_t > &  tmp,
FILE *  out 
)

Definition at line 739 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_vector()

void read_vector ( vector< data_t > &  y,
gzFile  in,
int  nc 
)

Definition at line 763 of file IGBops.cc.

Here is the caller graph for this function:

◆ sclip_ab()

void sclip_ab ( data_t *  dat,
int  sz,
data_t  upper,
data_t  lower,
vector< data_t > &  scr,
int  t,
int  tfinal,
FILE *  out 
)

Definition at line 514 of file IGBops.cc.

Here is the caller graph for this function:

◆ simp38()

template<class T >
void simp38 ( T *  x,
int  n,
int  t,
data_t *  runInt,
float  dt 
)

Simpson's 3/8 rule.

Parameters
xdata
nsize of data
ttime step (<0 = boundary of interval)
runIntrunning integral
dtsize of time step

Definition at line 593 of file IGBops.cc.

Here is the caller graph for this function:

◆ t_maxX()

void t_maxX ( data_t *  x,
data_t *  mx,
data_t *  tm,
size_t  n,
float  t 
)

Definition at line 413 of file IGBops.cc.

Here is the caller graph for this function:

◆ varXi()

void varXi ( data_t *  x,
data_t *  mean,
vector< data_t > &  sum,
const data_t  fac 
)

Definition at line 318 of file IGBops.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Xbox()

void Xbox ( data_t *  dat,
int  x,
int  y,
FILE *  out,
int  d,
int  nc 
)

Definition at line 490 of file IGBops.cc.

Here is the caller graph for this function:

◆ XdivY() [1/2]

void XdivY ( data_t *  x,
data_t *  y,
int  slsz,
FILE *  out 
)

Definition at line 336 of file IGBops.cc.

Here is the caller graph for this function:

◆ XdivY() [2/2]

void XdivY ( data_t *  x,
data_t *  y,
int  slsz,
int  nc,
FILE *  out 
)

Definition at line 359 of file IGBops.cc.

◆ XmulY() [1/2]

void XmulY ( data_t *  x,
data_t *  y,
int  slsz,
FILE *  out 
)

Definition at line 381 of file IGBops.cc.

Here is the caller graph for this function:

◆ XmulY() [2/2]

void XmulY ( data_t *  x,
data_t *  y,
int  slsz,
int  nc,
FILE *  out 
)

Definition at line 390 of file IGBops.cc.

◆ XPLUS_a()

void XPLUS_a ( data_t *  x,
data_t  a,
int  slsz,
FILE *  out 
)

Definition at line 479 of file IGBops.cc.

Variable Documentation

◆ IGB_DATA_T

int IGB_DATA_T[5] = { 0, IGB_FLOAT, IGB_COMPLEX, IGB_VEC3_f, IGB_VEC4_f }

Definition at line 124 of file IGBops.cc.

◆ MAX_NC

const int MAX_NC =4

Definition at line 68 of file IGBops.cc.

◆ Tbit

int Tbit =1

Definition at line 73 of file IGBops.cc.