[petsc-users] PCBDDC right hand side vector

Alp Kalpalp alpkalpalp at gmail.com
Mon Dec 1 15:52:35 CST 2014


Hi,

I am trying to use PCBDDC for my substructured problem. I have each
subdomains stiffneesses and load vectors and also mapping of numbering to
global dofs. I copied ex59 and replaced proper functions for my problem.
Everything seems working but, it does not produce correct results! I
checked kspconvergedreaseon and it is 3 and iteration count is 0 !. I
started debugging and know I am suspicious about the RHS vector.

 // assemble global matrix
 ierr = ComputeMatrix(dd,&K);CHKERRQ(ierr);
 // assemble BDDC rhs
 ierr = MatGetVecs(K,&F,NULL);CHKERRQ(ierr);
 ierr = VecZeroEntries(F);CHKERRQ(ierr);
 ierr =
VecSetValues(F,Mapping.rows(),Mapping.data(),b.data(),ADD_VALUES);CHKERRQ(ierr);

 ierr = VecAssemblyBegin(F);CHKERRQ(ierr);
 ierr = VecAssemblyEnd(F);CHKERRQ(ierr);


when I use matview and vecview, I see that K is matis and proc0 has 18x18
part of K, proc 1 has 12 part of K. 6 dofs are overlapping (dirichlet
boundaries) so K is 24x24. However F seems that it has 12x1 at each
processor. I guess sizes of K and F at each proc should be same and
MatGetVecs should ensure same mapping for both K and F but it seems it does
not !

Same problem is solved in other ksp solvers, I wonder how to prepare RHS
for PCBDDC.

thank you

PS: I am at the latest   master + stefano_zampini/pcbddc-primalfixes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141201/1a8ed768/attachment.html>


More information about the petsc-users mailing list