xref: /libCEED/examples/solids/include/boundary.h (revision 7fcac03628df7c326a56de618266f195cb34c506)
1 #ifndef boundary_h
2 #define boundary_h
3 
4 #include <petsc.h>
5 
6 typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt,
7                               PetscScalar *, void *);
8 BCFunc BCMMS, BCZero, BCClamp;
9 
10 // -----------------------------------------------------------------------------
11 // Boundary Functions
12 // -----------------------------------------------------------------------------
13 // Note: If additional boundary conditions are added, an update is needed in
14 //         elasticity.h for the boundaryOptions variable.
15 
16 // BCMMS - boundary function
17 // Values on all points of the mesh is set based on given solution below
18 // for u[0], u[1], u[2]
19 PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment,
20                      const PetscReal coords[], PetscInt num_comp_u,
21                      PetscScalar *u, void *ctx);
22 
23 // BCClamp - fix boundary values with affine transformation at fraction of load
24 //   increment
25 PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment,
26                        const PetscReal coords[], PetscInt num_comp_u,
27                        PetscScalar *u, void *ctx);
28 
29 #endif //boundary_h
30