From: <la...@im...> - 2005-03-24 14:40:03
|
Dear libmeshers, I've got an issue on how to organize my code. For a start, I'm implementing a pressure correction solver for the generalized Stokes problem. The code is now working great, the solution is the right one, except that it could run way faster if it didn't have to reassemble matrices and rhs's from scratch at each time step. Since I'm planning to ultimately implement a semi-implicit Navier-Stokes solver, I'll have to use a large number of time steps and this issue is crucial. The problem could be reassembled at each time step by storing the single matrices (mass, diffusion) and adding them to form the system matrix or multiplying them by a vector to form rhs terms. This would solve performance issues, but there's a problem. Matrices in the Stokes system are M, the mass matrix, S, the diffusion (laplacian) matrix, and L the divergence matrix (whose transpose is the gradient matrix for the pressure). The problem resides in L: how can I store it? It's a rectangular matrix, because it basically couples the velocity dofs with the pressure dofs. Notice that I need it even in a pressure-correction scheme in order to assemble the rhs without looping over the elements constructing the pressure gradients at hand. Is there a way in which I can store the L matrix with the right sparsity pattern, or is there an easy extension to limbesh I could contribute? (Mind that this problem is potentially common to a lot of splitting schemes) I hope I've been clear enough, and thanks in advance for your help! Luca -- Luca Antiga, PhD ---------------------------------------------- Biomedical Technologies Laboratory Bioengineering Department, Mario Negri Institute Villa Camozzi, 24020, Ranica (BG), Italy ---------------------------------------------- phone: +39 035 4535-381 email: an...@ma... web: http://villacamozzi.marionegri.it/~luca ---------------------------------------------- |