1*3d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2*3d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3*3d8e8822SJeremy L Thompson // 4*3d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 5*3d8e8822SJeremy L Thompson // 6*3d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 7*3d8e8822SJeremy L Thompson 85754ecacSJeremy L Thompson #ifndef problems_h 95754ecacSJeremy L Thompson #define problems_h 105754ecacSJeremy L Thompson 115754ecacSJeremy L Thompson #include <ceed.h> 125754ecacSJeremy L Thompson #include <petsc.h> 135754ecacSJeremy L Thompson #include "../problems/cl-problems.h" 145754ecacSJeremy L Thompson #include "../problems/neo-hookean.h" 155754ecacSJeremy L Thompson #include "../problems/mooney-rivlin.h" 165754ecacSJeremy L Thompson 175754ecacSJeremy L Thompson // Physics options 185754ecacSJeremy L Thompson #define SOLIDS_PROBLEM_REGISTER(list, name, fname, physics) \ 195754ecacSJeremy L Thompson ierr = PetscFunctionListAdd(&list->setupPhysics, name, \ 205754ecacSJeremy L Thompson PhysicsContext_ ## physics); CHKERRQ(ierr); \ 215754ecacSJeremy L Thompson ierr = PetscFunctionListAdd(&list->setupSmootherPhysics, name, \ 225754ecacSJeremy L Thompson PhysicsSmootherContext_ ## physics); CHKERRQ(ierr); \ 235754ecacSJeremy L Thompson ierr = PetscFunctionListAdd(&list->setupLibceedFineLevel, name, \ 245754ecacSJeremy L Thompson SetupLibceedFineLevel_ ## fname); CHKERRQ(ierr); \ 255754ecacSJeremy L Thompson ierr = PetscFunctionListAdd(&list->setupLibceedLevel, name, \ 265754ecacSJeremy L Thompson SetupLibceedLevel_ ## fname); CHKERRQ(ierr); \ 275754ecacSJeremy L Thompson 285754ecacSJeremy L Thompson typedef struct ProblemFunctions_ *ProblemFunctions; 295754ecacSJeremy L Thompson struct ProblemFunctions_ { 305754ecacSJeremy L Thompson PetscFunctionList setupPhysics, setupSmootherPhysics, setupLibceedFineLevel, 315754ecacSJeremy L Thompson setupLibceedLevel; 325754ecacSJeremy L Thompson }; 335754ecacSJeremy L Thompson 345754ecacSJeremy L Thompson PetscErrorCode RegisterProblems(ProblemFunctions problem_functions); 355754ecacSJeremy L Thompson 365754ecacSJeremy L Thompson #define SOLIDS_PROBLEM(name) \ 375754ecacSJeremy L Thompson PetscErrorCode SetupLibceedFineLevel_ ## name (DM dm, DM dm_energy, \ 385754ecacSJeremy L Thompson DM dm_diagnostic, Ceed ceed, AppCtx app_ctx, CeedQFunctionContext phys_ctx, \ 395754ecacSJeremy L Thompson PetscInt fine_level, PetscInt num_comp_u, PetscInt U_g_size, \ 405754ecacSJeremy L Thompson PetscInt U_loc_size, CeedVector force_ceed, CeedVector neumann_ceed, \ 415754ecacSJeremy L Thompson CeedData *data); \ 425754ecacSJeremy L Thompson PetscErrorCode SetupLibceedLevel_ ## name (DM dm, Ceed ceed, \ 435754ecacSJeremy L Thompson AppCtx app_ctx, PetscInt level, PetscInt num_comp_u, PetscInt U_g_size, \ 445754ecacSJeremy L Thompson PetscInt u_loc_size, CeedVector fine_mult, CeedData *data); \ 455754ecacSJeremy L Thompson 465754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasLinear); 475754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasSSNH); 485754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasFSCurrentNH1); 495754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasFSCurrentNH2); 505754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasFSInitialNH1); 515754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasFSInitialNH2); 525754ecacSJeremy L Thompson SOLIDS_PROBLEM(ElasFSInitialMR1); 535754ecacSJeremy L Thompson 545754ecacSJeremy L Thompson #endif //problems_h 55