Skip to content
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

precision problems when calling run for an endgame #145

Closed
ofloveandhate opened this issue Feb 23, 2018 · 2 comments
Closed

precision problems when calling run for an endgame #145

ofloveandhate opened this issue Feb 23, 2018 · 2 comments

Comments

@ofloveandhate
Copy link
Contributor

I'm working on an example using the endgames to compute singular endpoints, and while broadly successful, am getting the following error:

RuntimeError                              Traceback (most recent call last)
<ipython-input-9-2d50f2cbad6b> in <module>()
     10         target_time.precision( midpath_points[ii][0].precision())
     11         print('before {} {} {}'.format(eg_boundary.precision(), target_time.precision(), midpath_points[ii][0].precision()))
---> 12         eg.run(start_time=eg_boundary, target_time=target_time, start_point=midpath_points[ii])
     13         final_points[ii] = eg.final_approximation()
     14         print('after {} {} {}'.format(eg_boundary.precision(), target_time.precision(), midpath_points[ii][0].precision()))

RuntimeError: CauchyEG Run time and point must be of matching precision. (16!=20)

checking the precisions of the inputs seems to reveal them to be uniform; however, the internals of the core disagree. what's up with that?

@ofloveandhate
Copy link
Contributor Author

the issue is that the way Eigen::Vector<T> is exposed through minieigen, the return type for get_item is not a reference, but a copy. Hence, while checking the precision of a vector in python via v[0].precision(), we are not actually checking the precision of the element of the vector, but a copy of it -- which is inevitably at current default precision.

see eudoxos/minieigen#15

ofloveandhate pushed a commit to ofloveandhate/b2 that referenced this issue Feb 23, 2018
so we can immediately pick up changes; namely, some changes have to be made to allow vector's `get_item` to return a reference instead of a copy.

see bertiniteam#145
@ofloveandhate
Copy link
Contributor Author

issued a pull request, after forking minieigen into bertiniteam and changing the submodule to refer to bertiniteam/minieigen instead of eudoxus/minieigen

eudoxos/minieigen#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant