xref: /libCEED/examples/solids/include/boundary.h (revision d4cc18453651bd0f94c1a2e078b2646a92dafdcc)
1*9ba83ac0SJeremy L Thompson // Copyright (c) 2017-2026, 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
724a65d3dSJeremy L Thompson #pragma once
85754ecacSJeremy L Thompson 
949aac155SJeremy L Thompson #include <petscsys.h>
105754ecacSJeremy L Thompson 
112b730f8bSJeremy L Thompson typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt, PetscScalar *, void *);
125754ecacSJeremy L Thompson BCFunc                 BCMMS, BCZero, BCClamp;
135754ecacSJeremy L Thompson 
145754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
155754ecacSJeremy L Thompson // Boundary Functions
165754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
175754ecacSJeremy L Thompson // Note: If additional boundary conditions are added, an update is needed in
185754ecacSJeremy L Thompson //         elasticity.h for the boundaryOptions variable.
195754ecacSJeremy L Thompson 
205754ecacSJeremy L Thompson // BCMMS - boundary function
215754ecacSJeremy L Thompson // Values on all points of the mesh is set based on given solution below
225754ecacSJeremy L Thompson // for u[0], u[1], u[2]
232b730f8bSJeremy L Thompson PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx);
245754ecacSJeremy L Thompson 
255754ecacSJeremy L Thompson // BCClamp - fix boundary values with affine transformation at fraction of load
265754ecacSJeremy L Thompson //   increment
272b730f8bSJeremy L Thompson PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment, const PetscReal coords[], PetscInt num_comp_u, PetscScalar *u, void *ctx);
28