CPyCodeCompiler.write_function_for_P

CPyCodeCompiler.write_function_for_P(assignments: List[Assignment], element_typ: str, X_at_nodes: IndexedBase, U_at_nodes: IndexedBase, S_at_int_points: IndexedBase, P_at_int_points: IndexedBase)[source]

Write a C-function that computes the first Piola-Kirchhoff stress tensor and write a Python-function that binds to the C-function.

Parameters:
  • assignments – list of assignments. Components of X_at_nodes, U_at_nodes, S_at_int_points may only occur on the right hand side. Each component of P_at_int_points must occur on the left hand side of one assignment.

  • element_typ – name of the element type

  • X_at_nodes – name of the matrix that contains coordinates at nodes

  • U_at_nodes – name of the matrix that contains displacements at nodes

  • S_at_int_points – name of the matrix that contains stress tensors at the integration points

  • P_at_int_points – name of the matrix that contains the first Piola-Kirchhoff stress tensors at the integration points