-
Couldn't load subscription status.
- Fork 97
feat: Adaptive multilinear interpolation for OBL solver #3391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
…earInterpolatorStaticKernels
…nel to PythonFunction
…to PythonFunction
…g adaptive kernel
|
Thanks @av-novikov for this PR! I think that the python scripts shouldn't go in a subfolder of |
|
@av-novikov the following patch should fix the issues with MGR |
Dear @victorapm, Thank you very much for your patch! and it helped but not solved the problem. Now we have 1D homogeneous model with injection of carbonated water converging, although spending many linear iterations (LI) per newton iteration NI: 10-60, avg-45. The similar 2D 100x100 heterogeneous setup starts with 15-40 LI/NI but then relatively quickly rise till maximum value of 200 LI/NI. In the end it takes too much time and i decided to stop simulation. Before we had both 1D and 2D setups non-converging, i.e. 200 LI were not enough to reduce error. 1D setup, log without your patch - output_1d_verbose.txt I can share hypre output with matrices if needed. Please let me know how should i proceed? Best, |
|
Dear @victorapm, Indeed merge of develop branch with recently added scaling option, accompanied by the fix you suggested helped to improve performance of linear solver. Now it takes much less iterations and both 1D homogeneous and 2D heterogeneous setups converge smoothly. I attached logs for both. output_merge_1d.log Thank you very much! |
This PR adds interfaces for embedding of Python function into C++ code, adds multilinear adaptive interpolation with given exact evaluator from Python and adds the support of both static and adaptive interpolation in ReactiveCompositionalMultiphaseOBLKernels. Ultimate goal is to run simulation similar to open-darts from a corresponding (part of) model given from Python.
FAQ:
Q: Why do we use __uint128_t ?
A: We need to count nodes and hypercubes in multidimensional state space. Even with 300 points per axis in 8-dim space (e.g. 8-component fluid), the number of points (300^8) surpasses the maximum of 64-bit integer. Moreover, single __uint128_t key type simplifies hashing points and hypercubes in std::unordered_map storage.
Q: Do we duplicate the storage of points?
A: Yes, because we minimize memory accesses by excessive, but consecutive storage.