solution transfer for mesh adaptivity

37 views
Skip to first unread message

Giang Huynh

unread,
Mar 22, 2023, 10:30:22 PM3/22/23
to deal.II User Group
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;

}
}
}

Marc Fehling

unread,
Mar 23, 2023, 6:19:18 AM3/23/23
to deal.II User Group
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::ContinuousQuadratureDataTransfer that could fit your purpose. You can find some example applications in our tests, for example tests/base/quadrature_point_data.cc.

Hope this helps!
Marc
Reply all
Reply to author
Forward
0 new messages