fdrmrc / Polydeal

C++ implementation of Polygonal Discontinuous Galerkin method within the deal.II Finite Element library.
https://fdrmrc.github.io/Polydeal/
Other
0 stars 0 forks source link

Compute injection matrix in distributed case #108

Closed fdrmrc closed 6 months ago

fdrmrc commented 7 months ago

Depends on #106 and #107, commits from fb01d98a2fad10d687696334298f8fcda72a0f47 are the relevant ones.

This PR adds a utility function to compute embedding matrices from two different AgglomerationHandlers. They represent a coarse and a fine level in a multigrid hierarchy. Internally, it is exploiting the other two PRs to get children and fine support points for a given coarse agglomerate element. As distributed matrix-types, it supports only Trilinos matrices.

Tested so far only in serial. Tested both in serial and in parallel, varying grid types and degree of the finite element space (test added in https://github.com/fdrmrc/Polydeal/pull/108/commits/4eb646a84c798e0a71d43c7cae5acaacaf356ff7)

@luca-heltai Could you have a look at Utils::fill_injection_matrix()?https://github.com/fdrmrc/Polydeal/blob/4eb646a84c798e0a71d43c7cae5acaacaf356ff7/include/utils.h#L59 The other PRs are mostly done to have such a distributed version working. An example of its usage is in the added test.

fdrmrc commented 7 months ago

Tested also in 3D with the piston mesh. The next picture is with 4 ranks: with opacity, the full domain with the interpolated solution. With wireframe, two of the four partitions. Inside each partition, agglomerates have been generated.

immagine