Numerical Algorithms Based On The Immersed Boundary Method For Modeling The Dynamics Of Semiflexible Filaments And The Mechanics Of Actin Cortex