28 #ifndef SF_INTERFACE_H
29 #define SF_INTERFACE_H
38 #include "openCARP_p.h"
39 #include "openCARP_d.h"
72 #define ALG_TO_NODAL (num_msh+5)
74 #define PETSC_TO_CANONICAL (num_msh+6)
76 #define ELEM_PETSC_TO_CANONICAL (num_msh+7)
79 #define PHYSREG_INTRA_ELEC 0
80 #define PHYSREG_EXTRA_ELEC 1
81 #define PHYSREG_EIKONAL 2
82 #define PHYSREG_MECH 3
83 #define PHYSREG_FLUID 4
84 #define PHYSREG_LAPLACE 5
85 #define PHYSREG_NUM_PHYSICS 6
92 namespace user_globals {
94 extern std::map<mesh_t, sf_mesh>
mesh_reg;
Basic utility structs and functions, mostly IO related.
The scatterer registry class.
Container for a PETSc VecScatter.
Structs and types for (electric) FEM.
SF_nbr
Enumeration encoding the different supported numberings.
@ NBR_PETSC
PETSc numbering of nodes.
std::map< SF::quadruple< int >, SF::index_mapping< int > > map_reg
Registriy for the inter domain mappings.
SF::scatter_registry scatter_reg
Registry for the different scatter objects.
std::map< mesh_t, sf_mesh > mesh_reg
Registry for the different meshes used in a multi-physics simulation.
SF::scattering * get_scattering(const int from, const int to, const SF::SF_nbr nbr, const int dpn)
Get a scattering from the global scatter registry.
sf_mesh & get_mesh(const mesh_t gt)
Get a mesh by specifying the gridID.
SF::scattering * register_scattering(const int from, const int to, const SF::SF_nbr nbr, const int dpn)
Register a scattering between to grids, or between algebraic and nodal representation of data on the ...
SF::scattering * get_permutation(const int mesh_id, const int perm_id, const int dpn)
Get the PETSC to canonical permutation scattering for a given mesh and number of dpn.
SF::abstract_linear_solver< SF_int, SF_real > sf_sol
SF::meshdata< mesh_int_t, mesh_real_t > sf_mesh
bool have_scattering(const int from, const int to, const SF::SF_nbr nbr, const int dpn)
const char * get_mesh_type_name(mesh_t t)
get a char* to the name of a mesh type
bool phys_defined(int physreg)
function to check if certain physics are defined
bool have_permutation(const int mesh_id, const int perm_id, const int dpn)
SF::scattering * register_permutation(const int mesh_id, const int perm_id, const int dpn)
Register a permutation between two orderings for a mesh.
int get_phys_index(int physreg)
get index in param_globals::phys_region array for a certain phys region
mesh_t
The enum identifying the different meshes we might want to load.
bool mesh_is_registered(const mesh_t gt)
check wheter a SF mesh is set
SF::abstract_vector< SF_int, SF_real > sf_vec
SF::abstract_matrix< SF_int, SF_real > sf_mat