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