openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
SF_globals.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) NumeriCor GmbH
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #ifndef _SF_GLOBALS_H
5 #define _SF_GLOBALS_H
6 
7 #include <cstdint>
8 #include <mpi.h>
9 #include "opencarp_types.h"
10 
11 // This defines are used in multiple header files so have to put them here
13 #define SF_COMM MPI_COMM_WORLD
15 #define SF_MPITAG 100
16 
17 using SF_int = opencarp::global_index_t;
18 using SF_real = opencarp::real_t;
19 
20 // Define the global int and real types used in SlimFem
21 #ifdef WITH_PETSC
22 #include <petscsys.h>
23 static_assert(sizeof(PetscInt) == sizeof(opencarp::global_index_t),
24  "PetscInt size must match opencarp::global_index_t");
25 static_assert(sizeof(PetscReal) == sizeof(opencarp::real_t),
26  "PetscReal size must match opencarp::real_t");
27 #endif // WITH_PETSC
28 
29 
30 #endif // _SF_GLOBALS_H
opencarp::real_t SF_real
Global scalar type.
Definition: SF_globals.h:18
opencarp::global_index_t SF_int
Global algebraic index type.
Definition: SF_globals.h:17