Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Weixiong Zheng
Daniel and Dr Bangerth, Thanks for the help. I got it resolved with modifying the dsp. That does be my misunderstanding, hahaha. Best, Weixiong 在 2017年6月7日星期三 UTC-7上午10:33:57,Wolfgang Bangerth写道: > > On 06/07/2017 11:14 AM, Weixiong Zheng wrote: > > > > I see your point. I would double check

Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-07 Thread Weixiong Zheng
Daniel, I see your point. I would double check later. The reason I didn't use locally relevant dofs is I didn't design the code to do h-refinement so I didn't see points using relevant dofs. Thanks, Weixiong 在 2017年6月7日星期三 UTC-7上午6:35:44,Daniel Arndt写道: > > Weixiong, > > [...] >>

Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-06 Thread Weixiong Zheng
This is how I setup my sparsity pattern: if (discretization=="DFEM") fe = new FE_DGQ (p_order); else fe = new FE_Q (p_order); dof_handler.distribute_dofs (*fe); locally_owned_dofs = dof_handler.locally_owned_dofs (); DynamicSparsityPattern dsp (locally_owned_dofs); if

Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-06 Thread Wolfgang Bangerth
On 06/06/2017 12:10 PM, Weixiong Zheng wrote: It runs in serial. The error occurs when using multiple processors. And it really happens when you call `compress()`? The only thing I can think of is that you didn't set up the sparsity pattern correctly. Can you show us the code that sets up

Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-06 Thread Weixiong Zheng
It runs in serial. The error occurs when using multiple processors. -- 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

Re: [deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-06 Thread Wolfgang Bangerth
On 06/06/2017 03:13 AM, Weixiong Zheng wrote: Now, I got the error: compressing can go through direction 0 but not 1 with the error at the end of this post. Any ideas how to fix it? Thanks in advance! Weixiong [0]PETSC ERROR: - Error Message

[deal.II] compress error for vector of PETScWrappers::MPI::SparseMatrix

2017-06-06 Thread Weixiong Zheng
Dear All, I am doing a radiation transport problem, which has multiple individual equations (number determined by the number of directions we input). As the number of directions is arbitrary, I put the sparsematries are contained in std::vectors as raw pointers (using LA namespace to stand for