openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
electric_integrators.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) NumeriCor GmbH
2 // SPDX-License-Identifier: LicenseRef-APL-1.1
3 
12 #ifndef _ELEC_INTEGRATORS_H
13 #define _ELEC_INTEGRATORS_H
14 
15 #include "SF_base.h"
16 #include "basics.h"
17 #include "fem_types.h"
18 #include "sf_interface.h"
19 
20 namespace opencarp {
21 
22 void read_el_scale_vec(const char* file, mesh_t mt, SF::vector<double>& el_scale, int& el_scale_dpn);
23 
25 #define EP_MAX_IPOINTS 128
27 #define EP_MAX_LPOINTS 8
28 
29 class elec_stiffness_integrator : public SF::matrix_integrator<mesh_int_t,mesh_real_t>
30 {
31  MaterialType & material;
32 
33  SF::dmat<double> cond;
34  SF::dmat<double> shape;
35  SF::dmat<double> gshape;
36  double J[9];
38 
39  int p_order = 1;
40 
42  double w [EP_MAX_IPOINTS];
43 
44  public:
45  elec_stiffness_integrator(MaterialType & inp_mat) : material(inp_mat)
46  {}
47 
49  void dpn(mesh_int_t & row_dpn, mesh_int_t & col_dpn);
50 };
51 
52 class mass_integrator : public SF::matrix_integrator<mesh_int_t,mesh_real_t>
53 {
54  SF::dmat<double> shape;
55  double J[9];
57 
58  int p_order = 1;
59 
61  double w [EP_MAX_IPOINTS];
62 
63  public:
65  void dpn(mesh_int_t & row_dpn, mesh_int_t & col_dpn);
66 };
67 
68 } // namespace opencarp
69 
70 #endif
The base header file.
opencarp::local_index_t mesh_int_t
Definition: SF_container.h:31
Basic utility structs and functions, mostly IO related.
Comfort class. Provides getter functions to access the mesh member variables more comfortably.
Definition: SF_fem_utils.h:689
Abstract matrix integration base class.
Definition: SF_fem_utils.h:933
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.
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)
void dpn(mesh_int_t &row_dpn, mesh_int_t &col_dpn)
return (by reference) the row and column dimensions
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
#define EP_MAX_IPOINTS
maximum supported number of integration points
Structs and types for (electric) FEM.
void read_el_scale_vec(const char *file, mesh_t mt, SF::vector< double > &el_scale, int &el_scale_dpn)
mesh_t
The enum identifying the different meshes we might want to load.
Definition: sf_interface.h:44
Interface to SlimFem.
Point and vector struct.
Definition: SF_container.h:50
description of materal properties in a mesh
Definition: fem_types.h:106