Hi!

Your data lives on quadrature points, correct? And I assume you are using 
the parallel::distributed::Triangulation since you are checking for locally 
owned cells.

We have a class parallel::distributed:: 
<https://www.dealii.org/developer/doxygen/deal.II/classparallel_1_1distributed_1_1ContinuousQuadratureDataTransfer.html>
ContinuousQuadratureDataTransfer 
<https://www.dealii.org/developer/doxygen/deal.II/classparallel_1_1distributed_1_1ContinuousQuadratureDataTransfer.html>
 
that could fit your purpose. You can find some example applications in our 
tests, for example tests/base/quadrature_point_data.cc 
<https://github.com/dealii/dealii/blob/master/tests/base/quadrature_point_data.cc>
.

Hope this helps!
Marc

On Thursday, March 23, 2023 at 3:30:22 AM UTC+1 [email protected] wrote:

> Hi all,
>
> I'm solving a phase field fracture problem and need to store the history 
> of elastic energy at each Gauss points. I wonder if there is anyway to 
> transfer( or interpolate) the energy stored at Gauss points of the old mesh 
> to the new mesh during mesh refinement operation. The snippet code below 
> shows how I store history of energy (called 'HistoryField' variable).
>
> for (auto &cell : dof_handler.active_cell_iterators())
> {
> if (cell->is_locally_owned())
> {
> PointHistory<dim> *local_quadrature_points_history =
> reinterpret_cast<PointHistory<dim> *>(cell->user_pointer());
> for(int q=0; q< quadrature_formula.size(); q++)
> {
> local_quadrature_points_history[q].HistoryField = 0.0;
> local_quadrature_points_history[q].max_Ybar = 0.0;
>
> }
> }
> }
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/dealii/b7c319ac-f66a-449b-9fc2-025262e17bf2n%40googlegroups.com.

Reply via email to