xref: /libCEED/examples/solids/include/boundary.h (revision 78a9fcb6bae7d7246469592ed2b1811dbe8e744f)
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 <petsc.h>
12 
13 typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt,
14                               PetscScalar *, void *);
15 BCFunc BCMMS, BCZero, BCClamp;
16 
17 // -----------------------------------------------------------------------------
18 // Boundary Functions
19 // -----------------------------------------------------------------------------
20 // Note: If additional boundary conditions are added, an update is needed in
21 //         elasticity.h for the boundaryOptions variable.
22 
23 // BCMMS - boundary function
24 // Values on all points of the mesh is set based on given solution below
25 // for u[0], u[1], u[2]
26 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment,
27                      const PetscReal coords[], PetscInt num_comp_u,
28                      PetscScalar *u, void *ctx);
29 
30 // BCClamp - fix boundary values with affine transformation at fraction of load
31 //   increment
32 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment,
33                        const PetscReal coords[], PetscInt num_comp_u,
34                        PetscScalar *u, void *ctx);
35 
36 #endif // libceed_solids_examples_boundary_h
37