gridap / gridap/GridapEmbedded.jl

Implement AgFEM on Octree Distributed Meshes

Open
#111 37 comments 0 reactions 2 assignees Claimed by @ericneiva View on GitHub
Dominant language
Julia
Stars
50
Forks
16
PR merge metrics
No merged PRs in 30d

Description

**LAST UPDATE APR 17 2026**

Hi all,

Here some minimal notes about this development. I might extend it next week.

Next steps (for now):

* [x] @amartinhuertas confirms the ghost layer can be extended beyond first layer
* https://github.com/cburstedde/p4est/blob/master/src/p4est_ghost.h#L408
* [x] @amartinhuertas creates a model **M** in GridapP4est.jl with >1 ghost layers **[WIP [here](https://github.com/gridap/GridapP4est.jl/pull/74)]**
* [x] @JordiManyer checks that **M** runs through Gridap until assembly
* For the current set of tests in GridapP4est, the code seems to run consistently with **M** from the beginning to end, including FE assembly and solution of the linear system.
* We can now create cartesian models with arbitrary number of ghost layers using the [following branch of GridapDistributed.](https://github.com/gridap/GridapDistributed.jl/tree/expand-ghost)
* [ ] @JordiManyer and @ericneiva adapt the distributed cell aggregation scheme to the scenario `> 1 ghost layers`
* Working on [this branch](https://github.com/gridap/GridapEmbedded.jl/tree/distributed_aggregate_w_multiple_ghost_layers) checking out [expand-ghost](https://github.com/gridap/GridapDistributed.jl/tree/expand-ghost) from GridapDistributed.jl
* [x] @ericneiva designs a test on uniform meshes where a "compliant" path can only be found if minimum distance to centroid criterion is communicated: [**2D test here**](https://github.com/gridap/GridapEmbedded.jl/blob/04eda209d1129647156fd1080b3514e8227266cc/test/DistributedTests/Issue111Tests.jl)
* [x] @ericneiva updates the sequential cell aggregation such that it provides the "objective function" to the distributed counterpart. See [1866a38](https://github.com/gridap/GridapEmbedded.jl/commit/1866a38f4969ef086d4fc593cfad42cd2165395a).
* [ ] @ericneiva Adds warning when the root cell of a last-layer ghost cell is an owned cell
* [x] @ericneiva Brief performance comparison w.r.t. old algorithm
* [ ] @ericneiva Updates results with minimum wall times
* [x] @JordiManyer Optimise old aggregation to recover weak scalability
* [ ] @ericneiva reruns performance comparison of dist-aggregation on uniform in MNV
* [ ] (to be decided) Performance comparison including times to set up dofs
* [ ] @JordiManyer reworks the distribution of DoF ownership on uniform meshes according to his [notes](https://github.com/gridap/GridapEmbedded.jl/blob/distributed_aggregate_w_multiple_ghost_layers/docs/src/devnotes/distributed-agfem.md)
* [x] [Pre-requisite] @ericneiva deals with the local distribution of DoFs on the patch-conforming uniform mesh (i.e. the sequential part of the task). See [7fd7a6c](https://github.com/gridap/GridapEmbedded.jl/commit/7fd7a6c5b050b4949cb96d0eb09bc01e2962405b).
* [x] @amartinhuertas implements support for the creation of a FESpace out of a Triangulation (currently in a `GridapP4est.jl` branch: https://github.com/gridap/GridapP4est.jl/tree/fe_space_on_triangulation)
* [x] @ericneiva updates closest root cell criterion (relative distance) of Definition 2.2 in https://arxiv.org/pdf/2006.05373
* [ ] @janmodderman tests sequential AgFEM on octree meshes
* https://github.com/janmodderman/GridapEmbedded.jl/tree/hydro_code
* Convergence tests on Fichera corner PB or similar
* h-adaptive refinements driven with a suitable error estimator
* First with CutFEM, then with AgFEM
* [ ] distributed h-AgFEM
* [x] @amartinhuertas Updates GridapP4est to the latest Gridap release
* [ ] @amartinhuertas Update set up of conforming space in GridapP4est.jl with rework of `FESpaceWithLinearConstraints`
* [x] @ericneiva provides h-AgFEM distribution of dofs on the "owned" dofs (raw constraint arrays)
* [x] Rewrite assuming raw constraint arrays as input
* [x] Attempted in 007d98792bc6b96477ff31c5fbb6adc99ae464bd need LinearConstraintsMap which relies on `FESpaceWithLinearConstraints` data layout
* [x] [Documented pitfall](https://github.com/gridap/GridapEmbedded.jl/blob/3cbfcb5119535c471b1951103b43201539104ef9/test/dev/eric_dev.jl#L381) in uncoupling from internal data layout of `FESpaceWithLinearConstraints`
* [x] Rewrite using the [constraints](https://github.com/gridap/Gridap.jl/tree/constraints) branch
* [ ] Performance optimisations
* [ ] @ericneiva use local dictionaries to compress repeated constraining dofs of hanging dofs
* [ ] @ericneiva checks that OctreeDistributedDiscreteModels "have affine maps"
* [ ] Precompute root-reindex cell maps on a bounding box of the aggregates
* [ ] @JordiManyer distributed dof setup of h-AgFEM extending the algs developed for the uniform case
* **NOTE** that, strictly, we only need to complete/make-consistent across processors the ill-posed free dof constraints, because the ill-posed hanging dofs can be locally resolved once the ill-posed free dofs are consistently resolved
* **TO EXPLORE** An abstract framework for composing linear constraints
* [x] @oriolcg Complete weighted-aggregated SBM formulation with the DG-like terms on cut/cut and cut/interior facets
* [ ] @janmodderman update Fichera code and implement the Li and Bettess refinement criterion

I will keep this issue updated.

FYI @oriolcg @santiagobadia

Let me know if I miss something important or feel free to comment it below.

Thanks :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.