Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: David Knezevic <dave.knez@gm...>  20090109 22:07:11

Hi all, I am doing some eigenvalue computations (using the SLEPc interface in libMesh) on matrices assembled from a PDE with a Dirichlet boundary condition, and in this situation the penalty method that is typically used in libMesh is not very good because the penalty term messes up the matrix's spectrum. As a result, I would like to be able to compute the matrix in which all the rows and columns corresponding to the DOFs on a Dirichlet boundary have been removed. If anyone can offer suggestions about the best way of going about this, that'd be a big help. I'll need to introduce a mechanism for flagging the relevant DOFs during matrix assembly (e.g. by adding a _is_dirichlet_dof flag to dof_object?) and then copying all nonDirichlet matrix entries to a new (smaller) matrix. Where abouts would be a natural place for this function to go? e.g. in ImplicitSystem? Also, would people want this to be added to the library (I'm sure it'll be a very computationally intensive operation)? An alternative would be to zero out the rows and cols and set the diagonal to 1; unlike the penalty method, this wouldn't adversely affect the spectrum, but for my application I'd prefer to generate the reducedsize matrix. Cheers, Dave 
From: John Peterson <peterson@cf...>  20090109 22:16:42

On Fri, Jan 9, 2009 at 4:07 PM, David Knezevic <dave.knez@...> wrote: > Hi all, > > I am doing some eigenvalue computations (using the SLEPc interface in > libMesh) on matrices assembled from a PDE with a Dirichlet boundary > condition, and in this situation the penalty method that is typically > used in libMesh is not very good because the penalty term messes up the > matrix's spectrum. > > As a result, I would like to be able to compute the matrix in which all > the rows and columns corresponding to the DOFs on a Dirichlet boundary > have been removed. If anyone can offer suggestions about the best way of > going about this, that'd be a big help. I'll need to introduce a > mechanism for flagging the relevant DOFs during matrix assembly (e.g. by > adding a _is_dirichlet_dof flag to dof_object?) and then copying all > nonDirichlet matrix entries to a new (smaller) matrix. Where abouts > would be a natural place for this function to go? e.g. in > ImplicitSystem? Also, would people want this to be added to the library > (I'm sure it'll be a very computationally intensive operation)? > > An alternative would be to zero out the rows and cols and set the > diagonal to 1; unlike the penalty method, this wouldn't adversely affect > the spectrum, but for my application I'd prefer to generate the > reducedsize matrix. Hi Dave, A couple things come to mind: 1.) DenseMatrix::condense(...) This would be useful in getting the zero'd rows/cols and the 1 on the diagonal, but it won't completely remove them. 2.) The Dirichlet rows give something like O(penalty) positive and negative eigens. If you mapped those to zero, with the linear transformation options in slepc, would that help you? I did something similar in my dissertation...  John 
From: David Knezevic <david.knezevic@ba...>  20090111 19:40:36

Thanks for the suggestions John, they feasible options for me I think. Just to follow up, I think that the create_submatrix function in SparseMatrix (which only works for a PetscMatrix) should allow me to create a new matrix with the boundary DOFs removed so I'll look into that as well. Thanks, Dave John Peterson wrote: > On Fri, Jan 9, 2009 at 4:07 PM, David Knezevic <dave.knez@...> wrote: >> Hi all, >> >> I am doing some eigenvalue computations (using the SLEPc interface in >> libMesh) on matrices assembled from a PDE with a Dirichlet boundary >> condition, and in this situation the penalty method that is typically >> used in libMesh is not very good because the penalty term messes up the >> matrix's spectrum. >> >> As a result, I would like to be able to compute the matrix in which all >> the rows and columns corresponding to the DOFs on a Dirichlet boundary >> have been removed. If anyone can offer suggestions about the best way of >> going about this, that'd be a big help. I'll need to introduce a >> mechanism for flagging the relevant DOFs during matrix assembly (e.g. by >> adding a _is_dirichlet_dof flag to dof_object?) and then copying all >> nonDirichlet matrix entries to a new (smaller) matrix. Where abouts >> would be a natural place for this function to go? e.g. in >> ImplicitSystem? Also, would people want this to be added to the library >> (I'm sure it'll be a very computationally intensive operation)? >> >> An alternative would be to zero out the rows and cols and set the >> diagonal to 1; unlike the penalty method, this wouldn't adversely affect >> the spectrum, but for my application I'd prefer to generate the >> reducedsize matrix. > > Hi Dave, > > A couple things come to mind: > > 1.) DenseMatrix::condense(...) > This would be useful in getting the zero'd rows/cols and the 1 on the > diagonal, but it won't completely remove them. > > 2.) The Dirichlet rows give something like O(penalty) positive and > negative eigens. If you mapped those to zero, with the linear > transformation options in slepc, would that help you? I did something > similar in my dissertation... > 
Sign up for the SourceForge newsletter:
No, thanks