Material Models#

Each RatelMaterial is responsible for adding volumetric terms to the residual, Jacobian, and diagnostic quantity evaluation operators as well as any surface terms that require volumetric or material model values. Additionally, each RatelMaterial is responsible for building and modifying corresponding preconditioner components, as needed.

typedef PetscErrorCode (*RatelMaterialSetupMultigridLevelFunction)(RatelMaterial material, DM dm_level, CeedVector m_loc, CeedOperator sub_op_fine, CeedOperator op_coarse, CeedOperator op_prolong, CeedOperator op_restrict)#

Material model multigrid level setup function.

typedef int (*RatelComputef1)(void*, CeedInt, CeedInt, const CeedScalar *const*, CeedScalar *const*, CeedScalar[3][3], CeedScalar[3][3])#
typedef int (*RatelComputef1_fwd)(void*, CeedInt, CeedInt, const CeedScalar *const*, CeedScalar *const*, CeedScalar[3][3], CeedScalar[3][3])#
typedef int (*RatelComputef1_Mixed)(void*, CeedInt, CeedInt, const CeedScalar *const*, CeedScalar *const*, CeedScalar[3][3], CeedScalar[3][3], CeedScalar*)#
typedef int (*RatelComputedf1_fwd_Mixed)(void*, CeedInt, CeedInt, const CeedScalar *const*, CeedScalar *const*, CeedScalar[3][3], CeedScalar[3][3], CeedScalar*, CeedScalar*)#
typedef int (*RatelComputeg0_Mixed)(void*, CeedInt, CeedInt, const CeedScalar *const*, const CeedScalar, CeedScalar *const*, CeedScalar*)#
typedef int (*RatelComputedg0_fwd_Mixed)(void*, CeedInt, CeedInt, const CeedScalar *const*, const CeedScalar, const CeedScalar, CeedScalar *const*, CeedScalar*)#
struct RatelModelParameterData_private elasticity_damage_param_data_private#

Elasticity+damage model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData elasticity_damage_param_data = &elasticity_damage_param_data_private#
struct RatelModelParameterData_private mixed_neo_hookean_param_data_private#

Mixed Neo-Hookean model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData mixed_neo_hookean_param_data = &mixed_neo_hookean_param_data_private#
struct RatelModelParameterData_private mms_ceed_bps_param_data_private#

CEED BPs MMS model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData mms_ceed_bps_param_data = &mms_ceed_bps_param_data_private#
struct RatelModelParameterData_private mms_linear_elasticity_param_data_private#

Linear elasticity MMS model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData mms_linear_elasticity_param_data = &mms_linear_elasticity_param_data_private#
struct RatelModelParameterData_private mooney_rivlin_param_data_private#

Mooney-Rivlin model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData mooney_rivlin_param_data = &mooney_rivlin_param_data_private#
struct RatelModelParameterData_private neo_hookean_param_data_private#

Neo-Hookean model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData neo_hookean_param_data = &neo_hookean_param_data_private#
struct RatelModelParameterData_private ogden_param_data_private#

Ogden model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData ogden_param_data = &ogden_param_data_private#
struct RatelModelParameterData_private plasticity_linear_param_data_private#

Linear plasticity model parameters for CeedQFunctionContext and viewing.

