openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Macros | Enumerations | Functions | Variables
mesher.cc File Reference
#include <iostream>
#include <fstream>
#include <cstring>
#include <string>
#include <cmath>
#include <stdlib.h>
#include <limits>
#include <algorithm>
#include "vect.h"
#include "mesher_p.h"
#include "mesher_d.h"
Include dependency graph for mesher.cc:

Go to the source code of this file.

Classes

class  TisAxes
 
class  Region
 
class  BlockRegion
 
class  SphericalRegion
 
class  CylindricalRegion
 
class  Element
 
class  Tetrahedron
 
class  Hexahedron
 
class  Quadrilateral
 
class  Triangle
 
class  Line
 
class  tmProfile
 
class  BBoxDef
 
class  BoundingBox
 
class  fibDef
 
class  Grid
 
class  Grid2D
 
class  Grid3D
 
class  Grid1D
 

Macros

#define BOX_CENTERS_GRID   false
 
#define NODE_GRID   true
 

Enumerations

enum  region_t { Myocardium =1, Isobath, Anisobath }
 

Functions

Point p_assign_array (float *p)
 
std::ostream & operator<< (std::ostream &out, Element &e)
 
std::ostream & operator<< (std::ostream &out, Point p)
 
int main (int argc, char *argv[])
 

Variables

const Point e_circ = {1,0,0}
 
const Point e_long = {0,1,0}
 
const Point e_rad = {0,1,0}
 
const float CM2UM =1.e4
 

Detailed Description

This is a program to generate regular meshes. The dimensions of the block are given by size and the bath dimensions are added to it. The block is centered on XY and extend in Z from 0. If the Z component of the bath is negative, bath is also added below Z=0. Regions can be defined with the block which are tagged in the output tetrahedron file. Region defintions are searched in order, so the first one (or last if specified) when regions overlap, the first or last one is used depending on the search flag. Each region may be specifed as a

block - p0=start, p1=opposite corner

sphere - p0=origin, rad=radius

cylinder - p0=origin, p1=axis, rad=radius. The cylinder starts at

the origin and extends in the direction of the axis

Note that in the final model produced, region 0 is bath, region 1 is default myocardium, and if the user has not specified a tag for the region, the region number of specified region R is R+2, i.e., elements defined in regdef[1] will have the tag 3 in the elem file unless explicitly set.

Definition in file mesher.cc.

Macro Definition Documentation

◆ BOX_CENTERS_GRID

#define BOX_CENTERS_GRID   false

Definition at line 55 of file mesher.cc.

◆ NODE_GRID

#define NODE_GRID   true

Definition at line 56 of file mesher.cc.

Enumeration Type Documentation

◆ region_t

enum region_t
Enumerator
Myocardium 
Isobath 
Anisobath 

Definition at line 53 of file mesher.cc.

Function Documentation

◆ main()

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

Definition at line 1070 of file mesher.cc.

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  out,
Element e 
)

Definition at line 243 of file mesher.cc.

Here is the caller graph for this function:

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  out,
Point  p 
)

Definition at line 251 of file mesher.cc.

◆ p_assign_array()

Point p_assign_array ( float *  p)

Definition at line 58 of file mesher.cc.

Here is the caller graph for this function:

Variable Documentation

◆ CM2UM

const float CM2UM =1.e4

Definition at line 71 of file mesher.cc.

◆ e_circ

const Point e_circ = {1,0,0}

Definition at line 65 of file mesher.cc.

◆ e_long

const Point e_long = {0,1,0}

Definition at line 66 of file mesher.cc.

◆ e_rad

const Point e_rad = {0,1,0}

Definition at line 67 of file mesher.cc.