Hello all,

This question is a general one, may not be specific just to deal.II. I am 
writing a code to solve the compressible Navier-Stokes equations. Every 
time step requires calculation of numerical flux on every face. There can 
be three cases in a distributed triangulation. I am not considering a 
dynamic mesh.

   1. Internal face, not shared between domains. Here, the flux is 
   calculated and RHS of both the concerned cells is updated.
   2. Internal face, shared between domains. Flux is calculated and only 
   the RHS of owned cell is updated.
   3. Boundary face. Flux is calculated (boundary conditions come to play) 
   and RHS of cell is updated.

To identify these cases, if conditions can be used. But since every face 
can only be of one of the three types, it is redundant to check its type 
for every time step. *Does this significantly effect the performance?* If 
yes, then the following question is relevant.

Is there any better way? I once had the following idea.

   1. Assign a user id for every face:
      1. If face is a boundary face (type 3), user id = boundary id
      2. For type 1 face, user id = maximum boundary id + 1
      3. For type 2 face, user id = maximum boundary id + 2
   2. Construct an array of lambdas, one for each user id of face. This 
   probably requires capturing everything by reference in the lambda
   3. Call the lambda corresponding to a face user id for every face to 
   update the contribution of numerical flux to RHS

I would like to know opinions about feasibility and efficiency of this 
method. And also, any other approaches that somebody might have used or are 
aware of.

Thank you
Vachan

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/5f07e124-ad12-48e4-97f0-379de168f83d%40googlegroups.com.

Reply via email to