RatelModelParameterData plasticity_linear_param_data = &plasticity_linear_param_data_private#
int RestrictBoundingBox(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Restrict the bounding box of the domain to a given bounding box.

Parameters:
  • ctx[in] QFunction context, RatelBoundingBoxContext

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - x, physical (initial) coordinates

    • 1 - scale, multiplicity scaling factor

    • 2 - r, current timestep residual

  • out[out] Output array

    • 0 - v, current timestep residual restricted to bounding box

Returns:

An error code: 0 - success, otherwise - failure

int SetupSurfaceForceGeometry(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute geometric factors for integration, gradient transformations, and coordinate transformations on element faces.

Reference (parent) 2D coordinates are given by X and physical (current) 3D coordinates are given by x. The change of coordinate matrix is given bydxdX_{i,j} = dx_i/dX_j (indicial notation) [3 * 2].

(N_1, N_2, N_3) is given by the cross product of the columns of dxdX_{i,j}.

detNb is the magnitude of (N_1, N_2, N_3).

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - Jacobian of cell coordinates

    • 1 - Jacobian of face coordinates

    • 2 - quadrature weights

  • out[out] Output array

    • 0 - qdata, w detNb, dXdx, and N

Returns:

An error code: 0 - success, otherwise - failure

int SetupSurfaceGeometryBounded(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute geometric factors for integration, gradient transformations, and coordinate transformations on element faces, restricted by a bounding box.

Reference (parent) 2D coordinates are given by X and physical (current) 3D coordinates are given by x. The change of coordinate matrix is given bydxdX_{i,j} = dx_i/dX_j (indicial notation) [3 * 2].

(N_1, N_2, N_3) is given by the cross product of the columns of dxdX_{i,j}.

detNb is the magnitude of (N_1, N_2, N_3).

Parameters:
  • ctx[in] QFunction context, RatelBoundingBox

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - Face coordinates

    • 1 - Jacobian of face coordinates

    • 2 - quadrature weights

  • out[out] Output array

    • 0 - qdata, w detNb and N

Returns:

An error code: 0 - success, otherwise - failure

int SetupSurfaceGeometry(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute geometric factors for integration, gradient transformations, and coordinate transformations on element faces.

Reference (parent) 2D coordinates are given by X and physical (current) 3D coordinates are given by x. The change of coordinate matrix is given bydxdX_{i,j} = dx_i/dX_j (indicial notation) [3 * 2].

(N_1, N_2, N_3) is given by the cross product of the columns of dxdX_{i,j}.

detNb is the magnitude of (N_1, N_2, N_3).

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - Jacobian of face coordinates

    • 1 - quadrature weights

  • out[out] Output array

    • 0 - qdata, w detNb and N

Returns:

An error code: 0 - success, otherwise - failure

int SetupVolumeGeometry(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute geometric factors for integration, gradient transformations, and coordinate transformations in elements.

Reference (parent) coordinates are given by X and physical (current) coordinates are given by x. Change of coordinate matrix is given by dxdX_{i,j} = x_{i,j} (indicial notation). Inverse of change of coordinate matrix is given by dXdx_{i,j} = (detJ^-1) * X_{i,j}.

We require the transpose of the inverse of the Jacobian to properly compute integrals of the form int( gradv u ).

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - Jacobian of cell coordinates

    • 1 - quadrature weights

  • out[out] Output array

    • 0 - qdata, w detJ and dXdx

Returns:

An error code: 0 - success, otherwise - failure

int SetupVolumeGeometrySymmetric(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute symmetric geometric factors for integration, gradient transformations, and coordinate transformations in elements.

Reference (parent) coordinates are given by X and physical (current) coordinates are given by x. Change of coordinate matrix is given by dxdX_{i,j} = x_{i,j} (indicial notation). Inverse of change of coordinate matrix is given by dXdx_{i,j} = (detJ^-1) * X_{i,j}.

We require the transpose of the inverse of the Jacobian to properly compute integrals of the form int( gradv u ).

Inverse of Jacobian is given by dXdx_i,j = Aij / detJ. We store w A^T A / detJ, which is symmetric, so we only store 6 distinct entries.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - Jacobian of cell coordinates

    • 1 - quadrature weights

  • out[out] Output array

    • 0 - qdata, w detJ and dXdx_sym

Returns:

An error code: 0 - success, otherwise - failure

int Residual_CEED_BP1(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the residual for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - interpolated values of u

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Jacobian_CEED_BP1(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the Jacobian for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - interpolated values of du

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_CEED_BP1(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the diagnostic quantities for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - u

  • out[out] Output array

    • 0 - diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int Residual_CEED_BP2(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the residual for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - interpolated values of u

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Jacobian_CEED_BP2(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the Jacobian for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - interpolated values of du

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_CEED_BP2(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the diagnostic values for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - u

  • out[out] Output array

    • 0 - diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int Residual_CEED_BP3(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the residual for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Jacobian_CEED_BP3(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the Jacobian for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of du

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_CEED_BP3(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the diagnostic quantities for the CEED scalar BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - u

  • out[out] Output array

    • 0 - diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int Residual_CEED_BP4(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the residual for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Jacobian_CEED_BP4(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the Jacobian for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of du

  • out[out] Output array

    • 0 - action of the QFunction

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_CEED_BP4(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute the diagnostic values for the CEED vector BP problem.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - u

  • out[out] Output array

    • 0 - diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int DualDiagnostic(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute dual space diagnostic values.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

  • out[out] Output array

    • 0 - nodal volume

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual(void *ctx, CeedInt Q, RatelComputef1 compute_f1, bool has_state_values, bool has_stored_values, CeedInt num_active_field_eval_modes, const CeedScalar *const *in, CeedScalar *const *out)#

Compute elasticity residual evaluation.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • compute_f1[in] Function to compute action of f1

  • has_state_values[in] Boolean flag indicating model state values in residual evaluation

  • has_stored_values[in] Boolean flag indicating model stores values in residual evaluation

  • num_active_field_eval_modes[in] Number of active field evaluation modes

  • in[in] Input arrays

    • 0 - volumetric qdata

  • out[out] Output array

    • output_data_offset - action of QFunction

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian(void *ctx, CeedInt Q, RatelComputef1_fwd compute_df1, CeedInt num_active_field_eval_modes, bool has_stored_values, bool has_state_values, const CeedScalar *const *in, CeedScalar *const *out)#

Compute elasticity Jacobian evaluation.

Parameters:
  • ctx[in] QFunction context, holding common parameters and model parameters

  • Q[in] Number of quadrature points

  • compute_df1[in] Function to compute action of df1

  • has_state_values[in] Boolean flag indicating model state values in residual evaluation

  • has_stored_values[in] Boolean flag indicating model stores values in residual evaluation

  • num_active_field_eval_modes[in] Number of active field evaluation modes

  • in[in] Input arrays

    • 0 - volumetric qdata

    • input_data_offset - incremental change in u

  • out[out] Output array

    • 0 - action of QFunction

    • 1 - action of QFunction dynamic solver term

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_IsochoricMooneyRivlin(CeedScalar bulk, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • J_pow[in] J^{-2/3}

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_IsochoricMooneyRivlin(CeedScalar bulk, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_IsochoricMooneyRivlin_fwd(CeedScalar bulk, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6])#

Compute derivative of second Kirchoff stress for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_IsochoricMooneyRivlin(CeedScalar bulk, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar FdSFTranspose[3][3])#

Compute F*dS*F^T for isochoric Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • bulk[in] Bulk modulus

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1; J - 1

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int Energy_IsochoricMooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_IsochoricMooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

    • 3 - p

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_IsochoricMooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for isochoric Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricMooneyRivlinCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for isochoric Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored, dXdx, e, J - 1 and J^{-2/3}

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricMooneyRivlinCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of df1 for isochoric Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, e, J - 1 and J^{-2/3}

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricMooneyRivlinCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricMooneyRivlinCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricMooneyRivlinInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricMooneyRivlinInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricMooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricMooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_IsochoricMooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_IsochoricMooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for isochoric Mooney-Rivlin hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_IsochoricNeoHookean(CeedScalar bulk, CeedScalar two_mu, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for isochoric neo-Hookean hyperelasticity.

tau = 0.5 * bulk * (J^2-1) I + 2 mu J^{-2/3} e_dev

Parameters:
  • bulk[in] Bulk modulus

  • two_mu[in] Two times the shear modulus

  • Jm1[in] Determinant of deformation gradient - 1; J - 1

  • J_pow[in] J^{-2/3}

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_IsochoricNeoHookean(CeedScalar bulk, CeedScalar two_mu, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for isochoric neo-Hookean hyperelasticity.

S = 0.5 * bulk * (J^2-1) C_inv + 2 mu J^{-2/3} C_inv * E_dev

Parameters:
  • bulk[in] Bulk modulus

  • two_mu[in] Two times the shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_IsochoricNeoHookean_fwd(CeedScalar bulk, CeedScalar mu, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6])#

Compute derivative of second Kirchoff stress for isochoric neo-Hookean hyperelasticity.

dS = dS_vol + dS_iso dS_vol = bulk J^2 (C_inv:dE) C_inv + 0.5 * bulk * (J^2-1) dC_inv dS_iso = -4/3 mu J^(-2/3) (C_inv:dE) C_inv * E_dev - 1/3 mu J^(-2/3) dS_iso1 dS_iso1 = 2 tr(dE) C_inv + I1(C) dC_inv

Parameters:
  • bulk[in] Bulk modulus

  • mu[in] Shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_IsochoricNeoHookean(CeedScalar bulk, CeedScalar mu, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar FdSFTranspose[3][3])#

Compute F*dS*F^T for isochoric neo-Hookean hyperelasticity in current configuration.

Parameters:
  • bulk[in] Bulk modulus

  • mu[in] Shear modulus

  • Jm1[in] Determinant of deformation gradient - 1; J - 1

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int Energy_IsochoricNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for isochoric neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_IsochoricNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for isochoric neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

    • 3 - p

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_IsochoricNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for isochoric neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for isochoric neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored, dXdx, e, J - 1 and J^{-2/3}

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of df1 for isochoric neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, e, J - 1 and J^{-2/3}

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_IsochoricNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_IsochoricNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for isochoric neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_IsochoricOgden(CeedScalar bulk, CeedScalar Jm1, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar J_pow_alpha[3], const CeedScalar series_terms[9], const CeedScalar e_vals[3], const CeedScalar e_vecs[3][3], CeedScalar tau_sym[6])#

Compute Kirchoff tau for isochoric Ogden hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • J_pow_alpha[in] Array of J^{-alpha[j]/3}, j=1..3

  • series_terms[in] Series terms

  • e_vals[in] Eigenvalues of Green Euler strain tensor

  • e_vecs[in] Eigenvectors of Green Euler strain tensor

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int SecondKirchhoffStress_IsochoricOgden(CeedScalar bulk, CeedScalar Jm1, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for isochoric Ogden hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int SecondKirchhoffStress_IsochoricOgden_fwd(CeedScalar bulk, CeedScalar Jm1, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6])#

Compute derivative of second Kirchoff stress for isochoric Ogden hyperelasticity.

Parameters:
  • bulk[in] Bulk modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_IsochoricOgden(CeedScalar bulk, CeedScalar Jm1, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar J_pow_alpha[3], const CeedScalar series_terms[9], const CeedScalar grad_du[3][3], const CeedScalar e_vals[3], const CeedScalar e_vecs[3][3], CeedScalar FdSFTranspose[3][3])#

Compute F*dS*F^T for isochoric Ogden hyperelasticity in current configuration.

Parameters:
  • bulk[in] Bulk modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • J_pow_alpha[in] Array of J^{-alpha[j]/3}, j=1..3

  • series_terms[in] Series terms

  • grad_du[in] Gradient of incremental change in u

  • e_vals[in] Eigenvalues of Green Euler strain tensor

  • e_vecs[in] Eigenvectors of Green Euler strain tensor

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int Energy_IsochoricOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for isochoric Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_IsochoricOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for isochoric Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_IsochoricOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for isochoric Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricOgdenCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for isochoric Ogden hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored, dXdx, e, J - 1 and J^{-alpha[j]/3}

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricOgdenCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of tau for isochoric Ogden hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored, dXdx, e, J - 1 and J^{-alpha[j]/3}

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricOgdenCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric Ogden hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricOgdenCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric Ogden hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_IsochoricOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_IsochoricOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_IsochoricOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_IsochoricOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_IsochoricOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_IsochoricOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for isochoric Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

CeedScalar PsiPlusLinear(const CeedScalar mu, const CeedScalar bulk, const CeedScalar trace_e, const CeedScalar ed[6])#

Compute Psi_plus for linear elasticity with damage.

Parameters:
  • mu[in] shear modulus

  • bulk[in] bulk modulus

  • trace_e[in] trace strain tensor

  • ed[out] deviatoric strain tensor

Returns:

Psi_plus

int ElasticityDamage_Residual(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for linear elasticity with damage.

Parameters:
  • ctx[in] QFunction context, holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - Psi_plus state

    • 2 - u (four components: 3 displacement components, 1 scalar damage field)

    • 3 - u_g gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - Psi_plus updated

    • 1 - stored vector

    • 2 - action on u

    • 3 - action on u_g

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityDamage_Jacobian(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute jacobian for linear elasticity with damage.

Parameters:
  • ctx[in] QFunction context, holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - Psi_plus state

    • 2 - du (four components: 3 displacement components, 1 damage field)

    • 3 - du_g gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - Psi_plus updated

    • 1 - stored vector

    • 2 - action on du

    • 3 - action on du_g

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_ElasticityDamage(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for linear elasticity with damage.

Parameters:
  • ctx[in] QFunction context holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u (four components: 3 displacement components, 1 scalar damage field)

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int Energy_ElasticityDamage(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute (degraded) strain energy for linear elasticity+damage.

Parameters:
  • ctx[in] QFunction context holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u (4 components)

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - (degraded) strain energy

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_ElasticityDamage(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute (degraded) surface force for linear elasticity+damage.

Parameters:
  • ctx[in] QFunction context holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u (4 components)

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force value

Returns:

An error code: 0 - success, otherwise - failure

int Platen_ElasticityDamage_Residual(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar sigma_degr[3][3])#

Compute platens residual for linear elasticity with damage.

Parameters:
  • ctx[in] QFunction context, holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • i[in] Index

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 2 - u (four components: 3 displacement components, 1 scalar damage field)

    • 3 - u_g gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 1 - stored vector

    • 2 - initializing v

  • dXdx[out] dXdx

  • sigma_degr[out] Degraded stress tensor

Returns:

An error code: 0 - success, otherwise - failure

int Platen_ElasticityDamage_Jacobian(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar dsigma_degr[3][3])#

Compute platens jacobian for linear elasticity with damage.

Parameters:
  • ctx[in] QFunction context, holding ElasticityDamageParams

  • Q[in] Number of quadrature points

  • i[in] Index

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 2 - du (four components: 3 displacement components, 1 damage field)

    • 3 - du_g gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - initializing dv

  • dXdx[out] dXdx

  • dsigma_degr[out] Linearization of degraded stress tensor

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_ElasticityDamage(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for linear elasticity+damage.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_ElasticityDamage(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for linear elasticity+damage.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_Linear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute Sigma for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = Sigma = lambda*trace(e)I + 2 mu e

Returns:

An error code: 0 - success, otherwise - failure

int df1_Linear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of Sigma for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dSigma = lambda tr(de) I + 2 mu de

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int Energy_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_Linear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding LinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int MixedElasticityResidual(void *ctx, CeedInt Q, RatelComputef1_Mixed compute_f1_mixed, RatelComputeg0_Mixed compute_g0_mixed, bool has_state_values, bool has_stored_values, CeedInt num_active_field_eval_modes, const CeedScalar *const *in, CeedScalar *const *out)#

Compute mixed elasticity residual evaluation.

Parameters:
  • ctx[in] QFunction context, unused

  • Q[in] Number of quadrature points

  • compute_f1_mixed[in] Function to compute action of f1

  • compute_g0_mixed[in] Function to compute action of g0

  • has_state_values[in] Boolean flag indicating model state values in residual evaluation

  • has_stored_values[in] Boolean flag indicating model stores values in residual evaluation

  • num_active_field_eval_modes[in] Number of active field evaluation modes

  • in[in] Input arrays

    • 0 - volumetric qdata

  • out[out] Output array

    • output_data_offset - action of QFunction on displacement

    • output_data_offset + 1 - action of QFunction on pressure

Returns:

An error code: 0 - success, otherwise - failure

int MixedElasticityJacobian(void *ctx, CeedInt Q, RatelComputedf1_fwd_Mixed compute_df1_mixed, RatelComputedg0_fwd_Mixed compute_dg0_mixed, bool has_state_values, bool has_stored_values, CeedInt num_active_field_eval_modes, const CeedScalar *const *in, CeedScalar *const *out)#

Compute mixed elasticity Jacobian evaluation.

Parameters:
  • ctx[in] QFunction context, holding common parameters and model parameters

  • Q[in] Number of quadrature points

  • compute_df1_mixed[in] Function to compute action of df1

  • compute_dg0_mixed[in] Function to compute action of dg0

  • has_state_values[in] Boolean flag indicating model state values in residual evaluation

  • has_stored_values[in] Boolean flag indicating model stores values in residual evaluation

  • num_active_field_eval_modes[in] Number of active field evaluation modes

  • in[in] Input arrays

    • 0 - volumetric qdata

    • input_data_offset - incremental change in u

  • out[out] Output array

    • 0 - action of QFunction on displacement

    • 1 - action of QFunction on pressure

    • 2 - action of QFunction dynamic solver term

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *trace_e)#

Compute Sigma for linear mixed elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = Sigma = (bulk_primal * tr(e) - p) * I + 2 * mu * e_dev

  • trace_e[out] Divergence of u = trace_e needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar trace_e, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - p

  • trace_e[in] Divergence of u = trace_e computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = -div(u) - p/(bulk - bulk_primal)

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *trace_de, CeedScalar *Cinv_contract_dE)#

Compute linearization of Sigma for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of incremental change to u with respect to reference coordinates

    • 2 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dSigma = -dp*I + 2*mu*de_dev

  • trace_de[out] Linearization of div(u): div_du = trace_de

  • Cinv_contract_dE[out] C_inv:dE, unused for mixed linear elasticity

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar trace_de, const CeedScalar Cinv_contract_dE, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - dp

  • trace_de[in] Linearization of divergence of u: div(du) = trace_de computed in df1 function

  • Cinv_contract_dE[in] C_inv:dE unused for mixed linear elasticity

  • out[out] Output arrays, unused

  • dg0[out] dg0 = -div(du) - dp/(bulk - bulk_primal)

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for linear mixed elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedLinear_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Wrapper to compute Sigma for linear mixed elasticity platen BCs.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = Sigma = -p*I + 2*mu*e_dev

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedLinear_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Wrapper to compute linearization of Sigma for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of incremental change to u with respect to reference coordinates

    • 2 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dSigma = -dp*I + 2*mu*de_dev

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for linear mixed elasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for linear mixed elasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int Energy_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

    • 3 - p

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedLinearElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_uu_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute displacement block for pMG preconditioner for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of incremental change of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - action of QFunction for displacement field

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_pp_MixedLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute pressure block for pMG preconditioner for mixed linear elasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - incremental change of p

  • out[out] Output arrays

    • 0 - action of QFunction for pressure field

Returns:

An error code: 0 - success, otherwise - failure

int VolumetricFunctionAndDerivatives(CeedScalar Jm1, CeedScalar *V, CeedScalar *J_dVdJ, CeedScalar *J2_d2VdJ2)#

Compute V, J * dV/dJ, J^2 * d^2V/dJ^2 for mixed neo-Hookean hyperelasticity.

For this method we consider the volumetric energy of form \psi_vol = k * V

A = J^2 - 1 - 2 logJ V = A / 4 J dV/dJ = (J^2 - 1) / 2 J^2 d^2V/dJ^2 = (J^2 + 1) / 2

Parameters:
  • Jm1[in] Determinant of deformation gradient - 1.

  • V[out] V

  • J_dVdJ[out] J dV/dJ

  • J2_d2VdJ2[out] J^2 d^2V/dJ^2

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_MixedNeoHookean(CeedScalar bulk_primal, CeedScalar two_mu, CeedScalar p, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for mixed neo-Hookean hyperelasticity.

tau = [bulk_primal * J dV/dJ - p J] I + 2 mu J^{-2/3} e_dev

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • two_mu[in] Two times the shear modulus

  • p[in] Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • J_pow[in] J^{-2/3}

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelIsochoricSecondKirchhoffStress_MixedNeoHookean(CeedScalar two_mu, CeedScalar J, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_iso_sym[6])#

Compute isochoric part of second Kirchoff stress for mixed neo-Hookean hyperelasticity.

S_iso = 2 mu J^{-2/3} C_inv * E_dev

Parameters:
  • two_mu[in] Two times the shear modulus

  • J[in] Determinant of deformation gradient

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_iso_sym[out] Isochoric second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelVolumetricSecondKirchhoffStress_MixedNeoHookean(CeedScalar bulk_primal, CeedScalar p, CeedScalar Jm1, const CeedScalar C_inv_sym[6], CeedScalar S_vol_sym[6])#

Compute volumetric part of second Kirchoff stress for mixed neo-Hookean hyperelasticity.

S_vol = [bulk_primal * J dV/dJ - p J] * C_inv

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • S_vol_sym[out] Volumetric second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedNeoHookean(CeedScalar bulk_primal, CeedScalar two_mu, CeedScalar p, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for mixed neo-Hookean hyperelasticity.

S = S_iso + S_vol

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • two_mu[in] Two times the shear modulus

  • p[in] Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelIsochoricSecondKirchhoffStress_MixedNeoHookean_fwd(CeedScalar mu, CeedScalar J, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dC_inv_sym[6], CeedScalar dS_iso_sym[6], CeedScalar *Cinv_contract_dE)#

Compute derivative of isochoric second Kirchoff stress for mixed neo-Hookean hyperelasticity.

dS_iso = -4/3 mu J^(-2/3) (C_inv:dE) C_inv * E_dev - 1/3 mu J^(-2/3) dS_iso1 dS_iso1 = 2 tr(dE) C_inv + I1(C) dC_inv

Parameters:
  • mu[in] Shear modulus

  • J[in] Determinant of deformation gradient

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dC_inv_sym[out] Derivative of C^{-1}, in symmetric representation

  • dS_iso_sym[out] Derivative of isochoric second Kirchoff stress, in symmetric representation

  • Cinv_contract_dE[out] C_inv : dE

Returns:

An error code: 0 - success, otherwise - failure

int RatelVolumetricSecondKirchhoffStress_MixedNeoHookean_fwd(CeedScalar bulk_primal, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar Cinv_contract_dE, const CeedScalar C_inv_sym[6], const CeedScalar dC_inv_sym[6], CeedScalar dS_vol_sym[6])#

Compute derivative of volumetric second Kirchoff stress for fieldsplit preconditioner.

dS_vol = [(bulk_primal J^2 * d2V/dJ2 + (bulk_primal * J dV/dJ - p J)) (C_inv:dE) - dp J] C_inv + [bulk_primal * J dV/dJ - p J ] dC_inv

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • Cinv_contract_dE[in] C_inv : dE

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • dC_inv_sym[in] Derivative of C^{-1}, in symmetric representation

  • dS_vol_sym[out] Derivative of primal second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedNeoHookean_fwd(CeedScalar bulk_primal, CeedScalar mu, CeedScalar p, CeedScalar dp, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6], CeedScalar *Cinv_contract_dE)#

Compute derivative of second Kirchoff stress for mixed neo-Hookean hyperelasticity.

dS = dS_iso + dS_vol

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • mu[in] Shear modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

  • Cinv_contract_dE[out] C_inv : dE

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTransposeIsochoric_MixedNeoHookean(CeedScalar mu, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar depsilon_sym[6], CeedScalar FdSFTranspose_iso_sym[6], CeedScalar *trace_depsilon)#

Compute F*dS_iso*F^T for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • mu[in] Shear modulus

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • depsilon_sym[out] depsilon = (grad_du + grad_du^T)/2

  • FdSFTranspose_iso_sym[out] F*dS_iso*F^T needed for computing df1 in current configuration

  • trace_depsilon[out] trace(depsilon)

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTransposeVolumetric_MixedNeoHookean(CeedScalar bulk_primal, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar trace_depsilon, const CeedScalar depsilon_sym[6], CeedScalar FdSFTranspose_vol_sym[6])#

Compute F*dS_vol*F^T for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • trace_depsilon[in] trace(depsilon)

  • depsilon_sym[in] depsilon = (grad_du + grad_du^T)/2

  • FdSFTranspose_vol_sym[out] F*dS_vol*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_MixedNeoHookean(CeedScalar bulk_primal, CeedScalar mu, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar FdSFTranspose[3][3], CeedScalar *trace_depsilon)#

Compute F*dS*F^T for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • mu[in] Shear modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

  • trace_depsilon[out] trace(depsilon)

Returns:

An error code: 0 - success, otherwise - failure

int RatelEnergy_MixedNeoHookean(CeedScalar bulk, CeedScalar mu, CeedScalar Jm1, CeedScalar trace_strain, CeedScalar *strain_energy)#

Compute strain energy for mixed neo-Hookean model.

psi = 0.5 mu (I1_bar - 3) + bulk * V(J)

Parameters:
  • bulk[in] Bulk modulus

  • mu[in] Shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • trace_strain[in] Trace of Green Lagrange or Green euler strain tensor (E or e)

  • strain_energy[out] Strain energy for mixed Neo-Hookean model

Returns:

An error code: 0 - success, otherwise - failure

int Energy_MixedNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for mixed neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_MixedNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for mixed neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

    • 3 - p

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_MixedNeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for mixed neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *Jm1)#

Compute P for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: dXdx, e, J - 1, J^{-2/3} and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - p

  • Jm1[in] Determinant of deformation gradient - 1 computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = -J dV/dJ - p * J / (bulk - bulk_primal)

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *Jm1, CeedScalar *trace_depsilon)#

Compute linearization of f1 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, e, J - 1, J^{-2/3} and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing dg0 function

  • trace_depsilon[out] trace(depsilon) needed for computing dg0 function

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedNeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, const CeedScalar trace_depsilon, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 1 - stored J and p

    • 3 - dp

  • Jm1[in] Determinant of deformation gradient - 1 computed in df1 function

  • trace_depsilon[in] trace(depsilon) computed in df1 function

  • out[out] Output arrays, unused

  • dg0[out] dg0 = ([-J^2 d2V/dJ2 - J dV/dJ - J*p/(bulk-bulk_primal)]trace(depsilon) - dp*J/(bulk-bulk_primal) )

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_uu_MixedNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute displacement block for pMG preconditioner for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of incremental change of u with respect to reference coordinates

  • out[out] Output arrays 0 - action of QFunction for displacement field

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_pp_MixedNeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute pressure block for pMG preconditioner for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - incremental change of p

  • out[out] Output arrays 0 - action of QFunction for pressure field

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *Jm1)#

Compute P for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - p

  • Jm1[in] Determinant of deformation gradient - 1 computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = -J dV/dJ - p * J / (bulk - bulk_primal)

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *Jm1, CeedScalar *Cinv_contract_dE)#

Compute linearization of P for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing dg0 function

  • Cinv_contract_dE[out] C_inv:dE needed for computing dg0 function

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedNeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, const CeedScalar Cinv_contract_dE, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 1 - stored gradient of u and p

    • 3 - dp

  • Jm1[in] Determinant of deformation gradient - 1 computed in df1 function

  • Cinv_contract_dE[in] C_inv:dE computed in df1 function

  • out[out] Output arrays, unused

  • dg0[out] dg0 = ([-J^2 d2V/dJ2 - J dV/dJ - J*p/(bulk-bulk_primal)](C_inv:dE) - dp*J/(bulk-bulk_primal) )

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Wrapper to compute P for mixed neo-Hookean hyperelasticity in initial configuration for platen BCs.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_uu_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute displacement block for pMG preconditioner for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of incremental change of u with respect to reference coordinates

  • out[out] Output arrays 0 - action of QFunction for displacement field

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_pp_MixedNeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute pressure block for pMG preconditioner for mixed neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - incremental change of p

  • out[out] Output arrays 0 - action of QFunction for pressure field

Returns:

An error code: 0 - success, otherwise - failure

int VolumetricFunctionAndDerivatives_PL(CeedScalar Jm1, CeedScalar *U, CeedScalar *J_dUdJ, CeedScalar *J2_d2UdJ2)#

Compute U, J * dU/dJ, J^2 * d^2U/dJ^2 for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

For PL method we consider the volumetric energy of form \psi_vol = k/2 * U^2

A = J^2 - 1 - 2 logJ U = A^{1/2} / sqrt(2) J dU/dJ = (J^2 - 1) A^{-1/2} / sqrt(2) J^2 d^2U/dJ^2 = [(J^2 + 1) A^{-1/2} - (J^2 - 1)^2 A^{-3/2}] / sqrt(2)

Parameters:
  • Jm1[in] Determinant of deformation gradient - 1.

  • U[out] U

  • J_dUdJ[out] J dU/dJ

  • J2_d2UdJ2[out] J^2 d^2U/dJ^2

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_MixedNeoHookeanPL(CeedScalar bulk_primal, CeedScalar two_mu, CeedScalar p, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

tau = [bulk_primal * U - p ] * J dU/dJ * I + 2 mu J^{-2/3} e_dev

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • two_mu[in] Two times the shear modulus

  • p[in] Lagrange multiplier

  • Jm1[in] Determinant of deformation gradient - 1.

  • J_pow[in] J^{-2/3}

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelIsochoricSecondKirchhoffStress_MixedNeoHookeanPL(CeedScalar two_mu, CeedScalar J, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_iso_sym[6])#

Compute isochoric part of second Kirchoff stress for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

S = 2 mu J^{-2/3} C_inv * E_dev

Parameters:
  • two_mu[in] Two times the shear modulus

  • J[in] Determinant of deformation gradient

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_iso_sym[out] Isochoric second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelVolumetricSecondKirchhoffStress_MixedNeoHookeanPL(CeedScalar bulk_primal, CeedScalar p, CeedScalar Jm1, const CeedScalar C_inv_sym[6], CeedScalar S_vol_sym[6])#

Compute volumetric part of second Kirchoff stress for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

S = [bulk_primal * U - p ] * J dU/dJ * C_inv

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Lagrange multiplier

  • Jm1[in] Determinant of deformation gradient - 1.

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • S_vol_sym[out] Volumetric second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedNeoHookeanPL(CeedScalar bulk_primal, CeedScalar two_mu, CeedScalar p, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

S = S_vol + S_iso

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • two_mu[in] Two times the shear modulus

  • p[in] Lagrange multiplier

  • Jm1[in] Determinant of deformation gradient - 1.

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelIsochoricSecondKirchhoffStress_MixedNeoHookeanPL_fwd(CeedScalar mu, CeedScalar J, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dC_inv_sym[6], CeedScalar dS_iso_sym[6], CeedScalar *Cinv_contract_dE)#

Compute derivative of isochoric second Kirchoff stress for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

dS_iso = -4/3 mu J^(-2/3) (C_inv:dE) C_inv * E_dev - 1/3 mu J^(-2/3) dS_iso1 dS_iso1 = 2 tr(dE) C_inv + I1(C) dC_inv

Parameters:
  • mu[in] Shear modulus

  • J[in] Determinant of deformation gradient

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dC_inv_sym[out] Derivative of C^{-1}, in symmetric representation

  • dS_iso_sym[out] Derivative of isochoric second Kirchoff stress, in symmetric representation

  • Cinv_contract_dE[out] C_inv : dE

Returns:

An error code: 0 - success, otherwise - failure

int RatelVolumetricSecondKirchhoffStress_MixedNeoHookeanPL_fwd(CeedScalar bulk_primal, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar Cinv_contract_dE, const CeedScalar C_inv_sym[6], const CeedScalar dC_inv_sym[6], CeedScalar dS_vol_sym[6])#

Compute derivative of volumetric second Kirchoff stress for fieldsplit preconditioner.

dS_vol = [(bulk_primal (J dU/dJ)^2 + (bulk_primal * U - p) * (J^2 * d2U/dJ2 + J dU/dJ)) C_inv:dE - dp * J dU/dJ] C_inv + [bulk_primal * U - p] J dU/dJ * dC_inv

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • Cinv_contract_dE[in] C_inv : dE

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • dC_inv_sym[in] Derivative of C^{-1}, in symmetric representation

  • dS_vol_sym[out] Derivative of primal second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedNeoHookeanPL_fwd(CeedScalar bulk_primal, CeedScalar mu, CeedScalar p, CeedScalar dp, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6], CeedScalar *Cinv_contract_dE)#

Compute derivative of second Kirchoff stress mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

dS = dS_iso + dS_vol

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • mu[in] Shear modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

  • Cinv_contract_dE[out] C_inv : dE

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTransposeIsochoric_MixedNeoHookeanPL(CeedScalar mu, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar depsilon_sym[6], CeedScalar FdSFTranspose_iso_sym[6], CeedScalar *trace_depsilon)#

Compute F*dS_iso*F^T for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

Parameters:
  • mu[in] Shear modulus

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • depsilon_sym[out] depsilon = (grad_du + grad_du^T)/2

  • FdSFTranspose_iso_sym[out] F*dS_iso*F^T needed for computing df1 in current configuration

  • trace_depsilon[out] trace(depsilon)

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTransposeVolumetric_MixedNeoHookeanPL(CeedScalar bulk_primal, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar trace_depsilon, const CeedScalar depsilon_sym[6], CeedScalar FdSFTranspose_vol_sym[6])#

Compute F*dS_vol*F^T for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • trace_depsilon[in] trace(depsilon)

  • depsilon_sym[in] depsilon = (grad_du + grad_du^T)/2

  • FdSFTranspose_vol_sym[out] F*dS_vol*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_MixedNeoHookeanPL(CeedScalar bulk_primal, CeedScalar mu, CeedScalar p, CeedScalar dp, CeedScalar Jm1, CeedScalar J_pow, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar FdSFTranspose[3][3], CeedScalar *trace_depsilon)#

Compute F*dS*F^T for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • bulk_primal[in] Primal bulk modulus

  • mu[in] Shear modulus

  • p[in] Pressure

  • dp[in] Increment of Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • J_pow[in] J^{-2/3}

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

  • trace_depsilon[out] trace(depsilon)

Returns:

An error code: 0 - success, otherwise - failure

int RatelEnergy_MixedNeoHookeanPL(CeedScalar bulk, CeedScalar bulk_primal, CeedScalar mu, CeedScalar p, CeedScalar Jm1, CeedScalar trace_strain, CeedScalar *mixed_energy)#

Compute mixed potential energy for mixed neo-Hookean model.

Pi(u,p) = 0.5 mu (I1_bar - 3) - p U + 0.5 * bulk_primal * U^2 - 0.5 p^2 / (bulk - bulk_primal)

Note that strain energy function is psi = 0.5 mu (I1_bar - 3) + bulk / 2 * U(J)^2

Parameters:
  • bulk[in] Bulk modulus

  • bulk_primal[in] Primal bulk modulus

  • mu[in] Shear modulus

  • p[in] Pressure

  • Jm1[in] Determinant of deformation gradient - 1

  • trace_strain[in] Trace of Green Lagrange or Green euler strain tensor (E or e)

  • mixed_energy[out] Energy for mixed Neo-Hookean model

Returns:

An error code: 0 - success, otherwise - failure

int Energy_MixedNeoHookeanPL(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_MixedNeoHookeanPL(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - u 2 - gradient of u with respect to reference coordinates 3 - p

  • out[out] Output arrays 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_MixedNeoHookeanPL(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of u with respect to reference coordinates 2 - p

  • out[out] Output arrays 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanPLCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *Jm1)#

Compute P for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: dXdx, e, J - 1, J^{-2/3} and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedNeoHookeanPLCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - p

  • Jm1[in] Determinant of deformation gradient - 1 computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = (-U(J) - p/(bulk - bulk_primal) )

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanPLCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *Jm1, CeedScalar *trace_depsilon)#

Compute linearization of f1 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, e, J - 1, J^{-2/3} and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing dg0 function

  • trace_depsilon[out] trace(depsilon) needed for computing dg0 function

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedNeoHookeanPLCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, const CeedScalar trace_depsilon, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 1 - stored J and p

    • 3 - dp

  • Jm1[in] Determinant of deformation gradient - 1 computed in df1 function

  • trace_depsilon[in] trace(depsilon) computed in df1 function

  • out[out] Output arrays, unused

  • dg0[out] dg0 = (dU(J) - dp/(bulk - bulk_primal))

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedNeoHookeanPLCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedNeoHookeanPLCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_uu_MixedNeoHookeanPLCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute displacement block for pMG preconditioner for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of incremental change of u with respect to reference coordinates

  • out[out] Output arrays 0 - action of QFunction for displacement field

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_pp_MixedNeoHookeanPLCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute pressure block for pMG preconditioner for mixed neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - incremental change of p

  • out[out] Output arrays 0 - action of QFunction for pressure field

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanPLInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *Jm1)#

Compute P for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 0 - volumetric qdata 1 - gradient of u with respect to reference coordinates 2 - Lagrange multiplier

  • out[out] Output arrays 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedNeoHookeanPLInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 2 - Lagrange multiplier

  • Jm1[in] Determinant of deformation gradient - 1 computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = (U(J) - p/bulk )

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanPLInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *Jm1, CeedScalar *Cinv_contract_dE)#

Compute linearization of P for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 0 - volumetric qdata 1 - stored gradient of u and p 2 - gradient of incremental change to u with respect to reference coordinates 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing dg0 function

  • Cinv_contract_dE[out] C_inv:dE needed for computing dg0 function

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedNeoHookeanPLInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, const CeedScalar Cinv_contract_dE, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 1 - stored gradient of u and p 3 - dp

  • Jm1[in] Determinant of deformation gradient - 1 computed in df1 function

  • Cinv_contract_dE[in] C_inv:dE computed in df1 function

  • out[out] Output arrays, unused

  • dg0[out] dg0 = ([-J^2 - J*p/bulk](C_inv:dE) - dp*J/bulk )

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedNeoHookeanPLInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Wrapper to compute P for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration for platen BCs.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 0 - volumetric qdata 1 - gradient of u with respect to reference coordinates 2 - pressure

  • out[out] Output arrays 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedNeoHookeanPLInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays 0 - volumetric qdata 1 - stored gradient of u and p 2 - gradient of incremental change to u with respect to reference coordinates 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding BCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding BCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_uu_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute displacement block for pMG preconditioner for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - gradient of incremental change of u with respect to reference coordinates

  • out[out] Output arrays 0 - action of QFunction for displacement field

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityPC_pp_MixedNeoHookeanPLInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute pressure block for pMG preconditioner for mixed neo-Hookean perturbed Lagrange-multiplier hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding MixedNeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays 0 - qdata 1 - incremental change of p

  • out[out] Output arrays 0 - action of QFunction for pressure field

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_MixedOgden(CeedScalar p, CeedScalar J, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for mixed Ogden hyperelasticity.

Parameters:
  • p[in] Pressure

  • J[in] Determinant of deformation gradient

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedOgden(CeedScalar p, CeedScalar J, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for mixed Ogden hyperelasticity.

Parameters:
  • p[in] Pressure

  • J[in] Determinant of deformation gradient

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MixedOgden_fwd(CeedScalar p, CeedScalar J, CeedInt N, const CeedScalar *m, const CeedScalar *alpha, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar dS_sym[6], CeedScalar *Cinv_contract_dE)#

Compute derivative of second Kirchoff stress for mixed Ogden hyperelasticity.

Parameters:
  • p[in] Pressure

  • J[in] Determinant of deformation gradient

  • N[in] Number of Ogden parameters

  • m[in] Array of first Ogden material model

  • alpha[in] Array of second Ogden material model

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

  • Cinv_contract_dE[out] C_inv : dE

Returns:

An error code: 0 - success, otherwise - failure

int Energy_MixedOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for mixed Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_MixedOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for mixed Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

    • 3 - p

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_MixedOgden(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for mixed Ogden hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - p

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3], CeedScalar *Jm1)#

Compute P for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing g0 function

Returns:

An error code: 0 - success, otherwise - failure

int g0_MixedOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, CeedScalar *const *out, CeedScalar *g0)#

Compute g0 for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 2 - p

  • Jm1[in] Determinant of deformation gradient - 1 computed in f1 function

  • out[out] Output arrays, unused

  • g0[out] g0 = (-(J^2 - 1) / (2J) - p/bulk ) * J

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3], CeedScalar *Jm1, CeedScalar *Cinv_contract_dE)#

Compute linearization of P for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

  • Jm1[out] Determinant of deformation gradient - 1 needed for computing dg0 function

  • Cinv_contract_dE[out] C_inv:dE needed for computing dg0 function

Returns:

An error code: 0 - success, otherwise - failure

int dg0_MixedOgdenInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, const CeedScalar Jm1, const CeedScalar Cinv_contract_dE, CeedScalar *const *out, CeedScalar *dg0)#

Compute linearization of g0 for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 1 - stored gradient of u and p

    • 3 - dp

  • Jm1[in] Determinant of deformation gradient - 1 computed in df1 function

  • Cinv_contract_dE[in] C_inv:dE computed in df1 function

  • out[out] Output arrays, unused

  • dg0[out] dg0 = ([-J^2 - J*p/bulk](C_inv:dE) - dp*J/bulk )

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MixedOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MixedOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_MixedOgdenInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Wrapper to compute P for mixed Ogden hyperelasticity in initial configuration in Platen BCs.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

    • 2 - pressure

  • out[out] Output arrays

    • 0 - stored values: grad_u and p

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_MixedOgdenInitial_Platen(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Wrapper to compute linearization of P for mixed Ogden hyperelasticity in initial configuration in Platen BCs.

Parameters:
  • ctx[in] QFunction context, holding OgdenElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u and p

    • 2 - gradient of incremental change to u with respect to reference coordinates

    • 3 - dp

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_MixedOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_MixedOgdenInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for mixed Ogden hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_MooneyRivlin(CeedScalar lambda, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for Mooney-Rivlin hyperelasticity.

tau = 2 (mu_1 + 2 mu_2) e + 2 mu_2 (trace(e) b - e*b) + 0.5 * lambda*(J^2 - 1)*I

Ref https://ratel.micromorph.org/doc/modeling/materials/mooney-rivlin/#equation-mooney-rivlin-tau-stable

Parameters:
  • lambda[in] Lamé parameter

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MooneyRivlin(CeedScalar lambda, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for Mooney-Rivlin hyperelasticity.

S = 0.5 lambda (J^2 -1) * C_inv + 2 (mu_1 + 2 mu_2) C_inv * E + 2 mu_2 (tr(E) I - E)

Ref https://ratel.micromorph.org/doc/modeling/materials/mooney-rivlin/#equation-mooney-rivlin-tau-stable

Parameters:
  • lambda[in] Lamé parameter

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_MooneyRivlin_fwd(CeedScalar lambda, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], CeedScalar dS_sym[6])#

Compute derivative of second Kirchoff stress for Mooney-Rivlin hyperelasticity.

dS = lambda J^2 (C_inv:dE) * C_inv + (lambda/2*(J^2-1) - (mu_1 + 2 mu_2)) * dC_inv + 2 mu_2 (tr(dE)*I - dE)

Ref https://ratel.micromorph.org/doc/modeling/materials/mooney-rivlin/#equation-mooney-rivlin-tau-stable

Parameters:
  • lambda[in] Lamé parameter

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_MooneyRivlin(CeedScalar lambda, CeedScalar mu_1, CeedScalar two_mu_2, CeedScalar Jm1, const CeedScalar grad_du[3][3], const CeedScalar e_sym[6], CeedScalar FdSFTranspose[3][3])#

Compute F*dS*F^T for Mooney-Rivlin hyperelasticity in current configuration.

Ref https://ratel.micromorph.org/doc/modeling/methods/hyperelasticity/#equation-cur-simp-jac-mooney-rivlin

Parameters:
  • lambda[in] Lamé parameter

  • mu_1[in] First Mooney-Rivlin parameter

  • two_mu_2[in] Two times the second Mooney-Rivlin parameter

  • Jm1[in] Determinant of deformation gradient - 1

  • grad_du[in] Gradient of incremental change in u

  • e_sym[in] Green Euler strain, in symmetric representation

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int Energy_MooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_MooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_MooneyRivlin(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

int f1_MooneyRivlinCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored, dXdx, e, and J - 1

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_MooneyRivlinCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization df1 for Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, e, and J - 1

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MooneyRivlinCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MooneyRivlinCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for Mooney-Rivlin hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_MooneyRivlinInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_MooneyRivlinInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_MooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_MooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding MooneyRivlinElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_MooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_MooneyRivlinInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for Mooney-Rivlin hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int RatelKirchhoffTau_NeoHookean(CeedScalar lambda, CeedScalar two_mu, CeedScalar Jm1, const CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for neo-Hookean hyperelasticity.

tau = 2 mu * e + 0.5 lambda (J^2 - 1) * I

Ref https://ratel.micromorph.org/doc/modeling/materials/neo-hookean/#equation-eq-tau-neo-hookean

Parameters:
  • lambda[in] Lamé parameter

  • two_mu[in] Two times the shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_NeoHookean(CeedScalar lambda, CeedScalar two_mu, CeedScalar Jm1, const CeedScalar C_inv_sym[6], const CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Kirchoff stress for neo-Hookean hyperelasticity.

S = 0.5 lambda (J^2 -1) * C_inv + 2 mu C_inv * E

Ref https://ratel.micromorph.org/doc/modeling/materials/neo-hookean/#equation-eq-tau-neo-hookean

Parameters:
  • lambda[in] Lamé parameter

  • two_mu[in] Two times the shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelSecondKirchhoffStress_NeoHookean_fwd(CeedScalar lambda, CeedScalar mu, CeedScalar Jm1, const CeedScalar F[3][3], const CeedScalar grad_du[3][3], const CeedScalar C_inv_sym[6], CeedScalar dS_sym[6])#

Compute derivative of second Kirchoff stress for neo-Hookean hyperelasticity.

dS = lambda J^2 (C_inv:dE) * C_inv + (lambda/2*(J^2-1)-mu) * dC_inv

Ref https://ratel.micromorph.org/doc/modeling/materials/neo-hookean/#equation-eq-tau-neo-hookean

Parameters:
  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • F[in] Deformation gradient

  • grad_du[in] Gradient of incremental change in u

  • C_inv_sym[in] Inverse of right Cauchy-Green tensor, in symmetric representation

  • dS_sym[out] Derivative of second Kirchoff stress, in symmetric representation

Returns:

An error code: 0 - success, otherwise - failure

int RatelComputeFdSFTranspose_NeoHookean(CeedScalar lambda, CeedScalar mu, CeedScalar Jm1, const CeedScalar grad_du[3][3], CeedScalar FdSFTranspose[3][3])#

Compute F*dS*F^T for neo-Hookean hyperelasticity in current configuration.

Ref https://ratel.micromorph.org/doc/modeling/methods/hyperelasticity/#equation-cur-simp-jac

Parameters:
  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • Jm1[in] Determinant of deformation gradient - 1

  • grad_du[in] Gradient of incremental change in u

  • FdSFTranspose[out] F*dS*F^T needed for computing df1 in current configuration

Returns:

An error code: 0 - success, otherwise - failure

int Energy_NeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_NeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - u

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_NeoHookean(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for neo-Hookean hyperelasticity.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

CeedScalar RatelStrainEnergy_NeoHookeanCurrent_AD(CeedScalar e_sym[6], CeedScalar lambda, CeedScalar mu)#

Compute strain energy for neo-Hookean hyperelasticity.

Parameters:
  • e_sym[in] Green Euler strain, in symmetric representation

  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

Returns:

A scalar value: strain energy

void RatelKirchhofftau_sym_NeoHookean_AD(const CeedScalar lambda, const CeedScalar mu, CeedScalar e_sym[6], CeedScalar tau_sym[6])#

Compute Kirchoff tau for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • e_sym[in] Green Euler strain, in symmetric representation

  • tau_sym[out] Kirchoff tau, in symmetric representation

void Rateldtau_fwd(const CeedScalar lambda, const CeedScalar mu, CeedScalar e_sym[6], CeedScalar de_sym[6], CeedScalar tau_sym[6], CeedScalar dtau_sym[6])#

Compute derivative of Kirchoff tau for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • e_sym[in] Green Euler strain, in symmetric representation

  • de_sym[out] Derivative of Green Euler strain, in symmetric representation

  • tau_sym[in] Kirchoff tau, in symmetric representation

  • dtau_sym[out] Derivative of Kirchoff tau, in symmetric representation

int f1_NeoHookeanCurrent_AD(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored dXdx and Green Euler strain

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_NeoHookeanCurrent_AD(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of tau for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx and Green Euler strain

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * (nabla_x du)^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_NeoHookeanCurrent_AD(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_NeoHookeanCurrent_AD(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for neo-Hookean hyperelasticity in current configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_NeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute tau for neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored, dXdx, tau, and J - 1

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = tau

Returns:

An error code: 0 - success, otherwise - failure

int df1_NeoHookeanCurrent(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization df1 for neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored dXdx, tau, and J - 1

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dtau - tau * grad_du^T

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_NeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_NeoHookeanCurrent(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for neo-Hookean hyperelasticity in current configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

CeedScalar RatelStrainEnergy_NeoHookeanInitial_AD(CeedScalar E_sym[6], CeedScalar lambda, CeedScalar mu)#

Compute strain energy for neo-Hookean hyperelasticity.

Parameters:
  • E_sym[in] Green Lagrange strain, in symmetric representation

  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

Returns:

A scalar value: strain energy

void SecondPiolaKirchhoffStress_NeoHookean_AD(const CeedScalar lambda, const CeedScalar mu, CeedScalar E_sym[6], CeedScalar S_sym[6])#

Compute second Piola-Kirchhoff for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • E_sym[in] Green Lagrange strain, in symmetric representation

  • S_sym[out] Second Piola-Kirchhoff, in symmetric representation

void S_augmentfwd(double *S, double *E, const double lambda, const double mu, double *tape)#

Compute first Piola-Kirchhoff for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • E[in] Green Lagrange strain

  • S[in] Second Piola-Kirchhoff

  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • tape[out] Enzyme tape

void dS_fwd(double *dS, double *dE, const double lambda, const double mu, const double *tape)#

Compute derivative of first Piola-Kirchhoff for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • dS[out] Derivative of first Piola-Kirchoff

  • dE[out] Derivative of Green Lagrange strain

  • lambda[in] Lamé parameter

  • mu[in] Shear modulus

  • tape[in] Enzyme tape

int f1_NeoHookeanInitial_AD(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates, Second Piola-Kirchhoff, and tape

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P = F * S

Returns:

An error code: 0 - success, otherwise - failure

int df1_NeoHookeanInitial_AD(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates, Second Piola-Kirchhoff, and tape

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP = dF * S + F * dS

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_NeoHookeanInitial_AD(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_NeoHookeanInitial_AD(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for neo-Hookean hyperelasticity in initial configuration with Enzyme.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_NeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute P for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - stored gradient of u with respect to physical coordinates

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = P

Returns:

An error code: 0 - success, otherwise - failure

int df1_NeoHookeanInitial(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of P for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - stored gradient of u with respect to physical coordinates

    • 2 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dP

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityResidual_NeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int ElasticityJacobian_NeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding NeoHookeanElasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_NeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_NeoHookeanInitial(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for neo-Hookean hyperelasticity in initial configuration.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int f1_PlasticityLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar f1[3][3])#

Compute Sigma for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - previously accepted plastic state components

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - currently computed plastic state components

  • dXdx[out] Coordinate transformation

  • f1[out] f1 = Sigma = lambda*trace(e)I + 2 mu e

Returns:

An error code: 0 - success, otherwise - failure

int df1_PlasticityLinear(void *ctx, const CeedInt Q, const CeedInt i, const CeedScalar *const *in, CeedScalar *const *out, CeedScalar dXdx[3][3], CeedScalar df1[3][3])#

Compute linearization of Sigma for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • i[in] Current quadrature point

  • in[in] Input arrays

    • 0 - volumetric qdata

    • 1 - previously accepted plastic state components

    • 2 - stored values for total strain and s_trial

    • 3 - gradient of incremental change to u with respect to reference coordinates

  • out[out] Output arrays, unused

  • dXdx[out] Coordinate transformation

  • df1[out] df1 = dSigma = lambda tr(de) I + 2 mu de

Returns:

An error code: 0 - success, otherwise - failure

int PlasticityResidual_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute residual for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlasticityJacobian_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate Jacobian for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsResidual_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute platen residual for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int PlatenBCsJacobian_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Evaluate platen Jacobian for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding RatelBCPlatenData

  • Q[in] Number of quadrature points

  • in[in] Input arrays

  • out[out] Output arrays

Returns:

An error code: 0 - success, otherwise - failure

int Energy_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute strain energy for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - plastic state

    • 2 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - strain energy

Returns:

An error code: 0 - success, otherwise - failure

int Diagnostic_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute projected diagnostic values for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - plastic state

    • 2 - u

    • 3 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - projected diagnostic values

Returns:

An error code: 0 - success, otherwise - failure

int SurfaceForce_PlasticityLinear(void *ctx, CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out)#

Compute surface forces for linear plasticity.

Parameters:
  • ctx[in] QFunction context, holding ElastoPlasticityParams

  • Q[in] Number of quadrature points

  • in[in] Input arrays

    • 0 - qdata

    • 1 - gradient of u with respect to reference coordinates

  • out[out] Output arrays

    • 0 - surface force values

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_CEED_BP1(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for CEED BP1.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_CEED_BP1(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register CEED BP1 model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_CEED_BP2(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for CEED BP2.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_CEED_BP2(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register CEED BP2 model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_CEED_BP3(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for CEED BP3.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_CEED_BP3(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register CEED BP3 model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_CEED_BP4(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for CEED BP4.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_CEED_BP4(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register CEED BP4 model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricMooneyRivlinCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Isochoric Mooney-Rivlin hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricMooneyRivlinCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Isochoric Mooney-Rivlin hyperelasticity at finite strain in current configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricMooneyRivlinInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Isochoric Mooney-Rivlin hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricMooneyRivlinInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Isochoric Mooney-Rivlin hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricNeoHookeanCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Isochoric Neo-Hookean hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricNeoHookeanCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Isochoric Neo-Hookean hyperelasticity at finite strain in current configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricNeoHookeanInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Isochoric Neo-Hookean hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricNeoHookeanInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Isochoric Neo-Hookean hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricOgdenCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for IsochoricOgden hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricOgdenCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register IsochoricOgden hyperelasticity at finite strain in current configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityIsochoricOgdenInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for IsochoricOgden hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityIsochoricOgdenInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register IsochoricOgden hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityLinearDamage(Ratel ratel, RatelMaterial material)#

Create RatelMaterial for Damage Phase Field.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityLinearDamage(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register damage model.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterials

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityLinear(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for linear elasticity.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityLinear(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register linear elastic model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedLinear(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for linear elasticity.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedLinear(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register mixed linear elastic model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedNeoHookeanCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for mixed Neo-Hookean hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedNeoHookeanCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mixed Neo-Hookean hyperelasticity at finite strain in current configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedNeoHookeanInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for mixed Neo-Hookean hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedNeoHookeanInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mixed Neo-Hookean hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedNeoHookeanPLCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for mixed Neo-Hookean perturbed Lagrange-multiplier hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedNeoHookeanPLCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mixed Neo-Hookean perturbed Lagrange-multiplier hyperelasticity at finite strain in current configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedNeoHookeanPLInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for mixed Neo-Hookean perturbed Lagrange-multiplier hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedNeoHookeanPLInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mixed Neo-Hookean perturbed Lagrange-multiplier hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMixedOgdenInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for mixed Ogden hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMixedOgdenInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mixed Ogden hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMooneyRivlinCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Mooney-Rivlin hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMooneyRivlinCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mooney-Rivlin hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityMooneyRivlinInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Mooney-Rivlin hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityMooneyRivlinInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Mooney-Rivlin hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanCurrentAD(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Neo-Hookean hyperelasticity at finite strain in current configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanCurrentAD(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Neo-Hookean hyperelasticity at finite strain in current configuration using Enzyme-AD model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanCurrent(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Neo-Hookean hyperelasticity at finite strain in curent configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanCurrent(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Neo-Hookean hyperelasticity at finite strain in curent configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCheckTapeSize_ElasticityNeoHookeanInitialAD(Ratel ratel)#

Helper function to check allocated Enzyme tape size.

Parameters:
  • ratel[in] Ratel context

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanInitialAD(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Neo-Hookean hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanInitialAD(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Neo-Hookean hyperelasticity at finite strain in initial configuration using Enzyme-AD model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialCreate_ElasticityNeoHookeanInitial(Ratel ratel, RatelMaterial material)#

Create RatelMaterial model data for Neo-Hookean hyperelasticity at finite strain in initial configuration.

Not collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelRegisterModel_ElasticityNeoHookeanInitial(Ratel ratel, const char *cl_argument, PetscFunctionList *material_create_functions)#

Register Neo-Hookean hyperelasticity at finite strain in initial configuration model.

Not collective across MPI processes.

Parameters:
  • ratel[in] Ratel context

  • cl_argument[in] Command line argument to use for model

  • material_create_functions[out] PETSc function list for RatelMaterial

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_ElasticityDamage(RatelMaterial material, CeedScalar nu, CeedScalar E, CeedScalar rho, CeedScalar Gc, CeedScalar l0, CeedScalar eta, bool use_offdiagonal, bool use_AT1, bool use_hybrid, CeedQFunctionContext *ctx)#

Process command line options for Damage Phase Field params.

Parameters:
  • material[in] RatelMaterial to setup params context

  • nu[in] Poisson’s ratio

  • E[in] Young’s Modulus

  • rho[in] Density for scaled mass matrix

  • Gc[in] Critical energy release rate (J/m^2)

  • l0[in] Length scale parameter

  • eta[in] Residual stiffness parameter

  • use_offdiagonal[in] Switch for Jacobian offdiagonal terms

  • use_AT1[in] AT1 model type

  • use_hybrid[in] AT1 model type

  • ctx[out] libCEED QFunctionContext for Damage Phase Field parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_ElasticityDamage(RatelMaterial material, CeedQFunctionContext *ctx)#

Build libCEED QFunctionContext with damage phase field parameters.

Parameters:
  • material[in] RatelMaterial to setup parameters context

  • ctx[out] libCEED QFunctionContext for damage phase field parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_ElasticityDamage(RatelMaterial material)#

Setup data for libCEED QFunctionContext for smoother with ELasticityDamage parameters.

Parameters:
  • material[inout] RatelMaterial to setup model params context

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_MixedNeoHookean(RatelMaterial material, CeedScalar nu, CeedScalar E, CeedScalar rho, CeedScalar nu_primal, CeedScalar nu_primal_pc, CeedInt sign_pp, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for mixed Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • nu[in] Poisson’s ratio

  • E[in] Young’s Modulus

  • rho[in] Density for scaled mass matrix

  • nu_primal[in] To change full strain to deviatoric in mixed formulation

  • nu_primal_pc[in] To change full strain to deviatoric in uu block pc

  • sign_pp[in] To change the sign in pp block pc

  • ctx[out] CeedQFunctionContext for mixed Neo-Hookean parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_MixedNeoHookean(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext with mixed Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • ctx[out] CeedQFunctionContext for Neo-Hookean parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_MixedNeoHookean(RatelMaterial material)#

Setup data for CeedQFunctionContext for smoother with mixed Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[inout] RatelMaterial to setup model params context

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_MMS_CEED_BPs(RatelMaterial material, CeedScalar weierstrass_a, CeedScalar weierstrass_b, CeedInt weierstrass_n, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for CEED BPs MMS parameters.

Not collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • weierstrass_a[in] First Weierstrass parameter

  • weierstrass_b[in] Second Weierstrass parameter

  • weierstrass_n[in] Number of terms in Weierstrass series

  • ctx[out] CeedQFunctionContext for CEED BPs MMS parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMMSParamsContextCreate_CEED_BPs(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext for CEED BPs MMS parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • ctx[out] CeedQFunctionContext for CEED BPs MMS parameters

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_MMS_Elasticity_Linear(RatelMaterial material, CeedScalar A0, CeedScalar shift, CeedScalar scale, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for linear elasticity MMS parameters.

Not collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • A0[in] Shift parameter

  • shift[in] Sin shift parameter

  • scale[in] Sin scale parameter

  • ctx[out] CeedQFunctionContext for linear elasticity MMS parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMMSParamsContextCreate_Elasticity_Linear(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext for linear elasticity MMS parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • ctx[out] CeedQFunctionContext for linear elasticity MMS parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMMSParamsContextCreate_Elasticity_MixedLinear(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext for mixed linear elasticity MMS parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • ctx[out] CeedQFunctionContext for mixed linear elasticity MMS parameters

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_MooneyRivlin(RatelMaterial material, CeedScalar nu, CeedScalar mu_1, CeedScalar mu_2, CeedScalar rho, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for Mooney-Rivlin parameters.

Not collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • nu[in] Poisson’s ratio

  • mu_1[in] Material Property mu_1

  • mu_2[in] Material Property mu_2

  • rho[in] Density for scaled mass matrix

  • ctx[out] CeedQFunctionContext for Mooney-Rivlin parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_MooneyRivlin(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext for Mooney-Rivlin parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model parameters context

  • ctx[out] CeedQFunctionContext for Mooney-Rivlin parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_MooneyRivlin(RatelMaterial material)#

Setup data for CeedQFunctionContext for smoother with Mooney-Rivlin parameters.

Collective across MPI processes.

Parameters:
  • material[inout] RatelMaterial to setup model parameters context

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_NeoHookean(RatelMaterial material, CeedScalar nu, CeedScalar E, CeedScalar rho, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • nu[in] Poisson’s ratio

  • E[in] Young’s Modulus

  • rho[in] Density for scaled mass matrix

  • ctx[out] CeedQFunctionContext for Neo-Hookean parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_NeoHookean(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext with Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • ctx[out] CeedQFunctionContext for Neo-Hookean parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_NeoHookean(RatelMaterial material)#

Setup data for CeedQFunctionContext for smoother with Neo-Hookean parameters.

Collective across MPI processes.

Parameters:
  • material[inout] RatelMaterial to setup model params context

Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_Ogden(RatelMaterial material, CeedScalar nu, CeedScalar *m, CeedScalar *alpha, PetscInt num_ogden_parameters, CeedScalar rho, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for Ogden parameters.

Not collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup params context

  • nu[in] Poisson’s ratio

  • m[in] Array of material Properties for m

  • alpha[in] Array of material Properties for alpha

  • num_ogden_parameters[in] Number of parameters for Ogden model (Length of alpha=m)

  • rho[in] Density for scaled mass matrix

  • ctx[out] CeedQFunctionContext for Ogden parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_Ogden(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext for Ogden parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup params context

  • ctx[out] CeedQFunctionContext for Ogden parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_Ogden(RatelMaterial material)#

Setup data for CeedQFunctionContext for smoother with Ogden parameters.

Collective across MPI processes.

Parameters:
Returns:

An error code: 0 - success, otherwise - failure

static PetscErrorCode RatelCeedParamsContextCreate_PlasticityLinear(RatelMaterial material, CeedScalar hardening_A, CeedScalar yield_stress, CeedQFunctionContext *ctx)#

Set CeedQFunctionContext data and register fields for linear plasticity parameters.

Not collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • hardening_A[in] Hardening factor

  • yield_stress[in] Yield stress

  • ctx[out] CeedQFunctionContext for linear plasticity parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsContextCreate_PlasticityLinear(RatelMaterial material, CeedQFunctionContext *ctx)#

Build CeedQFunctionContext with linear plasticity parameters.

Collective across MPI processes.

Parameters:
  • material[in] RatelMaterial to setup model params context

  • ctx[out] CeedQFunctionContext for linear plasticity parameters

Returns:

An error code: 0 - success, otherwise - failure

PetscErrorCode RatelMaterialParamsSmootherDataSetup_PlasticityLinear(RatelMaterial material)#

Setup data for CeedQFunctionC