On 8/9/20 1:58 PM, Feimi Yu wrote:
>
> I am doing a grid study of a 2D mesh. At first I simply applied a local
> refinement in the code for a specific region,
> but it turns out this caused the load to be unbalanced among the ranks (the
> rank carrying the refined mesh is much more loaded than others)
> and the computation became very slow.
Are you partitioning the mesh yourself, or are doing different things on
different parts of the domain? I'm assuming that you are using
parallel::distributed::Triangulation, which automatically partitions the mesh
so that every process has roughly the same number of cells.
> Then I tried refine the mesh and output
> it as a file, then read it in as regular mesh.
> This time it seems that the hanging nodes are not properly treated.
Yes. That's because the mesh format does not record which cells neighbor which
cells. The only way to re-construct this kind of neighborship relationship is
by checking which cells share a common face -- which refined children do not
with their parent's neighbor.
> (DoFTools::make_hanging_node_constraints() only search for cells
> that have children, which is lost after the I/O I did). Is there any way to
> resolve this problem, by either re-balance the
> computation load after local refinement or make the solver realize the hanging
> nodes?
Writing out and reading in will not work. The question is why your mesh is not
load balanced.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/