[petsc-dev] DMPlexMarkBoundaryFaces is quadratic time

Jed Brown jedbrown at mcs.anl.gov
Wed Nov 20 20:42:50 CST 2013


Matthew Knepley <knepley at gmail.com> writes:
> Why is it quadratic time? I just looked again, and it seems to be linear
> time to me.

Look at DMLabelSetValue().  If the point is not labeled yet
(PetscFindInt returns negative) then you call PetscMemmove(), which is
linear complexity in general.  It's not really quadratic because these
faces all come in order, but it could have a whomping big constant if
that label had already been used for other points with a higher value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131120/2547fae6/attachment.sig>


More information about the petsc-dev mailing list