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