13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 33d8e8822SJeremy L Thompson // 43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 53d8e8822SJeremy L Thompson // 63d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 73d8e8822SJeremy L Thompson 8b7c563b6SJeremy L Thompson #ifndef libceed_solids_examples_boundary_h 9b7c563b6SJeremy L Thompson #define libceed_solids_examples_boundary_h 105754ecacSJeremy L Thompson 115754ecacSJeremy L Thompson #include <petsc.h> 125754ecacSJeremy L Thompson 13*2b730f8bSJeremy L Thompson typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt, PetscScalar *, void *); 145754ecacSJeremy L Thompson BCFunc BCMMS, BCZero, BCClamp; 155754ecacSJeremy L Thompson 165754ecacSJeremy L Thompson // ----------------------------------------------------------------------------- 175754ecacSJeremy L Thompson // Boundary Functions 185754ecacSJeremy L Thompson // ----------------------------------------------------------------------------- 195754ecacSJeremy L Thompson // Note: If additional boundary conditions are added, an update is needed in 205754ecacSJeremy L Thompson // elasticity.h for the boundaryOptions variable. 215754ecacSJeremy L Thompson 225754ecacSJeremy L Thompson // BCMMS - boundary function 235754ecacSJeremy L Thompson // Values on all points of the mesh is set based on given solution below 245754ecacSJeremy L Thompson // for u[0], u[1], u[2] 25*2b730f8bSJeremy L Thompson PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 265754ecacSJeremy L Thompson 275754ecacSJeremy L Thompson // BCClamp - fix boundary values with affine transformation at fraction of load 285754ecacSJeremy L Thompson // increment 29*2b730f8bSJeremy L Thompson PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx); 305754ecacSJeremy L Thompson 31b7c563b6SJeremy L Thompson #endif // libceed_solids_examples_boundary_h 32