1 // Copyright (c) 2017-2025, 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 #pragma once 8 9 #include <petscsys.h> 10 11 typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt, PetscScalar *, void *); 12 BCFunc BCMMS, BCZero, BCClamp; 13 14 // ----------------------------------------------------------------------------- 15 // Boundary Functions 16 // ----------------------------------------------------------------------------- 17 // Note: If additional boundary conditions are added, an update is needed in 18 // elasticity.h for the boundaryOptions variable. 19 20 // BCMMS - boundary function 21 // Values on all points of the mesh is set based on given solution below 22 // for u[0], u[1], u[2] 23 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 24 25 // BCClamp - fix boundary values with affine transformation at fraction of load 26 // increment 27 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 28