xref: /libCEED/examples/solids/include/boundary.h (revision d4cc18453651bd0f94c1a2e078b2646a92dafdcc)
1 // Copyright (c) 2017-2026, 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