openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Macros | Typedefs | Enumerations | Functions
filament.h File Reference
#include "vect.h"
#include <vector>
#include "IGBheader.h"
Include dependency graph for filament.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _PS
 
struct  _FilSeg
 
union  _singularity
 
class  filament
 
struct  NodeList
 
struct  Elem
 
struct  ElemList
 
struct  tbuffer
 time slice buffer for post processing More...
 

Macros

#define log_msg(F, L, O, ...)   fprintf( stderr, __VA_ARGS__ )
 
#define BLOCK_ALLOC   1000
 

Typedefs

typedef struct _PS PS
 
typedef struct _FilSeg FilSeg
 
typedef union _singularity singularity
 
typedef struct NodeList NodeList
 
typedef struct ElemList ElemList
 

Enumerations

enum  SingularityDetector_t { face_based =0 , vol_based }
 
enum  singularity_t { PhaseSingularity =1 , FilamentSegment =2 }
 
enum  Elem_t {
  Tetra =0 , Hexa , Octa , Pyramid ,
  Prism , Quad , Tri , Line ,
  TetP2 , TriP2 , TetraBubble , HexaBubble ,
  PrismBubble , PyramidBubble , TriBubble , QuadBubble
}
 

Functions

int init_filament_IO (const char *meshname, int numT, FILE *fh[])
 
void write_filaments (filament *f, FILE *fh[], float t)
 
int write_connections (ElemList *elst, NodeList *nlst, filament *f, FILE *filHdls[], float t)
 
int write_elems_martin (ElemList *elst, NodeList *nlst, filament *f, FILE *filHdls[], float t)
 
void close_filament_IO (FILE *fh[])
 
void interpolateTBuffer (tbuffer *tbf)
 
void interpolate_vm (int numNodes, float **d, int M, float **rd, float rDist)
 
bool compute_filament (float *d0, float *d1, float vth, ElemList *elst, NodeList *nlst, filament *f, SingularityDetector_t meth)
 

Macro Definition Documentation

◆ BLOCK_ALLOC

#define BLOCK_ALLOC   1000

Definition at line 37 of file filament.h.

◆ log_msg

#define log_msg (   F,
  L,
  O,
  ... 
)    fprintf( stderr, __VA_ARGS__ )

Definition at line 8 of file filament.h.

Typedef Documentation

◆ ElemList

typedef struct ElemList ElemList

◆ FilSeg

typedef struct _FilSeg FilSeg

◆ NodeList

typedef struct NodeList NodeList

◆ PS

typedef struct _PS PS

◆ singularity

typedef union _singularity singularity

Enumeration Type Documentation

◆ Elem_t

enum Elem_t
Enumerator
Tetra 
Hexa 
Octa 
Pyramid 
Prism 
Quad 
Tri 
Line 
TetP2 
TriP2 
TetraBubble 
HexaBubble 
PrismBubble 
PyramidBubble 
TriBubble 
QuadBubble 

Definition at line 16 of file filament.h.

◆ singularity_t

Enumerator
PhaseSingularity 
FilamentSegment 

Definition at line 15 of file filament.h.

◆ SingularityDetector_t

Enumerator
face_based 
vol_based 

Definition at line 14 of file filament.h.

Function Documentation

◆ close_filament_IO()

void close_filament_IO ( FILE *  fh[])

Close filaments I/O

Parameters
fhfile handles for writing filament data

Definition at line 414 of file filament.cc.

Here is the caller graph for this function:

◆ compute_filament()

bool compute_filament ( float *  d0,
float *  d1,
float  vth,
ElemList elst,
NodeList nlst,
filament f,
SingularityDetector_t  meth 
)

interpolate data onto a data point at rDist from central sample

Parameters
d0data at instant t-dt/2
d1data at instant t+dt/2
vthvoltage threshold for isolines
elstelement list
nlstnode list
ffilament array
methdetection method
Postcondition
filament structure filled with detected filament segments or phase singularities
Returns
true if filaments detected, false otherwise

Definition at line 171 of file filament.cc.

Here is the caller graph for this function:

◆ init_filament_IO()

int init_filament_IO ( const char *  meshname,
int  numT,
FILE *  fh[] 
)

interpolate data onto a data point at rDist from central sample

Parameters
meshnamebase name of mesh to derive names for filament files
numTnumber of time slices at which filaments are detected
fhfile handles for filament IO
Postcondition
file handle array filled with file pointers
Returns
1 if file open was successful, -1 otherwise

Definition at line 270 of file filament.cc.

Here is the caller graph for this function:

◆ interpolate_vm()

void interpolate_vm ( int  numNodes,
float **  d,
int  M,
float **  rd,
float  rdist 
)

interpolate data onto a data point at rDist from central sample

Parameters
numNodesnumber of data items in vector
ddata vectors at input dt sampling
Mnumber of vectors in d
rdresampled data at +/- rDist
rdistrelative distance from central sample
Postcondition
rd[0] filled with data on -rdist, rd[1] with data at +rdist

Definition at line 147 of file filament.cc.

Here is the caller graph for this function:

◆ interpolateTBuffer()

void interpolateTBuffer ( tbuffer tbf)

interpolate data from time slice buffer wrapper function for interpolate_vm

Parameters
tbuffertime slice buffer
Postcondition
tbuffer->dr[0] filled with data on -tbf->rdist, tbuffer->dr[1] with data at + tbf->rdist

Definition at line 124 of file filament.cc.

Here is the caller graph for this function:

◆ write_connections()

int write_connections ( ElemList elst,
NodeList nlst,
filament f,
FILE *  filHdls[],
float  t 
)

Definition at line 309 of file filament.cc.

◆ write_elems_martin()

int write_elems_martin ( ElemList elst,
NodeList nlst,
filament f,
FILE *  filHdls[],
float  t 
)

◆ write_filaments()

void write_filaments ( filament f,
FILE *  filHdls[],
float  t 
)

Output filaments to file

Parameters
filamentfilament data for current time slice
filHdlsfile handles for writing filament data
tcurrent time slice
Returns
number of filaments written

Definition at line 348 of file filament.cc.

Here is the caller graph for this function: