Dear deal.II  Users,

I am trying to setup an eigenvalue problem of a piezoelectric bimorph 
cantilever, in which I need to use a distributed block sparse matrix. My 
problem contains displacement and electric potential degrees of freedom. 
Because of that, I get 0 entries in the mass matrix that correspond to the 
potential DoFs. My approach is to condense the stiffness and mass matrices 
so that I can get rid of the potential DoFs in the system. For that, I 
decided to use PETSc::MPI::BlockSparseMatrix. 

When I try to initialize the PETSc::MPI::BlockSparseMatrix, I pass an 
instance of std::vector<IndexSet> that contains the locally owned DoFs for 
the displacement block and the electric potential block. However, the 
reinit() function:

void BlockSparseMatrix 
<https://www.dealii.org/current/doxygen/deal.II/classPETScWrappers_1_1MPI_1_1BlockSparseMatrix.html><
 
number >::reinit 
( 
const std::vector< IndexSet 
<https://www.dealii.org/current/doxygen/deal.II/classIndexSet.html> > &  
*rows*, 
const std::vector< IndexSet 
<https://www.dealii.org/current/doxygen/deal.II/classIndexSet.html> > &  
*cols*, 
const BlockDynamicSparsityPattern 
<https://www.dealii.org/current/doxygen/deal.II/classBlockDynamicSparsityPattern.html>
 
&  
*bdsp*, 
const MPI_Comm &  
*com*  ) 

fails to pass the assertion that compares the individual block sizes and 
the sizes of the IndexSets. Since the size of an IndexSet needs to 
correspond to the total number of DoFs in the system (otherwise I will not 
be able to store some of the DoF indices), but the block sizes are 
naturally smaller than the total number of DoFs, this assertion cannot be 
passed. 

The violated condition was: 
    rows[r].size() == bdsp.block(r, c).n_rows()
Additional information: 
    invalid size

Could anyone tell me if my understanding is correct or if there is a 
solution to my problem?

Best regards,
Gabriel Stankiewicz

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/e74b3911-c714-414b-861f-bcb7927d0442n%40googlegroups.com.

Reply via email to