Beginner question : what are precisely ghost values/dofs, and how they are to be used? I saw a few posts mentioning to update them or enabling “ghost mode” but i don’t know if I need it (in topology optimization in linear elasticity) and what I should do with it.
Ghost degrees of freedom are only relevant when running code in parallel over multiple processes (using mpirun or mpiexec).
Image that you have 1000 000 degrees of freedom in your problem and execute your problem with two processes, you want each process to only own (have data in memory) half of these degrees of freedom each.
However, some degrees of freedom will be on the boundary between processes (image a unit square split in half into to rectangles). Along the boundary between the rectangles there are degrees of freedom both processes need to access. However, a degree of freedom is owned by a single process, and thus it is a ghost on the other process.
In legacy dolfin, you rarely have to think about Ghosts, as the work is done under the hood. In DOLFINx the Ghost communication is more explicit (to ensure efficiency)
So in Ghost mode = none there is nothing to update?
iIf I understand well, ghost values are the equivalent of apply(“insert”) in legacy dolfin.
In any case, thank you for your answers.
Thank you for these clarifications.
In the case where we do have ghosted cells, is there a straightforward way to access only non ghosted coordinates with the ‘‘tabulate_dof_coordinates()’’ command?