openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
electric_integrators.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // openCARP is an open cardiac electrophysiology simulator.
3 //
4 // Copyright (C) 2020 openCARP project
5 //
6 // This program is licensed under the openCARP Academic Public License (APL)
7 // v1.0: You can use and redistribute it and/or modify it in non-commercial
8 // academic environments under the terms of APL as published by the openCARP
9 // project v1.0, or (at your option) any later version. Commercial use requires
10 // a commercial license (info@opencarp.org).
11 //
12 // This program is distributed without any warranty; see the openCARP APL for
13 // more details.
14 //
15 // You should have received a copy of the openCARP APL along with this program
16 // and can find it online: http://www.opencarp.org/license
17 // ----------------------------------------------------------------------------
18 
27 #ifndef _ELEC_INTEGRATORS_H
28 #define _ELEC_INTEGRATORS_H
29 
30 #include "SF_base.h"
31 #include "basics.h"
32 #include "fem_types.h"
33 
34 namespace opencarp {
35 
37 #define EP_MAX_IPOINTS 128
38 #define EP_MAX_LPOINTS 8
40 
41 class elec_stiffness_integrator : public SF::matrix_integrator<mesh_int_t,mesh_real_t>
42 {
43  MaterialType & material;
44 
45  SF::dmat<double> cond;
46  SF::dmat<double> shape;
47  SF::dmat<double> gshape;
48  double J[9];
50 
51  int p_order = 1;
52 
54  double w [EP_MAX_IPOINTS];
55 
56  public:
57  elec_stiffness_integrator(MaterialType & inp_mat) : material(inp_mat)
58  {}
59 
61  void dpn(mesh_int_t & row_dpn, mesh_int_t & col_dpn);
62 };
63 
64 class mass_integrator : public SF::matrix_integrator<mesh_int_t,mesh_real_t>
65 {
66  SF::dmat<double> shape;
67  double J[9];
69 
70  int p_order = 1;
71 
73  double w [EP_MAX_IPOINTS];
74 
75  public:
77  void dpn(mesh_int_t & row_dpn, mesh_int_t & col_dpn);
78 };
79 
80 } // namespace opencarp
81 
82 #endif
description of materal properties in a mesh
Definition: fem_types.h:110
#define EP_MAX_IPOINTS
maximum supported number of integration points
Comfort class. Provides getter functions to access the mesh member variables more comfortably...
Definition: SF_fem_utils.h:704
Abstract matrix integration base class.
Definition: SF_fem_utils.h:945
Point and vector struct.
Definition: SF_container.h:65
int mesh_int_t
Definition: SF_container.h:46
void operator()(const SF::element_view< mesh_int_t, mesh_real_t > &elem, SF::dmat< double > &buff)
compute the element matrix for a given element.
#define EP_MAX_LPOINTS
maximum supported number of points in a local element
void dpn(mesh_int_t &row_dpn, mesh_int_t &col_dpn)
return (by reference) the row and column dimensions
elec_stiffness_integrator(MaterialType &inp_mat)
The base header file.
Basic utility structs and functions, mostly IO related.
Structs and types for (electric) FEM.