Are you thinking of using PCSetModifyMatrices()? Actually, this brings up
another issue (now on petsc-dev).
Should this callback be attached to a Mat, instead of a PC?  Then
MatGetSubMatrices() can use this callback on each of the extracted
submatrices, if necessary.  In the case of a KKT system, it would then set
the nontrivial block size on the primal submatrix.

Dmitry.

On Wed, Apr 11, 2012 at 3:33 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> The original matrix might not have blocks, but that does not mean that a
> submatrix does not have blocks.
> On Apr 11, 2012 3:30 PM, "Mark F. Adams" <mark.adams at columbia.edu> wrote:
>
>>
>> On Apr 11, 2012, at 11:24 AM, Jed Brown wrote:
>>
>> On Wed, Apr 11, 2012 at 12:01, Mark F. Adams <mark.adams at 
>> columbia.edu>wrote:
>>
>>> eed to know the block size (eg, 4).  I get this info by having the user
>>> set the block size of the matrix.  This is what you should do for the
>>> non-contact test.  This will not work with contact equations ... or at
>>> least it does not make sense.  How can I get this info?
>>>
>>> 1) hard wire it: if I see 7 vectors then bs=4.
>>>
>>
>> Hell no.
>>
>>
>>>
>>> 2) have setNearNullSpace take a block size, and set the vector block
>>> size, which I can get like I do from the matrix now.
>>>
>>
>> No.
>>
>> When you call MatGetSubMatrix(), you will get back a matrix that has a
>> near null space (and a block size if that happens to be relevant; there
>> will not be a block size if deformation and thermodynamics are in different
>> spaces). Don't worry about how that is done, just call MatGetSubMatrix().
>>
>>
>> OK, I don't see how you know that the block size is 4 ... do you call
>> MatSetBlockSize even if there are constraints that are not blocked?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120411/1a587cf7/attachment.html>

Reply via email to