Author Topic: Equations ordering for AIJ format with BCIN BLOCked  (Read 4261 times)

luc

  • Full Member
  • ***
  • Posts: 53
Equations ordering for AIJ format with BCIN BLOCked
« on: May 31, 2016, 04:47:49 PM »
Hi,
I am doing parallel simulation and I am wondering how to get the equation number associated to my degrees of freedom with an AIJ matrix, keeping the boundary equations (BCIN) and with blocks of size 3?

My guess is that it is as follows:

for node i, I read the associated block number: bk(i) and I get the range: ndf*(bk(i)-1)+j where j ranges from 1 to ndf. This is based on what I read on line 294 of parfeap/pdomain.F

I am asking because I have some boundary conditions issue and I am trying to make sure that they are entered correctly in my matrix.

Thanks,
Luc

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1162
Re: Equations ordering for AIJ format with BCIN BLOCked
« Reply #1 on: June 01, 2016, 01:15:29 PM »
If you look in the parallel input files IXXX_YYYY, and look just past the end of the mesh.  If you find a block of values after the keyword EQUAtion they will give the local partition node number followed by the global equation numbers for each dof attached to the local partition node.  This data is output for AIJ without bc-equations "in".

If the AIJ case with boundary equations in, then the data is computed using the information in the last column of the LOCAl to GLOBal data.  You can find the exact computation in pdomain.F; search for "if(noeq)".   Essentially the way it works for your case is the data is

local_node_#,  global_node_#, global_eq_#_for_last_dof_on_node_divided_by_ndf

Thus if you want to know the global equation numbers for a given local node, multiply the last entry by ndf this will give the global equation number for the last dof on the node.  Iteratively subtract from this value to get the equation numbers for the other dofs on the node.

What is probably easiest is to note that when the code exists pdomain.F, the needed data is contained in the integer array pointed to by np(245).  It is arranged as an ndf x numnp array where each column is associated with a local partition node and each row corresponds to each dof.  The entries of the array are the global equation numbers.
« Last Edit: June 01, 2016, 01:27:25 PM by Prof. S. Govindjee »

luc

  • Full Member
  • ***
  • Posts: 53
Re: Equations ordering for AIJ format with BCIN BLOCked
« Reply #2 on: June 01, 2016, 02:56:02 PM »
Exactly, it is what I did in the end and I found my bug.
I am using this information to do a domain decomposition approach with PETSc that serves as a preconditioner.
It now works quite well and I my domain decomposition converges to the same solution as the direct LU up to some tolerance.

Thanks for the help!