[Nek5000-users] weak derivative, dssum and binvm1 in cvode_driver

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Jun 5 04:55:22 CDT 2014


Hi Emmanuel,

Note that bintm1 and bm1 are not precise inverses of one another.
bm1 is the unassembled mass matrix - i.e., it is the collection of local
(to each element) mass matrices, each of which is diagonal.

Conceptually, we denote the local mass matrix as B_L, for local.
Then, the assembled mass matrix is:

     B := Q^T B_L Q

where Q is the Boolean matrix that copies global degrees of freedom
to their shared counterparts (i.e., copies a values to shared faces,
edges, vertices, etc.).   For the SEM, B_L is diagonal, as is B, so
Binv := B^-1 is easily computed.   Once the entries of this diagonal
matrix are known, we can copy them to their element-based locations,
so that we can generate B^-1 * r very easily.

Often, products with these matrices, in conjunction with dssum, are used
to generate continuous fields and that appears to be what is happening in
this case.   An example would be if you want to find a the continuous
counterpart to a discontinuous function g.  The usual projection approach
is:  Find gc \in H1 such that  \int v gc dV = \int v g dV for all v in H1, which
ends up looking like:

Find gc \in H1 such that:


         (v,gc) = (v,g)  for all g \in H1

or

         v B gc = v Q^T B_L g_L

               gc = B^-1 Q^T B_L g_L

               gc_L = Q B^-1 Q^T B_L g_L

In Nek, the last statement is expressed as:

              call col2(g,bm1,n)
              call dssum(g,nx1,ny1,nz1)
              call col2(g,bintm1,n)

In your cvode case, these statements are permuted because of the
initial state of the data and the desired output (which is to be B*q --
which is why the variable is labeled bq).

Paul




________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Thursday, June 05, 2014 2:38 AM
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] weak derivative, dssum and binvm1 in cvode_driver

Hi Emmanuel

>From what I recall:
CVODE solves the governing non-linear eqns in the strong form. That’s why we have to project every term of the RHS onto H2 (dssum and collocate with bintm1). The sum is projected again onto H2 because it gets devided by vtrans. Hope this helps.

Cheers,
Stefan

Von: <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Antworten an: <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Datum: Thursday, June 5, 2014 at 9:20 AM
An: "nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Betreff: Re: [Nek5000-users] weak derivative, dssum and binvm1 in cvode_driver

I’m adding another quick question:

why in the routine makeq, under the cvode statement, there are these following 2 lines:
             call col2(bq,bintm1,ntot)
             call col2(bq,bm1,ntot)

I’m not sure to understand why we are multiplying bq by the inverse of the mass matrix (bintm1) and just after multiplying it back by the mass matrix (bm1). Moreover, after leaving the makeq routine, fctfun will multiplying again ydot=bq/vtrans by the inverse of the mass matrix.

Why all of these operations? Thank you for your help !



Best regards,
Emmanuel



On 5 Jun 2014, at 12:14, <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>> <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>> wrote:

Dear Nek team,

I have a quick question: in cvode_driver.f, in the routine fcvfun, do all the derivatives must be in weak formulation (using wgradm1) when constructing the right hand side term ydot?
Because at the end of the routine fcvfun,  dssum and multiplication by binvm1 are applied to the right hand side term ydot.

It’s also not clear to me if I need to apply dssum and binvm1 for each derivative term appearing in my equation (in other terms, each time after calling wgradm1), or if I need to apply dssum and binvm1 only to the whole RHS term ydot ?

I’m afraid of inconsistency if apply twice dssum and binvm1: one during the construction of operators and one on the final ydot term.

Thank you for you help !

Best regards,
Emmanuel



_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users

_______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20140605/215fe07b/attachment-0001.html>


More information about the Nek5000-users mailing list