openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Classes | Namespaces | Macros | Enumerations | Functions
sim_utils.h File Reference

Simulator-level utility execution control functions. More...

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "Typedefs.h"
#include "sf_interface.h"
#include "timer_utils.h"
#include "physics_types.h"
#include "build_info.h"
#include "openCARP_p.h"
#include "openCARP_d.h"
#include "IGBheader.h"
Include dependency graph for sim_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  opencarp::prog_stats
 for display execution progress and statistical data of electrical solve More...
 
struct  opencarp::sync_io_item
 
struct  opencarp::async_io_item
 
class  opencarp::igb_output_manager
 

Namespaces

 opencarp
 
 opencarp::user_globals
 

Macros

#define CARP_PARAMS
 
#define DATAOUT_NONE   0
 
#define DATAOUT_SURF   1
 
#define DATAOUT_VOL   2
 
#define DATAOUT_VTX   3
 
#define SOLV_METH(A, B)   (B & A##_FLAG)
 
#define MONODOMAIN_FLAG   1
 
#define ITERATE_FLAG   2
 
#define CN_PARAB_FLAG   4
 
#define PURKINJE_FLAG   8
 
#define O2dT_PARAB_FLAG   16
 
#define PSEUDO_BIDM_FLAG   32
 
#define MONODOMAIN   0
 
#define BIDOMAIN   1
 
#define PSEUDO_BIDM   2
 
#define RECOVER_PHIE   1
 
#define OPTICAL_MAP   2
 
#define ACTIVATING_FUNCTION   4
 
#define AXIAL_CURRENTS   8
 
#define FILAMENTS   16
 
#define CURRENT_DENSITIES   32
 
#define EXP_NORMAL   0
 
#define EXP_OUTPUT_FEM   1
 
#define EXP_LAPLACE   2
 
#define EXP_SETUP_MESH   3
 
#define EXP_POSTPROCESS   4
 

Enumerations

enum  opencarp::IO_t { opencarp::INPUT, opencarp::OUTPUT, opencarp::POSTPROC, opencarp::CURDIR }
 The different output (directory) types. More...
 
enum  opencarp::tagreg_t { opencarp::tagreg_sphere = 1, opencarp::tagreg_block = 2, opencarp::tagreg_cylinder = 3, opencarp::tagreg_list = 4 }
 tag regions types. must be in line with carp.prm More...
 

Functions

void opencarp::parse_params_cpy (int argc, char **argv)
 Initialize input parameters on a copy of the real command line parameters. More...
 
void opencarp::register_physics ()
 Register physics to the physics registry. More...
 
void opencarp::initialize_physics ()
 Initialize all physics in the registry. More...
 
void opencarp::destroy_physics ()
 Destroy all physics in the registry. More...
 
void opencarp::simulate ()
 Main simulate loop. More...
 
void opencarp::post_process ()
 do postprocessing More...
 
void opencarp::parse_mesh_types ()
 Parse the phys_type CLI parameters and set up (empty) SF::meshdata meshes. More...
 
void opencarp::setup_meshes ()
 Read in the reference mesh and use its data to populate all meshes registered in the mesh registry. More...
 
void opencarp::output_meshes ()
 
unsigned int opencarp::classify_soln_methods ()
 
void opencarp::check_and_convert_params ()
 Here we want to put all parameter checks, conversions and modifications that have been littered throughout the codebase. More...
 
void opencarp::setup_petsc_err_log ()
 set up error logs for PETSc, so that it doesnt print errors to stderr. More...
 
void opencarp::set_io_dirs (char *sim_ID, char *pp_ID, IO_t init)
 
bool opencarp::setup_IO (int argc, char **argv)
 
void opencarp::update_cwd ()
 save the current working directory to curdir so that we can switch back to it if needed. More...
 
int opencarp::set_dir (IO_t dest)
 
void opencarp::basic_timer_setup ()
 Here we set up the timers that we always want to have, independent of physics. More...
 
int opencarp::plot_protocols (const char *fname)
 plot simulation protocols (I/O timers, stimuli, boundary conditions, etc) More...
 
Basic_physic * opencarp::get_physics (physic_t p, bool error_if_missing=true)
 Convinience function to get a physics. More...
 
