Algorithm 1.
Initialize set of coarse mesh elements C with tetrahedral elements from mesh generation |
for each c ∈ C do |
compute V(c), the volume of c |
compute N(c), the list of nearest neighbors of c |
initialize L(c), the list of tetrahedral elements comprising c |
end for |
for each c ∈ C such that V (c) < Vt do |
Merge c with the member of N(c) with the largest volume, m |
Remove c from C |
Update N(m) to include N(c): |
Update members of N(c) to include m |
Update members of N(c) to remove c |
Update V (m) = V (c) + V (m) |
Update L(m) = L(m) ∪ L(c) |
end for |