Comments (4)
What is an example of something this enables that we can't do right now (with the burn status stored in the burn_t)?
from microphysics.
What is an example of something this enables that we can't do right now (with the burn status stored in the burn_t)?
It can propagate up the call chain into parts of our code that aren't Microphysics-specific. This could reduce the amount of boilerplate code significantly by using the and_then
extension (https://github.com/TartanLlama/expected?tab=readme-ov-file#expected).
This extension is now part of C++23: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2505r1.html
For example, we could implement hydro retries like this:
tl::expected<image,fail_reason> attempt_hydro_update (const hydro_state& state) {
return burn_strang_split(state)
.and_then(hydro_stage1)
.and_then(hydro_stage2)
.and_then(burn_strang_split)
}
from microphysics.
it looks like this is a C++23 feature, right?
from microphysics.
it looks like this is a C++23 feature, right?
Yes. You can also copy this (public domain) header file and use it now with C++17: https://github.com/TartanLlama/expected/blob/v1.1.0/include/tl/expected.hpp.
from microphysics.
Related Issues (20)
- avoid "using namespace" in headers included by application codes HOT 1
- replace std::pow(x, N) with amrex::Math::powi<N>(x) for integer N HOT 1
- remove reinterpret_cast in rhs.H HOT 1
- Initializing pivot to zero in VODE causes out of boundary access in linpack functions HOT 7
- CUDA compilation slow after retry merge HOT 1
- try to make a ROCm big kernel reproducer HOT 4
- NSE + SDC update is missing some energy from weak interactions HOT 2
- add ideal gas EOS with tabulated mean molecular weight HOT 2
- add `-mllvm -amdgpu-function-calls=true` to CMake HIP build
- indexing issue in `is_jacobian_used()`? HOT 1
- Self-consistent NSE floating-point overflow HOT 1
- discussion: explore alternative object-oriented API
- remove NSE support from Strang
- sync self-consistent NSE update with tabular NSE HOT 4
- add second set of NSE criteria HOT 1
- change default retry tolerances to be same as normal HOT 2
- Runtime parameter docs don't include the namespace HOT 1
- consolidate subch networks HOT 1
- `chabrier1998` screening with quantum corrections can give enhancement factors < 1
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 microphysics.