You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to deal.II User Group
Hello everyone,
I am currently developing a matrix-free code which has a non-analytical spatially varying coefficient. As in step-37 I am using a Table<2, VectorizedArray<number>> to store evaluations of the coefficient at all the quadrature points for a given cell batch.
I read my coefficient in from a CSV file corresponding to the values at DOF in a structured mesh which I am using to generate a FEFieldFunction object which i call for all quadrature points to initialize the values in the matrix-free coefficient table. This approach is fairly slow but works okay for the finest level (where the parallel distributed triangulation is the same as the structured mesh). However for coarser multigrid levels I run into issues where the cell within which I am trying to evaluate points is no longer owned by the current processor.
I was wondering if anyone has any suggestions as to how to get around this, or perhaps has any ideas for a faster approach?
Many thanks,
Tom
Timo Heister
unread,
Jul 23, 2025, 10:40:25 AMJul 23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dea...@googlegroups.com
Hi Tom,
What we do in ASPECT is the following:
1. evaluate the coefficient on the active cells and store in a Table
(for each Q point)
2. Project into a FE_DGQ(k) on each cell and store in a finite element
coefficient vector (you can pick k, k=0 would be a constant per cell)
3. interpolate_to_mg() to get a coefficient vector on each multigrid level
4. convert to a Table (interpolate to quadrature points or store a
constant per cell)
We do this because coefficient data is not available on coarser levels
and because, even if it was, it is unlikely to improve the convergence
to have the real coefficient on the coarser levels.