The assembly of the global linear system of equation is covered on this page. Essentially, we call one function assemble_global! which manipulates the input arguments K and f and allocate once the element stiffness matrix and element load vector Ke and fe, respectively. Within this function assemble_element! is called, which fills Ke and fe with the correct element values

ConvexDamage.assemble_global!Function
assemble_global!(globaldata::StructuralModel{dim}, state::StructuralStateVariables) where dim

Assembles the local contribution into the global matrix and vector respectively which are stored in state.system_array

source
ConvexDamage.assemble_element!Function
assemble_element!(ke, ge, cell, cv, fv, materialstate, ue, dim)
  • ke is the element stiffness matrix (allocated once)
  • ge is the element load vector (allocated once) should be names fe actually
  • cell is the current finite element
  • cv is the current element cellvalue, i.e. element shape-function + quadrature evaluation
  • fv is the current element facevalue, i.e. face shape function + quadrature evaluation
  • materialstate is one of the implemented damage material states
  • ue current element displacement vector of the newton iteration
  • dim physical dimension of the problem maybe gonna change this later

Assembles ke which is defined as

\[K^e_{ij} = \int_{T\in\mathcal{T}_h} \nabla\delta \boldsymbol{u}_i : \frac{\boldsymbol{\partial P}}{\boldsymbol{\partial F}} : \nabla \boldsymbol{u}_j\]

and ge

\[g^e_i = \int_{T\in\mathcal{T}_h}\nabla \delta \boldsymbol{u}_i : \boldsymbol{P} - \boldsymbol{u}\cdot \boldsymbol{b}\]
source