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

Ode solver with sundials third party library. #1109

Merged
merged 53 commits into from
May 4, 2016

Conversation

endJunction
Copy link
Member

@endJunction endJunction commented Mar 18, 2016

This is an adaptation and cleanup of Christophs ode solver interface.

Todo (unordered list):

  • (non-monadic) check error
  • Fix memleaks
  • Test suitability for TES
  • Documentation
  • Changlog
  • Check CMake for sundials.
  • Rework getYDot

@@ -121,7 +121,7 @@ TEST(MathLibCVodeTest, ZeoliteAdsorption)

ode_solver->setFunction(f_zeolite, nullptr);

ode_solver->setIC(0.0, {pV, C});
ode_solver->setIC(0.0, {{pV, C}});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only for my understanding: That's due to some c++11 std::array constructor implementation "bug", right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be. I do remember something about std::array. On the other hand std::array is just struct, so it could be related to struct's initialization.

@endJunction endJunction force-pushed the ode-solver branch 2 times, most recently from 235dfc9 to 77c2de3 Compare March 18, 2016 14:36
return successful ? 0 : 1;
};

// TODO: check not run twice! move this call somewhere else
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the comment is not needed anymore. ✅

@chleh
Copy link
Collaborator

chleh commented Mar 19, 2016

@endJunction, I checked your branch yesterday evening at commit 77c2de3.
You didn't do any major API changes, so this branch—as expected—still suits my needs.

I only have three simple suggestions:

  • Please add overloads to setIC() and getYDot() which take std::array<double, N> const&, because then one can use those functions like ode_solver.setIC(1.0, { 2.0, 3*x, cos(y) }). ✅
  • I don't know if it is somewhere documented in our code that sundials expects column-major matrix storage order. At least it should be explicitly documented. Furthermore, it would probably be good if you included the storage order parameter Eigen::ColMajor explicitly into the MappedMatrix and MappedConstMatrix typedefs. ✅
  • You might want to move the classes Handles and ConcreteOdeSolver out of OdeSolverFactory.h to two separate files. That would make understanding the code and file structure slightly easier. ✅

@endJunction endJunction force-pushed the ode-solver branch 2 times, most recently from a5c6080 to 392bcd3 Compare March 21, 2016 16:58
@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Linux-PRs/1484/

@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Gui/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Mac-PRs/1349/

@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Mac-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Mac-PRs/1368/

@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Gui/Gui-Linux-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Gui-Linux-PRs/1458/

@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Win-PRs/1370/

@ogsbot
Copy link
Member

ogsbot commented Mar 21, 2016

Jenkins: OGS-6/Gui/Win-PRs failed: https://svn.ufz.de:8443/job/OGS-6/job/Gui/job/Win-PRs/1348/

@bilke
Copy link
Member

bilke commented Apr 5, 2016

@endJunction Feel free to git cherry-pick bilke/ogs@2d6221bc7a5

if (CVODE_FOUND)
target_link_libraries(MathLib INTERFACE
GeoLib
logog
Copy link
Member Author

@endJunction endJunction Apr 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs GeoLib and logog ✅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@endJunction endJunction merged commit ba66452 into ufz:master May 4, 2016
@endJunction endJunction deleted the ode-solver branch May 4, 2016 08:33
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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

Successfully merging this pull request may close these issues.

7 participants