[Nek5000-users] Subroutine opdssum

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Wed Jun 1 04:43:01 CDT 2011


Hi Andrea,

First let me point out that there is a bug in qthermal(). We should
perform the direct stiffness summation on the v-mesh instead of
T-mesh.

Back to your question:
You are right, the direct stiffness summation is a special
gather-scatter (gs) operation. In general you need two parameters to
define a gs-operation:

- operation (e.g. +, *, max, min, ...)
- operands

We compute the operands at run-time using the global glo_num array
(defined in CB c_is1). This array is an input for gs_setup() and tells
the gs-code what data items it should act on. The gs_setup() call will
return a gs-handle which we store for all fields in gsh_fld. It's just
a handle so the actual value doesn't matter. In fact we use a
zero-based index. Typically there are only two "active" gs-handles for
the fields. One for the v-mesh and one for the T-mesh.

The reason so switch ifield before a dssum() call is simply related to
a bad design in the API. It's a workaround to use the correct handle.

-Stefan






On 5/31/11, nek5000-users at lists.mcs.anl.gov
<nek5000-users at lists.mcs.anl.gov> wrote:
> Dear Paul,
>
> thank you very much for your help: the answer is very clear.
> I was asking that question because I have a problem with conjugate heat
> transfer and Low Mach number formulation (I already posted a question about
> that) and I was trying to understand what is going on in qthermal.f .
> When at line 41 of qthermal.f the subroutine opdssum is called, ifield= 2
> (temperature field), and when vec_dssum is called, gs_op_many is executed
> with gsh_fld(ifldt)=1 (where ifldt=ifield).
> Then at line 50, ifield is changed to 1 (velocity field). After that dssum
> is called and gs_op is executed with gsh_fld(ifldt)= 0.
> I don't understand why gsh_fld(2) is equal to 1 while gsh_fld(1) is equal to
> 0. What is the difference in the two operations?
>
> Thanks in advance for your help.
>
> With best regards,
> Andrea.
>
>
> -----Original Message-----
> From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of
> nek5000-users at lists.mcs.anl.gov
> Sent: Tue 5/31/2011 1:10 AM
> To: nek5000-users at lists.mcs.anl.gov
> Subject: Re: [Nek5000-users] Subroutine opdssum
>
>
> Dear Andreas,
>
> gsh_fld(ifldt) refers to the gather-scatter handle for field "ifldt"
>
> ifldt would be a flag refering to the field (1=velocity, 2=temperature,
> etc.) for which the gather-scatter (gs) operation is being performed.
>
> At present, the situation is not entirely satisfactory because ifield
> is a global variable that can be in an ambiguous state.  In the past,
> opdssum (like all other "op" commands) would be applied only on a vector
> field - for which there is only one mesh (or topology), namely, velocity.
> In MHD, one also has the B-field but this field generally matches the
> topology of the velocity.   This state of affairs will change in the near
> future when we support a B-field external to the velocity field.
>
> I hope this clarifies a bit...
>
> Paul
>
>
>
> On Sat, 28 May 2011, nek5000-users at lists.mcs.anl.gov wrote:
>
>> Dear all,
>>
>> I was looking into the subroutine "vec_dssum", which is called in
>> "opdssum".
>> At a certain point there is a call to "gs_op_many" (a gather scatter
>> operation I guess, isn't it?) and one of the arguments which is passed to
>> this subroutine is "gsh_fld(ifldt)". I printed to screen the content of
>> "gsh_fld" but I don't understand what is the meaning of it.
>>
>> Thanks in advance for your help.
>>
>> Regards,
>> Andreas.
>> _______________________________________________
>> Nek5000-users mailing list
>> 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
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
>
>



More information about the Nek5000-users mailing list