Author Topic: Imposing Dirichlet boundary conditions  (Read 5102 times)

Ziyu

  • Jr. Member
  • **
  • Posts: 27
Imposing Dirichlet boundary conditions
« on: May 02, 2014, 12:51:26 PM »
Does anyone know where I can find the code which is used to modify the stiffness matrix in order to impose displacement BCs? I know that the fixed DOFs are marked in mr(np(31) + nneq) and that modify.f can modify the residual array. However, I have not found where you guys zero out the rows and columns associated with fixed DOFs and put 1 in the diagonal in the stiffness array ad(*), au(*). Or maybe you are using some other way to impose Dirichlet BCs? Anyways, I'd appreciate if you could provide any hints on what subroutines to look at. Thanks!

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Imposing Dirichlet boundary conditions
« Reply #1 on: May 03, 2014, 08:22:53 AM »
In the serial version of FEAP, equations associated with Dirichlet dofs are not assembled at all.
If you look at the bottom of program/dasble.f, you will see the matrix assembly code.  Note that
ld( ) must be .gt. 0 for assembly of a row to occur.  Doing it this way requires modification of the RHS
which occurs in program/modify.f.

In the parallel version, the full matrix is assembled with the relevant rows and columns zeroed out, a one
on the diagonal, and the requisite value on the RHS; see parfeap/pmodify.f.

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Imposing Dirichlet boundary conditions
« Reply #2 on: May 05, 2014, 01:47:05 AM »
The modify is done from pform.f.  Some data is set up in plocal.f and then modify.f does the actual mmodification.  Parallel is a bit more involved but is similar.

Ziyu

  • Jr. Member
  • **
  • Posts: 27
Re: Imposing Dirichlet boundary conditions
« Reply #3 on: May 05, 2014, 12:34:08 PM »
Thank you very much, Prof. Taylor and Prof. Govindjee. I think I have figured out how this works in the serial version, which is enough for me now :)