Comments (2)
The method is try_emplace
that conditionally inserts elements into maps in C++, and is available in the C++17 standard, and it would easily improve the mesh creation time, as currently every time a new item (node, face, edge) is added to the map, it requires 2 searches (not 3).
This does mean we would be forced to use compilers which support this standard, which all of the recent ones do now so that shouldn't be too much of an issue. The only minor headache is that the compiler argument passed to msvcc is \std:c++17
and the argument passed to gnu/clang compilers is -std=c++17
.
from discretize.
Added in #308
from discretize.
Related Issues (20)
- Bug accessing `TreeCell.faces`
- Bug in recent changes to v0.8.0 HOT 1
- Pip install fails without Cython HOT 1
- Add a more explicit a way to update the origin in TensorMeshes HOT 1
- Inconsistency in `read_UBC` method definition and its docstring HOT 2
- Bug: Accessing `TreeMesh.cell_centers` before finalization produces invalid mesh HOT 1
- Use std::unordered_map in tree.h HOT 2
- Fast Inner Product Matrices for Face Properties
- Fast Face Inner Product Functions HOT 1
- Other types of mean using volume_average HOT 2
- mesh.reshape: Outdated docstring vs what is in code HOT 1
- Install fails with Cython 3.0.2 HOT 1
- Switch to "pyproject.toml" and src layout: Installing from source is not easy on WSL Linux and MacOS HOT 10
- Spurious projections since 0.8.3 HOT 1
- Cell state not preserved with negative cell sizes HOT 3
- get_cells_along_line method not robust for tree mesh HOT 1
- Lazy load SciPy when moving minimum req to 1.9
- ENH: Move away from `numpy` legacy random number generator syntax
- mesh.write_vtk and pyvista.read functions are no longer compatible
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 discretize.