From: Jed B. <je...@59...> - 2010-09-16 07:56:59
|
Correct about shell and MFFD matrices. If the Mat does not implement MatGetSubMatrix then this call returns a matrix of type MatSubMatrix which works like you say (>=3.1). Preconditioning that thing obviously does not come automatically. Jed On Sep 16, 2010 8:41 AM, "Tim Kroeger" <tim...@ce...> wrote: On Wed, 15 Sep 2010, Jed Brown wrote: > > On Wed, 15 Sep 2010 17:34:14 +0200 (CEST), Tim Kroeger < > tim...@ce...> wrote: > > > > >> Assume further that the matrix is tridiagonal. If I then do what you > >> suggested, four matrix e... > Ah, great! Thank you very much! Another question comes to my mind in this context: Does the whole thing also work for a shell matrix? It seems to me that for a (black-box) shell matrix, the only method to extract some submatrix is to provide a wrapper shell matrix function which extends the input vector by zeros, calls the original shell matrix, and then removes the unwanted components of the result. The question is whether PETSc does this whenever MatGetSubMatrix() is called on a shell matrix or whether I will have to do this myself. >> I don't find this weird. Well, we could let the user decide between >> several modes here, tha... I understand what you mean. First of all, we should let the user know what happens with the "inactive" dofs, otherwise the user might assume something which is not true. Then, also, it might be sensible to give the user a choice here since, depending on the application, one or another thing might be useful. Among the possible things to do, the action of just letting the inactive dof values unchanged is, although removing some well-known properties from the whole thing, the fastest thing to do (in particular if the number of active dofs is very small) and also the action which I need in my application. But perhaps you are right in that it should not be the default action because it is confusing. I'll add an ENUM for this and let the default be zeroing the inactive dofs. I'll also add a comment about "my" mode leading to loss of well-known properties. Best Regards, Tim -- Dr. Tim Kroeger CeVis -- Center of Complex Systems and Visualization Unive... |