libMesh
Loading...
Searching...
No Matches
fe_interface_macros.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19
20#ifndef LIBMESH_FE_INTERFACE_MACROS_H
21#define LIBMESH_FE_INTERFACE_MACROS_H
22
23#include "libmesh/libmesh_config.h"
24
25#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
26
27#include "libmesh/enum_to_string.h"
28
29#define inf_fe_switch(func_and_args) \
30 do { \
31 switch (dim) \
32 { \
33 case 1: \
34 inf_fe_family_mapping_switch (1, func_and_args, return, ;); \
35 case 2: \
36 inf_fe_family_mapping_switch (2, func_and_args, return, ;); \
37 case 3: \
38 inf_fe_family_mapping_switch (3, func_and_args, return, ;); \
39 default: \
40 libmesh_error_msg("Invalid dim = " << dim); \
41 } \
42 } while (0)
43
44#define inf_fe_family_mapping_switch(dim, func_and_args, prefix, suffix) \
45 do{ \
46 switch(fe_t.inf_map) \
47 { \
48 case CARTESIAN: \
49 { \
50 switch (fe_t.radial_family) \
51 { \
52 case INFINITE_MAP: \
53 prefix InfFE<dim,INFINITE_MAP,CARTESIAN>::func_and_args suffix\
54 case JACOBI_20_00: \
55 prefix InfFE<dim,JACOBI_20_00,CARTESIAN>::func_and_args suffix\
56 case JACOBI_30_00: \
57 prefix InfFE<dim,JACOBI_30_00,CARTESIAN>::func_and_args suffix\
58 case LEGENDRE: \
59 prefix InfFE<dim,LEGENDRE,CARTESIAN>::func_and_args suffix \
60 case LAGRANGE: \
61 prefix InfFE<dim,LAGRANGE,CARTESIAN>::func_and_args suffix \
62 default: \
63 libmesh_error_msg("Invalid radial family = " << Utility::enum_to_string(fe_t.radial_family)); \
64 } \
65 suffix \
66 } \
67 case SPHERICAL: \
68 case ELLIPSOIDAL: \
69 libmesh_not_implemented(); \
70 default: \
71 libmesh_error_msg("Invalid radial mapping " << Utility::enum_to_string(fe_t.inf_map)); \
72 } \
73 } while (0)
74
75#endif //LIBMESH_ENABLE_INFINITE_ELEMENTS
76
77#endif // define LIBMESH_FE_INTERFACE_MACROS_H