CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
#include <array>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <mpi.h>
#include <ostream>
#include <set>
#include <span>
#include <sstream>
#include <tuple>
#include <typeinfo>
#include <unordered_map>
#include <vector>
#include <concepts>
#include <memory>
#include <vtkPointLocator.h>
#include <Eigen/Dense>
#include <inttypes.h>
#include <type_traits>
Go to the source code of this file.
Data Structures | |
struct | CepsStandardArgs |
Structure used to pass arguments to SAFunc (see pde directory) The flags of the SAFunc allows extraction of the correct argument from this structured type. More... | |
Namespaces | |
ceps | |
A namespace for all utility methods. | |
Macros | |
#define | FLOATING_POINT_EPSILON 1E-6 |
#define | CEPS_DECL_PARALLEL_TYPE(_type, _mpi_type) |
#define | CEPS_MPI_REAL MpiType<CepsReal>::getType() |
#define | CEPS_MPI_INT MpiType<CepsInt>::getType () |
#define | CEPS_MPI_UINT MpiType<CepsUInt>::getType () |
#define | CEPS_MPI_SHORT MpiType<CepsShort>::getType () |
#define | CEPS_MPI_INDEX MpiType<CepsIndex>::getType () |
#define | CEPS_MPI_GEOM_INDEX MpiType<CepsIndex>::getType () |
#define | CEPS_MPI_GLOBAL_INDEX MpiType<CepsGlobalIndex>::getType () |
#define | CEPS_MPI_LOCAL_INDEX MpiType<CepsLocalIndex>::getType () |
#define | CEPS_MPI_ELEMENT_INDEX MpiType<CepsIndex>::getType () |
#define | CEPS_MPI_HASH MpiType<CepsHash>::getType () |
#define | CEPS_MPI_SHASH MpiType<CepsSHash>::getType() |
#define | CEPS_MAKE_ALIGNED_OP_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
Typedefs | |
using | CepsReal = float |
Need single precision floating point. More... | |
using | CepsInt = int32_t |
Need 32 bit integer. More... | |
using | CepsUInt = std::make_unsigned_t< CepsInt > |
Unsigned version on CepsInt. More... | |
using | CepsShort = short |
Short type for custom purposes. More... | |
using | CepsIndex = CepsInt |
Index rowid etc. More... | |
using | CepsProcId = CepsUInt |
For CPU indices. More... | |
using | CepsBool = bool |
Booleans. More... | |
using | CepsChar = char |
Char. More... | |
using | CepsSize = size_t |
Size unsigned. More... | |
using | CepsCString = const CepsChar * |
C format string. More... | |
using | CepsString = std::basic_string< CepsChar > |
C++ format string. More... | |
using | CepsScalar = CepsReal |
Real numbers. More... | |
using | CepsMathScalar = CepsScalar |
Real numbers. More... | |
using | CepsMathScalars = Eigen::Matrix< CepsScalar, 1, Eigen::Dynamic > |
Array of reals, eigen format. More... | |
using | CepsMathVertex = Eigen::Matrix< CepsScalar, 3, 1 > |
Vertex, eigen format. More... | |
using | CepsMathVertices = Eigen::Matrix< CepsScalar, 3, Eigen::Dynamic > |
Array of vertices, eigen format. More... | |
using | CepsMathTensor = Eigen::Matrix< CepsScalar, 3, 3 > |
Tensor, eigen format. More... | |
using | CepsMathTensors = Eigen::Matrix< CepsScalar, 3, Eigen::Dynamic > |
Array of tensors, eigen format. More... | |
using | CepsMathDynamic1D = Eigen::Matrix< CepsScalar, Eigen::Dynamic, 1 > |
Dynamic 1D array, eigen format. More... | |
using | CepsMathDynamic2D = Eigen::Matrix< CepsScalar, Eigen::Dynamic, Eigen::Dynamic > |
Dynamic 2D array, eigen format. More... | |
template<class _Type , class _Alloc = std::allocator<_Type>> | |
using | CepsVector = std::vector< _Type, _Alloc > |
C++ vector. More... | |
template<class _Type , CepsSize _N> | |
using | CepsArray = std::array< _Type, _N > |
C++ arrays. More... | |
template<class _Type > | |
using | CepsArray2 = CepsArray< _Type, 2U > |
C++ array, 2 elements. More... | |
template<class _Type > | |
using | CepsArray3 = CepsArray< _Type, 3U > |
C++ array, 3 elements. More... | |
template<class _Type > | |
using | CepsArray4 = CepsArray< _Type, 4U > |
C++ array, 4 elements. More... | |
template<class _Type > | |
using | CepsArray9 = CepsArray< _Type, 9U > |
C++ array, 9 elements. More... | |
using | CepsReal1D = CepsArray< CepsReal, 1u > |
A real scalar, used like this for compatibility in polynomials. More... | |
using | CepsReal2D = CepsArray2< CepsReal > |
Two real scalars, used like this for compatibility in polynomials. More... | |
using | CepsReal3D = CepsArray3< CepsReal > |
Three real scalars, used like this for compatibility in polynomials. More... | |
template<class... _Args> | |
using | CepsTuple = std::tuple< _Args... > |
C++ tuple. More... | |
template<typename _Key , typename _Tp , typename _Compare = std::less<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp>>> | |
using | CepsMap = std::map< _Key, _Tp, _Compare, _Alloc > |
C++ map. More... | |
template<typename _Key , typename _Tp , typename _Hash = std::hash<_Key>, typename _KeyEqual = std::equal_to<_Key>, typename _Alloc = std::allocator<std::pair<const _Key, _Tp>>> | |
using | CepsMultiMap = std::unordered_multimap< _Key, _Tp, _Hash, _KeyEqual, _Alloc > |
C++ multimap. More... | |
template<class _Type , class _Compare = std::less<_Type>, class _Alloc = std::allocator<_Type>> | |
using | CepsSet = std::set< _Type, _Compare, _Alloc > |
C++ set. More... | |
using | CepsAttribute = CepsInt |
Used to define regions. More... | |
using | CepsEnum = int |
Enum type. More... | |
using | CepsUnknownIndex = CepsIndex |
For unknowns. More... | |
using | CepsGlobalIndex = CepsIndex |
Many uses. Has to be signed for PETSc. More... | |
using | CepsLocalIndex = CepsIndex |
To use when the indexing is only on one process. More... | |
using | CepsHash = CepsSize |
Hashes for distributed data. More... | |
using | CepsSHash = int64_t |
Hashes for coordinates. More... | |
using | CepsCellGlobalIndex = CepsGlobalIndex |
Indices of cells. More... | |
using | CepsCellLocalIndex = CepsLocalIndex |
Indices of cells. More... | |
using | CepsNodeGlobalIndex = CepsGlobalIndex |
Indices of nodes. More... | |
using | CepsNodeLocalIndex = CepsLocalIndex |
Indices of nodes. More... | |
using | CepsDofGlobalIndex = CepsGlobalIndex |
Indices of degrees of freedom. More... | |
using | CepsDofLocalIndex = CepsLocalIndex |
Indices of degrees of freedom. More... | |
Functions | |
template<typename _Result > | |
_Result | ceps::convertReal (CepsReal *data) |
A small utility to convert a vector of reals into the appropriate (scalar,vector,tensor) More... | |
CEPS_DECL_PARALLEL_TYPE (void, ompi_mpi_datatype_null) | |
void declaration More... | |
CEPS_DECL_PARALLEL_TYPE (float, ompi_mpi_float) | |
float declaration More... | |
CEPS_DECL_PARALLEL_TYPE (double, ompi_mpi_double) | |
double declaration More... | |
CEPS_DECL_PARALLEL_TYPE (int8_t, ompi_mpi_int8_t) | |
int8_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (uint8_t, ompi_mpi_uint8_t) | |
uint8_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (int16_t, ompi_mpi_int16_t) | |
int16_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (uint16_t, ompi_mpi_uint16_t) | |
uint16_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (int32_t, ompi_mpi_int32_t) | |
int32_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (uint32_t, ompi_mpi_uint32_t) | |
uint32_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (int64_t, ompi_mpi_int64_t) | |
int64_t declaration More... | |
CEPS_DECL_PARALLEL_TYPE (uint64_t, ompi_mpi_uint64_t) | |
uint64_t declaration More... | |
Variables | |
constexpr CepsReal1D | CepsZero1D = {0.0} |
Zero of CepsReal1D. More... | |
constexpr CepsReal2D | CepsZero2D = {0.0, 0.0} |
Zero of CepsReal2D. More... | |
constexpr CepsReal3D | CepsZero3D = {0.0, 0.0, 0.0} |
Zero of CepsReal3D. More... | |
constexpr const CepsChar | CepsNoName [] = "no-name" |
Default string for things without defined name. More... | |
constexpr const CepsChar | CepsNoUnit [] = "no-unit" |
Default string for things without defined unit. More... | |
constexpr CepsAttribute | CepsUniversal = -1 |
This attribute means "everywhere". More... | |
Definition of types to be used within CEPS, with type selection depending on install
Definition in file CepsTypes.hpp.
#define CEPS_DECL_PARALLEL_TYPE | ( | _type, | |
_mpi_type | |||
) |
Definition at line 265 of file CepsTypes.hpp.
#define CEPS_MAKE_ALIGNED_OP_NEW EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
This is a eigen macro used to make sure that 16-bytes-aligned pointers are generated:
Definition at line 374 of file CepsTypes.hpp.
the mpi type for CepsIndex
Definition at line 355 of file CepsTypes.hpp.
the mpi type for CepsGeomIndex
Definition at line 340 of file CepsTypes.hpp.
#define CEPS_MPI_GLOBAL_INDEX MpiType<CepsGlobalIndex>::getType () |
the mpi type for CepsGlobalIndex
Definition at line 345 of file CepsTypes.hpp.
the mpi type for CepsHash
Definition at line 360 of file CepsTypes.hpp.
the mpi type for CepsIndex
Definition at line 335 of file CepsTypes.hpp.
the mpi type for CepsInt
Definition at line 320 of file CepsTypes.hpp.
#define CEPS_MPI_LOCAL_INDEX MpiType<CepsLocalIndex>::getType () |
the mpi type for CepsLocalIndex
Definition at line 350 of file CepsTypes.hpp.
the mpi type for CepsReal
Definition at line 315 of file CepsTypes.hpp.
the mpi type for CepsSHash
Definition at line 365 of file CepsTypes.hpp.
the mpi type for CepsShort
Definition at line 330 of file CepsTypes.hpp.
the mpi type for CepsUInt
Definition at line 325 of file CepsTypes.hpp.
#define FLOATING_POINT_EPSILON 1E-6 |
Definition at line 117 of file CepsTypes.hpp.
using CepsArray = std::array<_Type, _N> |
C++ arrays.
Definition at line 159 of file CepsTypes.hpp.
using CepsArray2 = CepsArray<_Type, 2U> |
C++ array, 2 elements.
Definition at line 162 of file CepsTypes.hpp.
using CepsArray3 = CepsArray<_Type, 3U> |
C++ array, 3 elements.
Definition at line 165 of file CepsTypes.hpp.
using CepsArray4 = CepsArray<_Type, 4U> |
C++ array, 4 elements.
Definition at line 168 of file CepsTypes.hpp.
using CepsArray9 = CepsArray<_Type, 9U> |
C++ array, 9 elements.
Definition at line 171 of file CepsTypes.hpp.
using CepsAttribute = CepsInt |
Used to define regions.
Definition at line 215 of file CepsTypes.hpp.
using CepsBool = bool |
Booleans.
Definition at line 124 of file CepsTypes.hpp.
using CepsCellGlobalIndex = CepsGlobalIndex |
Indices of cells.
Definition at line 222 of file CepsTypes.hpp.
using CepsCellLocalIndex = CepsLocalIndex |
Indices of cells.
Definition at line 223 of file CepsTypes.hpp.
using CepsChar = char |
Char.
Definition at line 125 of file CepsTypes.hpp.
using CepsCString = const CepsChar * |
C format string.
Definition at line 127 of file CepsTypes.hpp.
using CepsDofGlobalIndex = CepsGlobalIndex |
Indices of degrees of freedom.
Definition at line 226 of file CepsTypes.hpp.
using CepsDofLocalIndex = CepsLocalIndex |
Indices of degrees of freedom.
Definition at line 227 of file CepsTypes.hpp.
using CepsEnum = int |
Enum type.
Definition at line 216 of file CepsTypes.hpp.
using CepsGlobalIndex = CepsIndex |
Many uses. Has to be signed for PETSc.
Definition at line 218 of file CepsTypes.hpp.
Hashes for distributed data.
Definition at line 220 of file CepsTypes.hpp.
Index rowid etc.
Definition at line 111 of file CepsTypes.hpp.
using CepsInt = int32_t |
Need 32 bit integer.
Definition at line 106 of file CepsTypes.hpp.
using CepsLocalIndex = CepsIndex |
To use when the indexing is only on one process.
Definition at line 219 of file CepsTypes.hpp.
using CepsMap = std::map<_Key, _Tp, _Compare, _Alloc> |
C++ map.
Definition at line 196 of file CepsTypes.hpp.
using CepsMathDynamic1D = Eigen::Matrix<CepsScalar, Eigen::Dynamic, 1> |
Dynamic 1D array, eigen format.
Definition at line 139 of file CepsTypes.hpp.
using CepsMathDynamic2D = Eigen::Matrix<CepsScalar, Eigen::Dynamic, Eigen::Dynamic> |
Dynamic 2D array, eigen format.
Definition at line 140 of file CepsTypes.hpp.
using CepsMathScalar = CepsScalar |
Real numbers.
Definition at line 133 of file CepsTypes.hpp.
using CepsMathScalars = Eigen::Matrix<CepsScalar, 1, Eigen::Dynamic> |
Array of reals, eigen format.
Definition at line 134 of file CepsTypes.hpp.
using CepsMathTensor = Eigen::Matrix<CepsScalar, 3, 3> |
Tensor, eigen format.
Definition at line 137 of file CepsTypes.hpp.
using CepsMathTensors = Eigen::Matrix<CepsScalar, 3, Eigen::Dynamic> |
Array of tensors, eigen format.
Definition at line 138 of file CepsTypes.hpp.
using CepsMathVertex = Eigen::Matrix<CepsScalar, 3, 1> |
Vertex, eigen format.
Definition at line 135 of file CepsTypes.hpp.
using CepsMathVertices = Eigen::Matrix<CepsScalar, 3, Eigen::Dynamic> |
Array of vertices, eigen format.
Definition at line 136 of file CepsTypes.hpp.
using CepsMultiMap = std::unordered_multimap<_Key, _Tp, _Hash, _KeyEqual, _Alloc> |
C++ multimap.
Definition at line 205 of file CepsTypes.hpp.
using CepsNodeGlobalIndex = CepsGlobalIndex |
Indices of nodes.
Definition at line 224 of file CepsTypes.hpp.
using CepsNodeLocalIndex = CepsLocalIndex |
Indices of nodes.
Definition at line 225 of file CepsTypes.hpp.
using CepsProcId = CepsUInt |
For CPU indices.
Definition at line 123 of file CepsTypes.hpp.
using CepsReal = float |
Need single precision floating point.
Definition at line 100 of file CepsTypes.hpp.
using CepsReal1D = CepsArray<CepsReal, 1u> |
A real scalar, used like this for compatibility in polynomials.
Definition at line 174 of file CepsTypes.hpp.
using CepsReal2D = CepsArray2<CepsReal> |
Two real scalars, used like this for compatibility in polynomials.
Definition at line 176 of file CepsTypes.hpp.
using CepsReal3D = CepsArray3<CepsReal> |
Three real scalars, used like this for compatibility in polynomials.
Definition at line 178 of file CepsTypes.hpp.
using CepsScalar = CepsReal |
Real numbers.
Definition at line 132 of file CepsTypes.hpp.
using CepsSet = std::set<_Type, _Compare, _Alloc> |
C++ set.
Definition at line 209 of file CepsTypes.hpp.
using CepsSHash = int64_t |
Hashes for coordinates.
Definition at line 221 of file CepsTypes.hpp.
using CepsShort = short |
Short type for custom purposes.
Definition at line 110 of file CepsTypes.hpp.
using CepsSize = size_t |
Size unsigned.
Definition at line 126 of file CepsTypes.hpp.
using CepsString = std::basic_string<CepsChar> |
C++ format string.
Definition at line 128 of file CepsTypes.hpp.
using CepsTuple = std::tuple<_Args...> |
C++ tuple.
Definition at line 188 of file CepsTypes.hpp.
Unsigned version on CepsInt.
Definition at line 109 of file CepsTypes.hpp.
using CepsUnknownIndex = CepsIndex |
For unknowns.
Definition at line 217 of file CepsTypes.hpp.
using CepsVector = std::vector<_Type, _Alloc> |
C++ vector.
Definition at line 155 of file CepsTypes.hpp.
CEPS_DECL_PARALLEL_TYPE | ( | double | , |
ompi_mpi_double | |||
) |
double declaration
CEPS_DECL_PARALLEL_TYPE | ( | float | , |
ompi_mpi_float | |||
) |
float declaration
CEPS_DECL_PARALLEL_TYPE | ( | int16_t | , |
ompi_mpi_int16_t | |||
) |
int16_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | int32_t | , |
ompi_mpi_int32_t | |||
) |
int32_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | int64_t | , |
ompi_mpi_int64_t | |||
) |
int64_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | int8_t | , |
ompi_mpi_int8_t | |||
) |
int8_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | uint16_t | , |
ompi_mpi_uint16_t | |||
) |
uint16_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | uint32_t | , |
ompi_mpi_uint32_t | |||
) |
uint32_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | uint64_t | , |
ompi_mpi_uint64_t | |||
) |
uint64_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | uint8_t | , |
ompi_mpi_uint8_t | |||
) |
uint8_t declaration
CEPS_DECL_PARALLEL_TYPE | ( | void | , |
ompi_mpi_datatype_null | |||
) |
void declaration
|
constexpr |
Default string for things without defined name.
Definition at line 229 of file CepsTypes.hpp.
|
constexpr |
Default string for things without defined unit.
Definition at line 230 of file CepsTypes.hpp.
|
constexpr |
This attribute means "everywhere".
Definition at line 232 of file CepsTypes.hpp.
|
constexpr |
Zero of CepsReal1D.
Definition at line 180 of file CepsTypes.hpp.
|
constexpr |
Zero of CepsReal2D.
Definition at line 182 of file CepsTypes.hpp.
|
constexpr |
Zero of CepsReal3D.
Definition at line 184 of file CepsTypes.hpp.