1 #ifndef problems_h 2 #define problems_h 3 4 #include <ceed.h> 5 #include <petsc.h> 6 #include "../problems/cl-problems.h" 7 #include "../problems/neo-hookean.h" 8 #include "../problems/mooney-rivlin.h" 9 10 // Physics options 11 #define SOLIDS_PROBLEM_REGISTER(list, name, fname, physics) \ 12 ierr = PetscFunctionListAdd(&list->setupPhysics, name, \ 13 PhysicsContext_ ## physics); CHKERRQ(ierr); \ 14 ierr = PetscFunctionListAdd(&list->setupSmootherPhysics, name, \ 15 PhysicsSmootherContext_ ## physics); CHKERRQ(ierr); \ 16 ierr = PetscFunctionListAdd(&list->setupLibceedFineLevel, name, \ 17 SetupLibceedFineLevel_ ## fname); CHKERRQ(ierr); \ 18 ierr = PetscFunctionListAdd(&list->setupLibceedLevel, name, \ 19 SetupLibceedLevel_ ## fname); CHKERRQ(ierr); \ 20 21 typedef struct ProblemFunctions_ *ProblemFunctions; 22 struct ProblemFunctions_ { 23 PetscFunctionList setupPhysics, setupSmootherPhysics, setupLibceedFineLevel, 24 setupLibceedLevel; 25 }; 26 27 PetscErrorCode RegisterProblems(ProblemFunctions problem_functions); 28 29 #define SOLIDS_PROBLEM(name) \ 30 PetscErrorCode SetupLibceedFineLevel_ ## name (DM dm, DM dm_energy, \ 31 DM dm_diagnostic, Ceed ceed, AppCtx app_ctx, CeedQFunctionContext phys_ctx, \ 32 PetscInt fine_level, PetscInt num_comp_u, PetscInt U_g_size, \ 33 PetscInt U_loc_size, CeedVector force_ceed, CeedVector neumann_ceed, \ 34 CeedData *data); \ 35 PetscErrorCode SetupLibceedLevel_ ## name (DM dm, Ceed ceed, \ 36 AppCtx app_ctx, PetscInt level, PetscInt num_comp_u, PetscInt U_g_size, \ 37 PetscInt u_loc_size, CeedVector fine_mult, CeedData *data); \ 38 39 SOLIDS_PROBLEM(ElasLinear); 40 SOLIDS_PROBLEM(ElasSSNH); 41 SOLIDS_PROBLEM(ElasFSCurrentNH1); 42 SOLIDS_PROBLEM(ElasFSCurrentNH2); 43 SOLIDS_PROBLEM(ElasFSInitialNH1); 44 SOLIDS_PROBLEM(ElasFSInitialNH2); 45 SOLIDS_PROBLEM(ElasFSInitialMR1); 46 47 #endif //problems_h 48