Since Mike McCourt is in dire need of flexible multiphysics infrastructure 
I've started to look at some of the newly implement Mat stuff in PETSc (and my 
head is spinning).

   Could the author's of these things take a look at my comments and respond 
(hopefully with changes, but I can change things also).

   Stream of consciousness writing because I can't get my head around it all.

----

   MatCreateNest() (and VecCreateNexs()).  Does not have the the proper 
construction process that always goes through MatCreate_Nest() (and 
VecCreate_Nest()). This needs to be fixed. Should add something like 
MatNestAddBlocks() or similar name for putting the blocks in after the call to 
MatCreate_Nest().

  MatCreateNest() seems to assume that all Mat's live on all processes in the 
outer Mat communicator. How hard would it be to change the code so that each 
block could live on some subcommunicator?

  MatCreateSubMatrix() will it eventually have MatSetValues() that directs 
requests down to the appropriate block?

   
----

   MatCreateSubMatrix(). Again not the proper construction process built on 
MatCreate_SubMatrix() (when the heck was this written 10 years ago before we 
enforced that rule.) This needs to be fixed. What's with the manual page 
description "Creates a composite matrix that acts as a submatrix" what the heck 
does 'composite' mean here and what does "acts as a submatrix" mean? 

  MatSubMatrixUpdate() what does the documentation "full matrix in the 
submatrix" mean? The full matrix is  bigger than the submatrix so how can it be 
in the submatrix. Terrible phrase.

   MatSubMatrixUpdate() why have this routine, why not model on 
MatGetSubMatrix() and have a single interface function 
MatCreateSubMatrix(Mat,IS,IS,MatRuse,Mat *)?

   MatCreateSubMatrix() terrible name, why not MatGetSubMatrixImplicit()? 

------

  MatCreateLocalRef() again with no proper construction with 
MatCreate_LocalRef() (come on guys get with the program)

  MatCreateLocalRef() 'Gets a logical reference to a local submatrix, for use 
in assembly' what does this mean? Assembly in PETSc is reserved for inside 
MatAssembly,VecAssembly it should not be used for the process of setting values 
into the matrix. Thus this sentence is meaningless gibberish.  Could possible 
be something like 'Gets a logical reference to a local submatrix, for use in 
putting values into that block with MatSetValues() or MatSetValuesLocal()?

MatCreateLocalRef()  How/why is this different than MatCreateSubMatrix()? Could 
they be merged into one construct? Why is this a 'local' ref, is it a block 
only only on this process?

-------
  How is MatCreateBlockMat() which fortunately has the proper constructor 
related to MatCreateNest()? Do they serve the same purpose? Different purposes? 
Can they be merged together? 
--------

   In the end we want to be able to run 'multphysics'  codes where it is a 
command line switch between 'block matrix' storage of the global Jacobian where 
each block is a submatrix of the entire matrix and stored itself for example in 
AIJ format; or one big honking AIJ matrix. In both cases the user calls 
MatSetValues() or MatSetValuesLocal() to put values in and has no switches in 
the code they write that depends on the matrix format, things like 
MatGetSubMatrix() and MatGetSubMatrices() work transparently on them. How do 
these four Matrix classes take us in that direction?

  Thanks


  Barry




Reply via email to