short opencarp::get_mesh_dim (mesh_t id)
 get (lowest) dimension of the mesh used in the experiment More...
 
void opencarp::register_data (sf_vec *dat, datavec_t d)
 Register a data vector in the global registry. More...
 
void opencarp::cleanup_and_exit ()
 
char * opencarp::get_file_dir (const char *file)
 
sf_vec * opencarp::get_data (datavec_t d)
 Retrieve a petsc data vector from the data registry. More...
 
void opencarp::output_parameter_file (const char *fname, int argc, char **argv)
 
void opencarp::savequit ()
 save state and quit simulator More...
 
void opencarp::show_build_info ()
 show the build info, exit if -buildinfo was provided. This code runs before MPI_Init(). More...
 

Detailed Description

Simulator-level utility execution control functions.

Author
Aurel Neic, Gernot Plank, Edward Vigmond
Version
Date
2019-10-25

Definition in file sim_utils.h.

Macro Definition Documentation

◆ ACTIVATING_FUNCTION

#define ACTIVATING_FUNCTION   4

Definition at line 150 of file sim_utils.h.

◆ AXIAL_CURRENTS

#define AXIAL_CURRENTS   8

Definition at line 151 of file sim_utils.h.

◆ BIDOMAIN

#define BIDOMAIN   1

Definition at line 143 of file sim_utils.h.

◆ CARP_PARAMS

#define CARP_PARAMS

Definition at line 41 of file sim_utils.h.

◆ CN_PARAB_FLAG

#define CN_PARAB_FLAG   4

Definition at line 136 of file sim_utils.h.

◆ CURRENT_DENSITIES

#define CURRENT_DENSITIES   32

Definition at line 153 of file sim_utils.h.

◆ DATAOUT_NONE

#define DATAOUT_NONE   0

Definition at line 56 of file sim_utils.h.

◆ DATAOUT_SURF

#define DATAOUT_SURF   1

Definition at line 57 of file sim_utils.h.

◆ DATAOUT_VOL

#define DATAOUT_VOL   2

Definition at line 58 of file sim_utils.h.

◆ DATAOUT_VTX

#define DATAOUT_VTX   3

Definition at line 59 of file sim_utils.h.

◆ EXP_LAPLACE

#define EXP_LAPLACE   2

Definition at line 158 of file sim_utils.h.

◆ EXP_NORMAL

#define EXP_NORMAL   0

Definition at line 156 of file sim_utils.h.

◆ EXP_OUTPUT_FEM

#define EXP_OUTPUT_FEM   1

Definition at line 157 of file sim_utils.h.

◆ EXP_POSTPROCESS

#define EXP_POSTPROCESS   4

Definition at line 160 of file sim_utils.h.

◆ EXP_SETUP_MESH

#define EXP_SETUP_MESH   3

Definition at line 159 of file sim_utils.h.

◆ FILAMENTS

#define FILAMENTS   16

Definition at line 152 of file sim_utils.h.

◆ ITERATE_FLAG

#define ITERATE_FLAG   2

Definition at line 135 of file sim_utils.h.

◆ MONODOMAIN

#define MONODOMAIN   0

Definition at line 142 of file sim_utils.h.

◆ MONODOMAIN_FLAG

#define MONODOMAIN_FLAG   1

Definition at line 134 of file sim_utils.h.

◆ O2dT_PARAB_FLAG

#define O2dT_PARAB_FLAG   16

Definition at line 138 of file sim_utils.h.

◆ OPTICAL_MAP

#define OPTICAL_MAP   2

Definition at line 149 of file sim_utils.h.

◆ PSEUDO_BIDM

#define PSEUDO_BIDM   2

Definition at line 144 of file sim_utils.h.

◆ PSEUDO_BIDM_FLAG

#define PSEUDO_BIDM_FLAG   32

Definition at line 139 of file sim_utils.h.

◆ PURKINJE_FLAG

#define PURKINJE_FLAG   8

Definition at line 137 of file sim_utils.h.

◆ RECOVER_PHIE

#define RECOVER_PHIE   1

Definition at line 148 of file sim_utils.h.

◆ SOLV_METH

#define SOLV_METH (   A,
 
)    (B & A##_FLAG)

Definition at line 133 of file sim_utils.h.