1 // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3 // 4 // SPDX-License-Identifier: BSD-2-Clause 5 // 6 // This file is part of CEED: http://github.com/ceed 7 8 #ifndef libceed_solids_examples_boundary_h 9 #define libceed_solids_examples_boundary_h 10 11 #include <petscsys.h> 12 13 typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt, PetscScalar *, void *); 14 BCFunc BCMMS, BCZero, BCClamp; 15 16 // ----------------------------------------------------------------------------- 17 // Boundary Functions 18 // ----------------------------------------------------------------------------- 19 // Note: If additional boundary conditions are added, an update is needed in 20 // elasticity.h for the boundaryOptions variable. 21 22 // BCMMS - boundary function 23 // Values on all points of the mesh is set based on given solution below 24 // for u[0], u[1], u[2] 25 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 26 27 // BCClamp - fix boundary values with affine transformation at fraction of load 28 // increment 29 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 30 31 #endif // libceed_solids_examples_boundary_h 32