xref: /libCEED/rust/libceed-sys/c-src/interface/ceed-qfunction-register.c (revision 3d576824e8d990e1f48c6609089904bee9170514)
1 #include <ceed.h>
2 #include <ceed-backend.h>
3 #include <stdbool.h>
4 
5 static bool register_all_called;
6 
7 #define MACRO(name) CEED_INTERN int name(void);
8 #include "../gallery/ceed-gallery-list.h"
9 #undef MACRO
10 
11 /**
12   @brief Register the gallery of preconfigured QFunctions.
13 
14   This is called automatically by CeedQFunctionCreateInteriorByName() and thus normally need not be called by users.
15   Users can call CeedQFunctionRegister() to register additional backends.
16 
17   @return An error code: 0 - success, otherwise - failure
18 
19   @sa CeedQFunctionRegister()
20 
21   @ref User
22 **/
23 int CeedQFunctionRegisterAll() {
24   if (register_all_called) return 0;
25   register_all_called = true;
26 
27 #define MACRO(name) CeedChk(name());
28 #include "../gallery/ceed-gallery-list.h"
29 #undef MACRO
30   return 0;
31 }
32