Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MostafaMollaali
dynamic
Commits
4a088c44
Commit
4a088c44
authored
8 years ago
by
Christoph Lehmann
Committed by
Dmitri Naumov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[MaL] abort if no ODE solver can be created.
And also in the tests prevent abort if no ODE solver can be created.
parent
8ef89641
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MathLib/ODE/ODESolverBuilder.h
+9
-3
9 additions, 3 deletions
MathLib/ODE/ODESolverBuilder.h
Tests/MathLib/TestODESolver.cpp
+4
-0
4 additions, 0 deletions
Tests/MathLib/TestODESolver.cpp
with
13 additions
and
3 deletions
MathLib/ODE/ODESolverBuilder.h
+
9
−
3
View file @
4a088c44
...
...
@@ -10,6 +10,8 @@
#ifndef MATHLIB_ODE_ODESOLVERBUILDER_H
#define MATHLIB_ODE_ODESOLVERBUILDER_H
#include
<logog/include/logog.hpp>
#include
"ODESolver.h"
#include
"ConcreteODESolver.h"
...
...
@@ -38,9 +40,13 @@ std::unique_ptr<ODESolver<NumEquations>> createODESolver(
#ifdef CVODE_FOUND
return
std
::
unique_ptr
<
ODESolver
<
NumEquations
>>
(
new
ConcreteODESolver
<
CVodeSolver
,
NumEquations
>
(
config
));
#else
return
nullptr
;
#endif // CVODE_FOUND
#endif
(
void
)
config
;
// Unused parameter warning if no library is available.
ERR
(
"No ODE solver could be created. Maybe it is because you did not build"
" OGS6 with support for any external ODE solver library."
);
std
::
abort
();
}
//! @}
...
...
This diff is collapsed.
Click to expand it.
Tests/MathLib/TestODESolver.cpp
+
4
−
0
View file @
4a088c44
...
...
@@ -66,6 +66,10 @@ template <unsigned NumEquations>
std
::
unique_ptr
<
MathLib
::
ODESolver
<
NumEquations
>>
make_ode_solver
(
boost
::
property_tree
::
ptree
const
&
conf
)
{
// Make sure testrunner does not crash if we haven't built with support for
// any external ODE solver lib.
if
(
!
any_ode_solver_libs_available
())
return
nullptr
;
BaseLib
::
ConfigTree
config
(
conf
,
""
,
BaseLib
::
ConfigTree
::
onerror
,
BaseLib
::
ConfigTree
::
onwarning
);
return
MathLib
::
createODESolver
<
NumEquations
>
(
config
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment