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