Gauss elimination on Petsc matrices

2007-06-22 Thread Toby Young
Dear Petsc-dev; Sorry to bring this up again. I am trying to fit Dirchlet boundary conditions on a matrix and retain a symmetric matrix after this operation and have run into some difficulty. Let me pose my question in another way: Is there a Gaussian elimination in the form of an LU decomposit

PETSc sparsity

2007-06-16 Thread Toby Young
>How are you applying boundary conditions? That requires the > sparsity pattern? I am trying to apply Dirchlet boundary conditions, ie. solution = 0 on all boundaries. This, as I understand it, requires a Guass elimination process to keep the final matrix symmetric. If it really is necessary

PETSc sparsity

2007-06-16 Thread Toby Young
> I actually have a "bug" in Prometheus that makes me want the sparse > structure of whole system, It would be very useful to have sparsity information at hand. There are many ways to solve a system. My preferred way is (1) assemble system, (2) apply boundary conditions, and (3) solve. However

PETSc sparsity

2007-06-15 Thread Toby Young
Barry, Thank you for an interesting response. > For algorithms that require dealing with the sparsity structure of > the matrix we generally just include the appropriate private include file > for the matrix format and access the data directly in the underlying format. Can you please elabora

PETSc sparsity

2007-06-15 Thread Toby Young
> If I understand you correctly, a trick we use for this is to use > MatGetRow to get the sparcity pattern of each row (where you are > applying BCs) Neat trick. MatGetRow will give me the row of the matrix, so would then need a little loop to examine the elements and proceed as you suggested; a

PETSc sparsity

2007-06-15 Thread Toby Young
Hello petsc-users and petsc-dev. I am using PETSc to solve finite element problems. In particular I am working with the dealii package which has C++ wrappers designed to interface with PETSc. I am working on developing some of these wrappers. The difficulty I face is that, after applying bounda