xref: /libCEED/examples/solids/include/boundary.h (revision b7c563b6b45e71aa3f6ac850cef50b83565081a6)
1*b7c563b6SJeremy L Thompson #ifndef libceed_solids_examples_boundary_h
2*b7c563b6SJeremy L Thompson #define libceed_solids_examples_boundary_h
35754ecacSJeremy L Thompson 
45754ecacSJeremy L Thompson #include <petsc.h>
55754ecacSJeremy L Thompson 
65754ecacSJeremy L Thompson typedef PetscErrorCode BCFunc(PetscInt, PetscReal, const PetscReal *, PetscInt,
75754ecacSJeremy L Thompson                               PetscScalar *, void *);
85754ecacSJeremy L Thompson BCFunc BCMMS, BCZero, BCClamp;
95754ecacSJeremy L Thompson 
105754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
115754ecacSJeremy L Thompson // Boundary Functions
125754ecacSJeremy L Thompson // -----------------------------------------------------------------------------
135754ecacSJeremy L Thompson // Note: If additional boundary conditions are added, an update is needed in
145754ecacSJeremy L Thompson //         elasticity.h for the boundaryOptions variable.
155754ecacSJeremy L Thompson 
165754ecacSJeremy L Thompson // BCMMS - boundary function
175754ecacSJeremy L Thompson // Values on all points of the mesh is set based on given solution below
185754ecacSJeremy L Thompson // for u[0], u[1], u[2]
195754ecacSJeremy L Thompson PetscErrorCode BCMMS(PetscInt dim, PetscReal load_increment,
205754ecacSJeremy L Thompson                      const PetscReal coords[], PetscInt num_comp_u,
215754ecacSJeremy L Thompson                      PetscScalar *u, void *ctx);
225754ecacSJeremy L Thompson 
235754ecacSJeremy L Thompson // BCClamp - fix boundary values with affine transformation at fraction of load
245754ecacSJeremy L Thompson //   increment
255754ecacSJeremy L Thompson PetscErrorCode BCClamp(PetscInt dim, PetscReal load_increment,
265754ecacSJeremy L Thompson                        const PetscReal coords[], PetscInt num_comp_u,
275754ecacSJeremy L Thompson                        PetscScalar *u, void *ctx);
285754ecacSJeremy L Thompson 
29*b7c563b6SJeremy L Thompson #endif // libceed_solids_examples_boundary_h
30