[Nek5000-users] Element connectivity information

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Mar 14 08:40:30 CDT 2012



Hi Outi,

We encounter this problem all the time in conjugate gradient
and gmres iteration.

For reasons of symmetry (and, hence, commutativity and associativity,
which are two essential ingredients for parallel execution), I would
suggest that you not try to store the data only once, but rather
scale by the inverse counting-matrix (aka, multiplicity), so that 
interface points are not counted twice when computing your inner
products.

The inverse counting-matrix is stored in vmult() and tmult().  A
typical application is:

       alpha = glsc3(vx,vmult,vx,n)   (n=nx1*ny1*nz1*nelv)

which gives the l2 inner product:  alpha := sum_i (vx_i)^2 for a 
vector VX.

Note that if you instead want the L2 inner product

       alpha = \int_Omega (vx)^2 dV

you would compute this as:

       alpha = glsc3(vx,bm1,vx,n)

             = vx^T B vx

which is the inner product of vx with the (diagonal) mass matrix B.

If you want the average of the physical rms (say), it would be:


       alpha = glsc3(vx,bm1,vx,n)
       if (alpha.gt.0) alpha = sqrt(alpha/volvm1)


etc.

In summary, for linear algebra, use vmult(). For physics, use bm1()
(B, on Mesh 1).


Please let me know if this help to resolve your problem.

Best regards,

Paul



On Wed, 14 Mar 2012, nek5000-users at lists.mcs.anl.gov wrote:

> Hi Neks,
>
> I am using Nek5000 coupled to an Arnoldi algorithm for hydrodynamic stability 
> computations. In these, I form a vector of the velocities, which I regularly 
> pass to the Arnoldi solver. Then, a new velocity vector is formed which is 
> passed back to Nek5000.
>
> Now, the code works as it is, but in addition to the physical modes it 
> produces some spurious modes, which I think originate from the fact that the 
> velocities at the element-common boundaries are accounted for twice. To fix 
> this, I need to access the element connectivity information. Can you please 
> guide me to in which variable this is stored?
>
> In particular, this is what I would like to do:
> -  add the element-common points to the local vector only for one of two 
> adjacent elements (and for a corner point, only one of the four elements 
> adjacent to it).
> - for the vector that Arnoldi returns, make sure that the new values of the 
> velocity are inserted also for the other adjacent element(s).
>
> Thanks a lot in advance!
> Outi
>
>
>
>
>
> _______________________________________________
> 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