[Nek5000-users] Boundary condition loop

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Mon Apr 22 09:03:38 CDT 2013


Hi Josh,

one additional comment that you can loop with if statements only once to fill up your 1-D mask/pointer array which you can later loop over instead.

Let me know if you need more details.

Best.
Aleks 


----- Original Message -----
From: nek5000-users at lists.mcs.anl.gov
To: nek5000-users at lists.mcs.anl.gov
Sent: Monday, April 22, 2013 8:39:22 AM
Subject: Re: [Nek5000-users] Boundary condition loop



Hi Josh,

Your approach is the only one I know of.

Note that there are many routines around that will access
the points that are on a given face pair (f,e), so you might
want to check the structure of those for your "Do computations"
block.

Don't forget "integer e,f"    :)

Cheers, Paul


On Mon, 22 Apr 2013, nek5000-users at lists.mcs.anl.gov wrote:

> Neks,
>
> I need to loop over all element faces that are boundary faces (doesn't matter which type of boundary condition).  I know one way to do this would be
>
> do e=1,nelv
>  do f=1,2*ndim
>    if (cbc(f,e,1).ne.'E  '.and.cbc(f,e,1).ne.'P  ') then
>        ! Do computations
>    endif
>  enddo
> enddo
>
> Is there a more elegant solution for this, maybe some array that points to element/face combinations that are boundary conditions?
>
> Thanks,
>
> Josh
> _______________________________________________
> 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