Sean,

Thanks for the wonderfully clear answer. For my function f, I can basically treat the line integral like a "normal" volume integral, setting the direction using the delta functions. This would be the right approach for a distributed adaptive setting as well, no?

Yes. You'd write the integral over the entire volume as a sum over integrals over the locally owned set of cells -- each processor computes on term in this sum, and you then just sum up a number over all processors.


It makes no assumptions about cell layout and is defined at the functional level.

Correct.


If I may ask a follow up with an added wrinkle - it concerns the interplay of material_id (cells) and functions:

What if I don't have the form of f?

In my case, I have been using the material_id marker at the cell level to indicate different materials, that in the assembly loops, then provide different coefficient values to the local sums. Suppose that the distribution of these cell identities(material_id) is updated based on the results of some FE field calculations. Then given the configuration of the cells at that time step, I would like to do the line integral (essentially compute the weight of the material above the point), and go on to another FE solve. However, I do not have a functional form to put in my line integral.

I don't think I quite understand. The function f(x,y,z) in your case will have the form

  if (some_condition)   // depends on the material_id.
    return something;
  else
    return something_else;


I don't know how to describe the weight function globally, but locally (at the cell level) it is defined.

That's all you need. You compute these integrals as sums over all (locally owned) cells, where you use quadrature. So at each quadrature point, you're going to evaluate what value f(x,y,z) has. But for this evaluation, you know what cell you're on, etc.

By way of an example, take a look at this postprocessor that computes the root-mean-square of the velocity over the entire domain in a flow solver (the only really important parts are lines 56-76):

https://github.com/geodynamics/aspect/blob/master/source/postprocess/velocity_statistics.cc



"The material of a cell may be used during matrix generation in order to implement different coefficients in different parts of the domain. It is not used by functions of the grid and dof handling libraries." [1]

Now see also this: https://github.com/dealii/dealii/pull/4492/files


Generally, I am hoping to better understand the relationship of the mesh( things like looping over cells, querying for the local properties, ...) and the Function object class which returns values based on the spatial position.
There really isn't very much of one. Function objects are functions that are dependent on x,y,z. Querying local properties would correspond to functions that depend on K (the set of cells).

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                           www: http://www.math.colostate.edu/~bangerth/

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to