openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
SF_globals.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 
19 #ifndef _SF_GLOBALS_H
20 #define _SF_GLOBALS_H
21 
22 #include <cstdint>
23 #include <mpi.h>
24 #include "opencarp_types.h"
25 
26 // This defines are used in multiple header files so have to put them here
28 #define SF_COMM MPI_COMM_WORLD
30 #define SF_MPITAG 100
31 
32 using SF_int = opencarp::global_index_t;
33 using SF_real = opencarp::real_t;
34 
35 // Define the global int and real types used in SlimFem
36 #ifdef WITH_PETSC
37 #include <petscsys.h>
38 static_assert(sizeof(PetscInt) == sizeof(opencarp::global_index_t),
39  "PetscInt size must match opencarp::global_index_t");
40 static_assert(sizeof(PetscReal) == sizeof(opencarp::real_t),
41  "PetscReal size must match opencarp::real_t");
42 #endif // WITH_PETSC
43 
44 
45 #endif // _SF_GLOBALS_H
opencarp::real_t SF_real
Global scalar type.
Definition: SF_globals.h:33
opencarp::global_index_t SF_int
Global algebraic index type.
Definition: SF_globals.h:32