Comments (6)
First 3-point hierarchical basis introduces some sorting steps, as well as calling O(N) list.index() methods.
I optimized IndexSet a little; see fbe3328.
from spacetime.
Implementation works but the dot-product seems to become the bottleneck over time. If we track the computation time of apply()
for the 3-point mass matrix on uniform grids with max level
ncalls | tottime | percall | cumtime | percall | filename:lineno(function) |
---|---|---|---|---|---|
114882 | 10.004 | 0.000 | 10.580 | 0.000 | indexed_vector.py:60(dot) |
16369 | 6.500 | 0.000 | 6.526 | 0.000 | three_point_basis.py:138(col) |
32829 | 4.617 | 0.000 | 4.680 | 0.000 | three_point_basis.py:115(row) |
392843 | 0.655 | 0.000 | 1.395 | 0.000 | index_set.py:43(neighbours) |
392843 | 0.525 | 0.000 | 0.525 | 0.000 | {built-in method _bisect.bisect_left} |
180748 | 0.428 | 0.000 | 1.442 | 0.000 | three_point_basis.py:179(scaling_support) |
65476 | 0.288 | 0.000 | 1.220 | 0.000 | three_point_basis.py:189(wavelet_support) |
360651 | 0.285 | 0.000 | 0.285 | 0.000 | indexed_vector.py:62() |
490394 | 0.235 | 0.000 | 0.235 | 0.000 | three_point_basis.py:22(position_ss) |
114882 | 0.223 | 0.000 | 0.508 | 0.000 | {built-in method builtins.sum} |
393051 | 0.209 | 0.000 | 0.255 | 0.000 | three_point_basis.py:257(scaling_indices_on_level) |
246588 | 0.163 | 0.000 | 0.163 | 0.000 | interval.py:4(init) |
312 | 0.152 | 0.000 | 15.392 | 0.049 | linear_operator.py:25() |
from spacetime.
The problem seems to be in that while the matrices P and Q have a bounded number of nonzero elements per, the sets sum(self.vector[labda] * other[labda] for labda in index_mask & other.keys())
grows linearly in the size of other
..
from spacetime.
More careful phrasing (sum(self.vector[labda] * other[labda] for labda in other.keys() if labda in index_mask)
) made a big difference. It's now linear and runs a lot faster :-)
from spacetime.
The biggest hurdly to cross to making this truly linear time will be the computation of
from spacetime.
With the tree-implementation, this is no longer really a current topic. Closing for staleness.
from spacetime.
Related Issues (20)
- CPP: Automatically initialize all cached BilForms on construction
- CPP: consider letting BilinearForm::Apply() take an Eigen::VectorXd as (mandatory) input. HOT 2
- CPP: make HeatEquation possibly eat `vec_Y_in` and `vec_Y_out` as parameters HOT 1
- Spacetime bilinear form implementation of \gamma_0' \gamma_0. HOT 1
- Extensions: Andreev method for non-symmetric problems. HOT 1
- Extensions: Schur-complement equation for the new method. HOT 1
- Extensions: Andreevs method for $Y_\delta$ = p.w. consts.
- Extensions: Try normal fem-spaces with Andreevs methods.
- Create Abstract base class for LinearForm and BilinearForm HOT 1
- Multilevel space HOT 1
- Replace persistent time-trees by something owned by the application
- CPP: make MultiscaleQuadratureLinearForm
- CPP: flag to not cache the singlescale matrices HOT 1
- CPP: fix the *many* leaf metaroots introduced in GenerateYDelta and GenerateXDeltaUnderscore
- Extension: experiment with *continuous linear* Y_delta.
- Residual deterioation
- Original refinement method
- Maximum strategy instead of Dorfler
- Zoek uit of Z_delta persistent vs temporary een tijdsverschil geeft
- Create 1D space
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacetime.