Local refinement scales poorly

Bug #701709 reported by Anders Logg
This bug report is a duplicate of:  Bug #735588: Mesh refinement broken. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Confirmed
Medium
Anders Logg

Bug Description

Bug reported by Glenn Terje Lines.

Local refinement seems to be n^3 in the number of cells.

Can be reproduced with the following code:

from dolfin import *
import numpy
import time
import random

mesh = UnitCube(10,10,10)

for i in range(10):
    mf = MeshFunction("bool", mesh, 3)
    k = 0
    for cell in mesh.cells():
        mf.values()[k] = (random.random()>0.5)
        k += 1
    t0 = time.time();
    mesh = refine(mesh,mf);
    dt = time.time() - t0;
    print i, dt, k, k/dt

Results:

# results
P = numpy.array([
[0,0.144922018051,6000,41401.5763835],
[1,0.398217916489,11904,29893.1803596],
[2,0.88475394249,22928,25914.5496831],
[3,2.46636891365,47190,19133.3906857],
[4,10.5502009392,94930,8997.93288747],
[5,39.3473289013,184088,4678.53867442],
[6,302.216933966,379850,1256.87861039],
[7,2436.17705512,760484,312.162861234]])
n = P[:,2];

import pylab
pylab.loglog(n,P[:,1],n,4e-5*n,n,1e-9*n**2,n,1e-14*n**3)
pylab.show()

Anders Logg (logg)
Changed in dolfin:
status: New → Confirmed
assignee: nobody → Anders Logg (logg)
importance: Undecided → Medium
Changed in dolfin:
milestone: none → 0.9.11
Revision history for this message
Anders Logg (logg) wrote :

This bug is "superseded" by https://bugs.launchpad.net/dolfin/+bug/735588 and will (most likely) not be fixed until we reimplement the mesh refinement.

Changed in dolfin:
milestone: 0.9.11 → 1.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.