CPyCodeCompiler.write_function_for_CS

CPyCodeCompiler.write_function_for_CS(assignments: List[Assignment], element_typ: str, e: Symbol, X_at_nodes: IndexedBase, U_at_nodes: IndexedBase, S_at_int_points: IndexedBase, CS_at_int_points: IndexedBase, is_dbf: bool)[source]

Write a C-function that computes the configurational stresses and write a Python-function that binds to the C-function.

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

  • element_typ – name of the element type

  • e – name of the energy density

  • 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

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

  • is_dbf – displacement based or motion based formulation