Dear Nils, I think you want to take a look at the functionalities of Utilities::MPI::RemotePointEvaluation
https://www.dealii.org/current/doxygen/deal.II/classUtilities_1_1MPI_1_1RemotePointEvaluation.html What you want to do is to generate a one dimensional quadrature formula of your choice, collecting all the quadrature points where you need to evaluate your functions, and then call RemotePointEvaluation rpe; rpe.reinit(qpoints, tria, mapping); auto v = rpe.evaluate_and_process<double>(…); Take a look at the directory https://github.com/dealii/dealii/blob/master/tests/remote_point_evaluation/ to see examples of how to use this. L. > On 5 May 2025, at 15:49, Nils Schween <[email protected]> wrote: > > Dear deal.II community, > > I am looking for a way to integrate u_h(x,y,z) = \sum \alpha_i > \phi_i(x,y,z) over a single dimension, say z, i.e. a way to perform > \tilde{u}_h = \int u_h(x,y,z) dz. u_h is the finite element solution of > the partial differential equation that I am solving. As usual, in my > application u_h is represented in the form of a solution vector that > contains the coefficients \alpha_i corresponding to the basis functions > \phi_i of the finite element space I chose for the spatial > discretization. The integration can be considered a post processing > step. > > My application is using the MPI capabilities of the deal.II library and, > hence, the solution vector is distributed among many cores/nodes. It > seems to me that this complicates the computation of the average, i.e. > the above integral, because when integrating along one direction, I > need information located on many different cores. > > I looked through the tutorials, the FAQ, the google user group and > searched different places in the library, if there are functions that > integrate out one direction/dimension. However, I was unlucky. > > I would like to ask, if I overlooked something, if anyone did implement > something like this already or if anyone could give a rough strategy how > he/she would go about implementing this average. > > I am looking forward to your answers and thank you in advance, > Nils > > -- > Nils Schween > > Phone: +49 6221 516 557 > Mail: [email protected] > PGP-Key: 4DD3DCC0532EE96DB0C1F8B5368DBFA14CB81849 > > Max Planck Institute for Nuclear Physics > Astrophysical Plasma Theory (APT) > Saupfercheckweg 1, D-69117 Heidelberg > https://www.mpi-hd.mpg.de/mpi/en/research/scientific-divisions-and-groups/independent-research-groups/apt > > -- > 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]. > To view this discussion visit > https://groups.google.com/d/msgid/dealii/87o6w7p3pm.fsf%40mpi-hd.mpg.de. -- 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]. To view this discussion visit https://groups.google.com/d/msgid/dealii/F94C2332-A85F-480F-B481-79E6E4755668%40gmail.com.
