Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Jed Brown via petsc-dev
"Smith, Barry F."  writes:

>   Jed,
>
>  Good recall. We could use the new flag that indicates the block size was 
> never set by the user to allow a change from the 1?

Yeah, I thought that had been the idea behind -1, but the code doesn't seem to 
enforce it.


Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Smith, Barry F. via petsc-dev


  Jed,

 Good recall. We could use the new flag that indicates the block size was 
never set by the user to allow a change from the 1?

  Barry


> On Sep 4, 2019, at 2:42 PM, Jed Brown  wrote:
> 
> "Smith, Barry F. via petsc-dev"  writes:
> 
>>  It seems reasonable at SetUp time to make it 1. If we need to have the 
>> information that user never set it (I don't know why we would want this) 
>> then that can go into a new flag.
> 
> I think I recall code paths in which the blocksize is set after
> PetscLayoutSetUp, and allowed so long as it's compatible with the sizes.
> It's possible that those are no longer relevant.



Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Jed Brown via petsc-dev
"Smith, Barry F. via petsc-dev"  writes:

>   It seems reasonable at SetUp time to make it 1. If we need to have the 
> information that user never set it (I don't know why we would want this) then 
> that can go into a new flag.

I think I recall code paths in which the blocksize is set after
PetscLayoutSetUp, and allowed so long as it's compatible with the sizes.
It's possible that those are no longer relevant.


Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Václav Hapla via petsc-dev
Exactly.

Thanks,
Vaclav

4. září 2019 20:15:42 SELČ, "Smith, Barry F."  napsal:
>
>It seems reasonable at SetUp time to make it 1. If we need to have the
>information that user never set it (I don't know why we would want
>this) then that can go into a new flag.
>
>   Barry
>
>
>> On Sep 4, 2019, at 11:15 AM, Matthew Knepley via petsc-dev
> wrote:
>> 
>> On Wed, Sep 4, 2019 at 12:14 PM Václav Hapla via petsc-dev
> wrote:
>> Is there any reason why PetscLayoutSetUp couldn't guarantee blocksize
>>= 1? I don't like the negative value being there forever requiring all
>that PetscAbs business. It seems to me it just complicates things
>unnecessarily.
>> 
>> We are using -1 to indicate "never set", but I don't see any reason
>to keep it after SetUp().
>> 
>>Matt
>>  
>> Thanks,
>> Vaclav
>> 
>> 
>> -- 
>> What most experimenters take for granted before they begin their
>experiments is infinitely more interesting than any results to which
>their experiments lead.
>> -- Norbert Wiener
>> 
>> https://www.cse.buffalo.edu/~knepley/


Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Smith, Barry F. via petsc-dev

  It seems reasonable at SetUp time to make it 1. If we need to have the 
information that user never set it (I don't know why we would want this) then 
that can go into a new flag.

   Barry


> On Sep 4, 2019, at 11:15 AM, Matthew Knepley via petsc-dev 
>  wrote:
> 
> On Wed, Sep 4, 2019 at 12:14 PM Václav Hapla via petsc-dev 
>  wrote:
> Is there any reason why PetscLayoutSetUp couldn't guarantee blocksize >= 1? I 
> don't like the negative value being there forever requiring all that PetscAbs 
> business. It seems to me it just complicates things unnecessarily.
> 
> We are using -1 to indicate "never set", but I don't see any reason to keep 
> it after SetUp().
> 
>Matt
>  
> Thanks,
> Vaclav
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments 
> is infinitely more interesting than any results to which their experiments 
> lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/



Re: [petsc-dev] Negative blocksize

2019-09-04 Thread Matthew Knepley via petsc-dev
On Wed, Sep 4, 2019 at 12:14 PM Václav Hapla via petsc-dev <
petsc-dev@mcs.anl.gov> wrote:

> Is there any reason why PetscLayoutSetUp couldn't guarantee blocksize >=
> 1? I don't like the negative value being there forever requiring all that
> PetscAbs business. It seems to me it just complicates things unnecessarily.
>

We are using -1 to indicate "never set", but I don't see any reason to keep
it after SetUp().

   Matt


> Thanks,
> Vaclav



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/