xref: /libCEED/examples/solids/problems/neo-hookean.h (revision 4f69910b6e3819988a1446e35e0e85e74672bc23)
1 // Copyright (c) 2017-2025, 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 #pragma once
8 
9 #include <ceed.h>
10 #include <petsc.h>
11 
12 #include "../include/structs.h"
13 
14 #ifndef PHYSICS_STRUCT_NH
15 #define PHYSICS_STRUCT_NH
16 typedef struct Physics_NH_ *Physics_NH;
17 struct Physics_NH_ {
18   CeedScalar nu;  // Poisson's ratio
19   CeedScalar E;   // Young's Modulus
20 };
21 #endif  // PHYSICS_STRUCT_NH
22 
23 // Create context object
24 PetscErrorCode PhysicsContext_NH(MPI_Comm comm, Ceed ceed, Units *units, CeedQFunctionContext *ctx);
25 PetscErrorCode PhysicsSmootherContext_NH(MPI_Comm comm, Ceed ceed, CeedQFunctionContext ctx, CeedQFunctionContext *ctx_smoother);
26 
27 // Process physics options
28 PetscErrorCode ProcessPhysics_NH(MPI_Comm comm, Physics_NH phys, Units units);
29