Hi W.,

Apologies for not asking a specific question.  Your help with the SparseMatrix 
constructor still left me confused and I was hoping for clarity.  ( To answer 
your question, the code ran without error but the error came back once I tried 
to use Slepc. )

You said “the local number of columns also needs to add up to the global number 
of columns” but my desired layout is local_num_columns == global_num_columns.  
If I create the local dynamic sparsity pattern with dimension 
local_num_rows.n_elements() X local_num_rows.size(), does the sparse matrix 
constructor set the local_num_columns == global_num_columns?  I don’t want to 
assume things but this is one of the pitfalls of abstraction, I suppose.

I only press this because I get the similar dimension error when I tried to use 
Slepc to solve the test matrix so maybe my initial sparse matrix dimension is 
wrong (or my matrix).  Please take a look at the file I am attaching.  It’s the 
same code you ran before but I added a section using Slepc to solve the 
eigenvalue problem.  It’s bare bones and produces the dimension error just like 
before.  This code works for one processor and given the error, this is not a 
surprise.  For 2 processors, I get “Sum of local length 64 does not equal 
global length 128, my local length 64”. 

I have been hitting this particular wall for quite some time but I know my last 
message Timo responded to did not come across like that at all.  He is 
completely correct and I will keep his constructive comments in mind.

Much appreciated,

Zachary

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3AE61492-4D0D-4BA2-8814-255049C574DA%40gmail.com.

Attachment: step-test_reinit.cc
Description: Binary data


 
> On Jan 7, 2021, at 10:43 PM, Wolfgang Bangerth <bange...@colostate.edu> wrote:
> 
> On 1/6/21 8:07 AM, Zachary 42! wrote:
>> Here is my code again with hopefully better comments.  Looking at the loop 
>> structure for the dynamic_sparsity_pattern should make it clear.  I think 
>> the 3rd argument in the constructor for the dynamic sparsity pattern is 
>> wrong if I want these dimensions.
> 
> Zachary -- there's no question in your email. What happens if you try with 
> your code?
> 
> Timo put it well: We enjoy helping, but there is a limit to how much time we 
> can offer.
> 
> Best
> W.
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bange...@colostate.edu
>                           www: http://www.math.colostate.edu/~bangerth/
> 
> -- 
> 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 a topic in the 
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/If0Ep9rJ67Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/6f33e8b9-90aa-4453-3c17-a1a1a958de40%40colostate.edu.

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3AE61492-4D0D-4BA2-8814-255049C574DA%40gmail.com.

Reply via email to