[Nek5000-users] Building mass and stiffness matrices

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Feb 17 23:36:17 CST 2014


Hi Giuseppe,

It occurs to me that the right way to address your
problem is to dump out the unassembled matrices, which
are all block diagonal, with full blocks.  Then, in addition,
it's easy to write out the matrix that assembles the submatrices
into the full sparse matrix.  That part should be relatively
easy to handle in a framework that is designed to work with
the global index set.  (Nek doesn't deal with the global
indices and for the size matrix you want, in parallel, it
wouldn't be easy to generate them.)

So, basically, Nek would produce

     A_L = block_diag {A^e} _{e=1}^E

and Boolean assembly matrix Q such that

     A = Q^T A_L Q

The elemental matrices, A^e, are completely full. Thus, for
N=9, corresponding to 10 x 10 x 10 = 1000 points in a given
element, you would have 1 million nonzeros in each matrix.
(For undeformed geometries, some of the matrices are sparser.)
The matrix Q^T is rectangular and consists of columns of the
identity matrix.  (See, e.g., Deville, F., & Mund, 2002).
It probably wouldn't take much effort to code up the output
routines for this plus some matlab code to demo how to
assemble the stiffness matrix.

Paul


On Thu, 13 Feb 2014, nek5000-users at lists.mcs.anl.gov wrote:

> Dear users and developers,
> I am using NEK5000 for a 3d unsteady simulation with mixed Dirichlet and
> periodic bc. For the post-processing (a POD-based dynamics) I need the global
> mass and stiffness matrices as built by NEK5000 on my mesh. I would also need
> the matrix having as entries (phi_i, grad(phi_j)) where phi are the basis
> polynomials.  Is it possible to have NEK build these matrices and then save
> them on file? The ultimate goal is to import them on a PETSc program to
> perform some algebraic manipulations. I already found a way to import the
> simulations' results.  Surfing the code, I have found some 1-d routines, but
> I don't know how to extend them to my needs.  Thank you in advance for any
> help or hint.
> Best regards,
> Giuseppe
>
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>


More information about the Nek5000-users mailing list