I haven't looked at the code, but just some general STL advice:
- Never use std::find on map and set types in stl, use their member
function find instead. std::find could be a linear search in this
case...
- Don't use the [] operator to read elements from maps and sets, use
mymap.find instead.

Martin



2010/11/20 Garth Wells <668...@bugs.launchpad.net>:
> I've done some testing, and using unordered_set appears to not perform
> as well as Set for standard problems.
>
> Each dof (matrix row) has its own set. The sets are usually small, and
> independent of the mesh size. The problem is that the size of set that
> belongs to the global dof is equal to the number of columns in the
> matrix, and when looping over this set (which becomes very large)
> std::find is called a lot.
>
> I don't see simple solution from the SparsityPattern side. What's
> probably needed is an extension to UFC to distinguish between local and
> global dofs.
>
> --
> Sparsity pattern computation dead slow with 'real' spaces
> https://bugs.launchpad.net/bugs/668862
> You received this bug notification because you are a member of DOLFIN
> Team, which is subscribed to DOLFIN.
>
> Status in DOLFIN: Confirmed
>
> Bug description:
> The computation of the sparsity pattern is dead slow when real spaces are 
> used, i.e.,
>
>    R = FunctionSpace(mesh, 'R', 0)
>
> To see the problem, compare the neumann-poisson and poisson demos with fine 
> meshes (256x256)
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp

Reply via email to