// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. // // SPDX-License-Identifier: BSD-2-Clause // // This file is part of CEED: http://github.com/ceed /// @file /// Linear elasticity manufactured solution forcing term for solid mechanics example using PETSc #ifndef MANUFACTURED_H #define MANUFACTURED_H #include #include #ifndef PHYSICS_STRUCT #define PHYSICS_STRUCT typedef struct Physics_private *Physics; struct Physics_private { CeedScalar nu; // Poisson's ratio CeedScalar E; // Young's Modulus }; #endif // ----------------------------------------------------------------------------- // Forcing term for linear elasticity manufactured solution // ----------------------------------------------------------------------------- CEED_QFUNCTION(SetupMMSForce)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) { // Inputs const CeedScalar *coords = in[0], *q_data = in[1]; // Outputs CeedScalar *force = out[0]; // Context const Physics context = (Physics)ctx; const CeedScalar E = context->E; const CeedScalar nu = context->nu; // Quadrature Point Loop CeedPragmaSIMD for (CeedInt i=0; i